man oscar The manual Chat

Voice, pictures and files

Pictures, voice notes, spoken replies and files in chats; limits.

MANUAL / CHAT 10 / 29

Oscar takes pictures, voice notes and files in Matrix, Telegram and Discord chats, and sends spoken replies, pictures and files back. In the terminal, /image <path> (or a pasted image path) attaches a picture, and in the full-screen chat Ctrl+B records what you say. Speech works with nothing to configure where it can (a free voice for replies, a local whisper.cpp for transcripts); everything else is optional, and without the settings below Oscar says what is missing.

What a file is is decided from its bytes, never from its name or the type the sender's app claims: a "photo.png" that is really a PDF is treated as a PDF, and only real audio goes to speech-to-text.

Pictures

A picture (a photo, an image sent as a file) is saved under inbox/ in the workspace, so tools can open it later, and given to the model with your caption.

  • Whether the model sees images is detected from the provider's model list and the model family; model_vision = "yes" | "no" (OSCAR_MODEL_VISION) decides it yourself. If the provider refuses images mid-conversation, they stay off for that conversation and the activity message says so.
  • For a model that cannot see, set vision_model (and vision_provider when it is on another provider, whose key must be set): that model describes the picture and the description goes to the main model. The same model powers the vision_analyze tool.

Videos (video_analyze, opt-in)

video_analyze looks at a video file in the workspace and answers a question about it: ffmpeg samples a few frames spread evenly over the video, and a model that can see looks at them in order. It is off until you turn it on, and it needs ffmpeg (with ffprobe beside it), an optional program Oscar does not install:

toml
video_analyze = "on"          # off by default
# video_frames = "8"          # frames sampled (1-16); a call may ask for others
# video_max_mb = "200"        # largest video file
# video_max_seconds = "600"   # longest stretch looked at
# ffmpeg_path = "/opt/ffmpeg/bin/ffmpeg"   # default: ffmpeg on PATH; ffprobe is looked for beside it
  • Who looks. With vision_model set, that model gets every frame in one request (with their timestamps) and its answer comes back as text; otherwise the frames are attached to the result for the main model, which must be able to see. The tool is offered only when one of the two can.
  • Where ffmpeg runs. Where Oscar's shell commands run: inside the workspace sandbox (sandbox = "workspace"), in the Docker container (sandbox = "docker"; its image must have ffmpeg, a run says so when it does not), or on the machine (sandbox = "host"). The arguments are fixed and every path is quoted, so a file name is never read as a command. The frames go to a temporary folder in the workspace (.oscar/video-…) that is removed afterwards. With sandbox = "ssh" the tool is not offered: the commands run on another machine whose files Oscar cannot read back.
  • Approval. In the workspace sandbox and in Docker, ffmpeg is confined and a call does not ask. On the machine itself (sandbox = "host") each call asks, like a command: ffmpeg is then a program parsing a file it was handed, with your rights.
  • Limits. Only files in the workspace; files larger than video_max_mb are refused; a video longer than video_max_seconds is refused unless the call gives start and end (seconds) for a part within the limit, so a long recording is looked at piece by piece; ffprobe gets 30 seconds and the frames 3 minutes.
  • oscar doctor says whether the tool is on and, when it is not, why.

Voice notes

A voice note (or an audio file) is transcribed, the transcript is posted as a quiet status line (so a mishearing shows at once), and Oscar answers the transcript. Speech-to-text, first match wins:

Setting Backend
stt_command (OSCAR_STT_COMMAND) a local program; the template gets the audio file
stt_base_url (OSCAR_STT_BASE_URL, key OSCAR_STT_API_KEY) any OpenAI-compatible /audio/transcriptions server
GROQ_API_KEY Groq (whisper-large-v3-turbo)
OPENAI_API_KEY OpenAI (whisper-1)
nothing set, whisper.cpp installed with a model whisper.cpp on this machine: nothing to configure

Local, with nothing to configure. When no backend is set and a whisper.cpp program (whisper-cli, whisper-cpp, whisper, or the old main) is on PATH, Oscar uses it with a model from models/whisper/ in Oscar's home (or the file stt_model names; stt_model = "small" means ggml-small.bin there). oscar voice setup downloads a model when you ask for it (base, 142 MB, by default; --model tiny|base|small and their .en forms), checked against the SHA-1 checksum whisper.cpp publishes; a file that does not match is deleted. A whisper that is OpenAI's own Python tool is not mistaken for whisper.cpp. whisper.cpp reads WAV; other audio is converted with ffmpeg when it is installed.

Choose a backend with stt_backend:

stt_backend Key Notes
openai OSCAR_STT_API_KEY or OPENAI_API_KEY or stt_base_url for a compatible server
groq GROQ_API_KEY
mistral MISTRAL_API_KEY voxtral-mini-latest
xai XAI_API_KEY the server's default model unless stt_model
elevenlabs ELEVENLABS_API_KEY scribe_v1
deepinfra DEEPINFRA_API_KEY openai/whisper-large-v3-turbo
whisper-cpp none as above, but an error when whisper.cpp or a model is missing
command none stt_command
path none no transcript: the audio is saved under inbox/ and the model is told where, for a model or a skill that handles audio itself
off voice notes are answered with how to turn speech-to-text on

