Ollama speech to text — the ear is the picture door
Ollama speech to text in v0.40.13: send a base64 wav in the images field of /api/chat with lfm3-audio:2b. The audio field is silently ignored; /api/embed answers 501.
Ollama speech to text works — through the picture door. Pull lfm3-audio:2b, base64 your wav, send it in the images array of /api/chat. The field named audio is silently ignored; /api/embed answers 501.
One wav, three doors. The door labeled for sound does nothing; sound rides the door labeled for pictures.
Ollama speech to text — which API door carries the sound?
$ curl /api/chat images:[wav] → 200 "The gray fox jumped over the lazy dog."$ curl /api/chat audio:[wav] → 200 prompt_eval_count: 15 # the sound never arrived$ curl /api/embed audio:[wav] → 501 "This server does not support embeddings. Start it with --embeddings"
Middle line: no 400, no warning — 15 prompt tokens and a reply about explaining concepts.
has audio encoder, so images bytes reach an audio encoder. The field name lies; the pipeline doesn't. No working audio field in v0.40.13.How do you send audio to the Ollama API?
wav = base64.b64encode(open("speech.wav", "rb").read()).decode()
req = urllib.request.Request("http://localhost:11434/api/chat",
data=json.dumps({"model": "lfm3-audio:2b",
"messages": [{"role": "user", "content": "Transcribe this audio exactly.",
"images": [wav]}], "stream": False}).encode(),
headers={"Content-Type": "application/json"})How good is the transcription?
Right shape, wrong word: espeak's "Seven gigabytes of VRAM cost one hundred and nine dollars" returned "Sam and Gigamite's unram cost 109 dollars." The 109 survived.
Fox came back "The gray fox jumped over the lazy dog": wrong adjective, repeated warm — stable.
| wav | length (s) | prompt tokens | audio tokens | tokens / s of speech |
|---|---|---|---|---|
| fox.wav | 3.65 | 61 | 54 | 61 ÷ 3.65 ≈ 14.8/s |
| vram.wav | 4.78 | 75 | 68 | 75 ÷ 4.78 ≈ 14.2/s |
It thinks before it transcribes: every answer carried a thinking block; "hi in three words" burned 472 eval tokens.
| ask | wall (s) | eval tokens | tok/s by hand |
|---|---|---|---|
| transcribe fox.wav (warm) | 12.6 | 189 | — |
| transcribe vram.wav | 10.9 | 154 | 154 ÷ 9.192 = 16.8 |
| "hi in three words" | 29.1 | 472 | 472 ÷ 28.704 = 16.4 |
Thinking outnumbered the two-word answer roughly three to one.
Why is there no audio field that works?
the bench, for the record
Arch VM, 2 vCPU threads of a Ryzen 7 3700X, 8 GB RAM, ollama v0.40.13; warm load ~3 ms. No real mic, no GPU, no second audio model.
- last tested 2026-11-02 — ollama v0.40.13 (tagged 2026-10-28), run at 13:28 UTC, full log in bench receipts
- one 16 kHz mono espeak wav of "The quick brown fox jumps over the lazy dog" (3.65s, 16-bit mono)
- model: lfm3-audio:2b — 1.7 GB pull, 1.6 GB resident, 2B params, 32K context (card), 4096 on our box, 18 languages, LFM Open License