stt_base_url and OSCAR_STT_API_KEY also point any of the cloud backends at another address and key. stt_model and stt_language refine them. Cloud backends receive the audio; oscar doctor (the stt line) and oscar voice status say which one is in use. oscar transcribe <file> tests it.

Spoken replies

Ask for a spoken answer ("reply with a voice message") and the model uses text_to_speech; the audio goes into the chat before the text. With voice_replies (/voice voice or /voice always in a chat) Oscar speaks its replies by itself.

Text longer than the speech backend takes in one request (4000 or 5000 characters) is split after sentences and spoken in parts: MP3 and WAV parts are joined into one file (one voice note); Ogg/Opus parts are saved as name-1.ogg, name-2.ogg … and sent as consecutive voice notes. Spoken replies go up to 16,000 characters (the rest is in the text).

Chat apps show a voice bubble for Opus audio in an Ogg file, so spoken replies are converted to Ogg/Opus with ffmpeg when it is installed. Without ffmpeg (or when it cannot convert), MP3 still goes as a voice note (Telegram takes MP3 voice notes; elsewhere it arrives as an audio file) and WAV goes as an audio file.

Free, with nothing to configure. When no text-to-speech backend is set, Oscar speaks with Microsoft Edge's read-aloud voices over their public websocket: no account and no key, but the text goes to Microsoft. tts_voice picks the voice (default en-US-AriaNeural; any Edge voice name such as de-DE-KatjaNeural or en-GB-RyanNeural) and tts_speed the pace (1.2 is 20% faster). web_keyless = "off" keeps Oscar off free keyless services (this voice and the keyless search tier); tts_backend = "off" turns speech off.

Configured backends, first match wins when tts_backend is not set:

Setting Backend
tts_command (OSCAR_TTS_COMMAND) a local program
ELEVENLABS_API_KEY ElevenLabs
tts_base_url (OSCAR_TTS_BASE_URL, key OSCAR_TTS_API_KEY) any OpenAI-compatible /audio/speech server
OPENAI_API_KEY OpenAI

Choose one with tts_backend:

tts_backend Key Default voice Audio
edge none en-US-AriaNeural MP3
openai OSCAR_TTS_API_KEY or OPENAI_API_KEY alloy MP3, Opus or WAV
elevenlabs ELEVENLABS_API_KEY Adam MP3 or Opus
deepinfra DEEPINFRA_API_KEY af_bella (hexgrad/Kokoro-82M) MP3, Opus or WAV
minimax MINIMAX_API_KEY (and MINIMAX_GROUP_ID if your account has one) English_expressive_narrator MP3 or WAV
mistral MISTRAL_API_KEY Voxtral's neutral voice MP3, Opus or WAV
gemini GEMINI_API_KEY or GOOGLE_API_KEY Kore WAV
xai XAI_API_KEY eve (tts_language, default en) MP3 or WAV
piper, espeak none local voices WAV
command none tts_command as written

tts_model, tts_voice, tts_format (mp3, opus, wav) and tts_speed (0.25 to 4; each service takes its own range, so the value is clamped to it) refine the choice; tts_base_url and OSCAR_TTS_API_KEY point a cloud backend at another address and key. A backend that cannot make the asked format makes MP3 instead. oscar doctor has a tts line.

Voice in the full-screen chat

Ctrl+B records from the microphone, a second Ctrl+B stops and puts the transcript in the input box, and Enter (or Ctrl+B again) sends it; Esc drops a recording. With voice_reply replies are spoken through the speakers. Hands-free (/voice handsfree on) ends a recording when you stop talking and sends it; /voice continuous on listens again after each reply, and talking over a spoken reply stops it. See the chat guide for the keys and settings.

Other files

Documents, archives, videos and the like are saved under inbox/<date>-<name> in the workspace; Oscar is told their type, size and where they are, and opens them with its tools when your message asks for it. This works on every platform, Matrix included (m.file and m.video). A small text file (UTF-8, up to 100 KiB: notes, a log excerpt, a CSV) is also put into your message itself, between lines that mark where the file starts and ends, so the model reads it at once.

To send you a file, the model writes it into the workspace and calls send_file: a picture goes out as a picture (a photo on Telegram), a video as a video and a GIF as an animation on Telegram (Discord plays both in place; Matrix sends m.video), audio as audio, anything else as an attachment, with the reply. The model can also mark files in its reply: a line MEDIA: path/to/file (taken out of the text) or a Markdown link to a workspace file sends that file the same way. Either way only files inside the workspace go out, up to 50 MB, and key and credentials files (.env, *.pem, id_rsa, …) and text that contains what looks like a key or token are refused. It is only there in chats.

A reply that would take more than long_reply_messages messages (default 8) arrives as reply-<id>.md with a short preview message instead, redacted like every reply.

Limits

Taken from you Sent to you
pictures 50 MB
voice notes 25 MB (what speech-to-text services accept)
other files 50 MB 50 MB
Telegram 20 MB per file (the public Bot API); 50 MB with a local Bot API server (TELEGRAM_API_URL) 50 MB; photos up to 10 MB, bigger pictures go as documents
Discord 50 MB, only from Discord's servers 10 MB, or DISCORD_UPLOAD_LIMIT_MB
Matrix 100 MB, or matrix_max_media_mb (the homeserver may allow less) 50 MB (the homeserver may allow less)

Anything bigger is refused with a message saying the limit (before it is downloaded, when the platform gives the size). In encrypted Matrix rooms files are encrypted both ways, like text.