Skip to content

Commit 7b67002

Browse files
authored
chore(docker): default to multilingual whisper small for STT (#94)
The bundled whisper.cpp model was ggml-tiny.bin - technically multilingual but effectively English-grade, so German/Spanish voice notes transcribed poorly. The image now ships ggml-small.bin (466 MB), the multilingual small variant, which gives usable DE/EN/ES quality with no code changes (WHISPER_MODEL build arg default bumped, both compose configs and docs updated to match). Verified: whisper stage builds, model downloads, whisper-cli runs.
1 parent db639eb commit 7b67002

5 files changed

Lines changed: 17 additions & 13 deletions

File tree

docker/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@ COPY . .
1818
RUN CGO_ENABLED=0 go build -ldflags "-s -w" -o /out/odek ./cmd/odek
1919

2020
# ---- whisper stage ----
21-
# Build whisper.cpp's CLI and fetch the `tiny` model so the `transcribe` tool
21+
# Build whisper.cpp's CLI and fetch the `small` model so the `transcribe` tool
2222
# (and Telegram voice auto-transcription) work out of the box — no host
23-
# install, no first-run model download. Same Debian base as the runtime stage
23+
# install, no first-run model download. `small` (not `small.en`) is the
24+
# multilingual variant: usable German/English/Spanish quality, unlike `tiny`
25+
# which is effectively English-grade. Same Debian base as the runtime stage
2426
# so the glibc ABI matches; OpenMP is disabled to keep the runtime dependency
2527
# surface down to just libstdc++6. To ship a different model, override the build
2628
# arg: `--build-arg WHISPER_MODEL=base` (tiny | base | small | medium) — size
2729
# and RAM grow accordingly. WHISPER_VERSION pins the whisper.cpp release so the
2830
# build is reproducible — bump it deliberately rather than tracking master.
2931
FROM debian:bookworm-slim AS whisper
30-
ARG WHISPER_MODEL=tiny
32+
ARG WHISPER_MODEL=small
3133
ARG WHISPER_VERSION=v1.8.6
3234
RUN apt-get update && apt-get install -y --no-install-recommends \
3335
git cmake make g++ curl ca-certificates \

docker/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,21 @@ just defers silently.
155155

156156
## Voice transcription (out of the box)
157157

158-
The image **bundles whisper.cpp's CLI and the `tiny` ggml model**, plus `ffmpeg`
158+
The image **bundles whisper.cpp's CLI and the `small` ggml model**, plus `ffmpeg`
159159
for OGG/Opus → WAV conversion — so the `transcribe` tool and Telegram voice
160160
auto-transcription work with zero setup. No host install, no first-run download.
161+
`small` is the multilingual variant: usable German/English/Spanish quality out
162+
of the box (`tiny`, the previous default, was effectively English-grade).
161163

162-
- The model ships at `/usr/local/share/whisper/models/ggml-tiny.bin`, and both
164+
- The model ships at `/usr/local/share/whisper/models/ggml-small.bin`, and both
163165
`config.restricted.json` and `config.godmode.json` point
164166
`transcription.models_dir` there. (It lives outside `~/.odek` on purpose — the
165167
Telegram profiles bind-mount `./.odek`, which would otherwise shadow it.)
166168
- Send the bot a voice note → it's transcribed locally and handed to the agent
167169
as text. `auto_transcribe` is on by default in the bundled configs.
168-
- Want a more accurate (larger) model? Rebuild with
169-
`--build-arg WHISPER_MODEL=base` (or `small` / `medium`) and bump the
170-
`model` field in the config to match.
170+
- Want a different model? Rebuild with
171+
`--build-arg WHISPER_MODEL=tiny` (fastest, weaker multilingual) or `medium`
172+
(best accuracy, much larger) and bump the `model` field in the config to match.
171173

172174
## Image & video understanding (out of the box)
173175

docker/config.godmode.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"verbose": false
99
},
1010
"transcription": {
11-
"model": "tiny",
11+
"model": "small",
1212
"auto_transcribe": true,
1313
"models_dir": "/usr/local/share/whisper/models"
1414
},
@@ -76,4 +76,4 @@
7676
"action": "allow"
7777
}
7878
}
79-
}
79+
}

docker/config.restricted.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"verbose": false
99
},
1010
"transcription": {
11-
"model": "tiny",
11+
"model": "small",
1212
"auto_transcribe": true,
1313
"models_dir": "/usr/local/share/whisper/models"
1414
},
@@ -92,4 +92,4 @@
9292
}
9393
}
9494
}
95-
}
95+
}

docs/TELEGRAM.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ Voice message received → DownloadVoice (OGG Opus to disk)
394394

395395
**Fallback:** If auto-transcribe fails (ffmpeg unavailable, corrupt audio, whisper error), the agent receives the file path with a suggestion to use the `transcribe()` tool manually.
396396

397-
**Docker:** the official image bundles the whisper.cpp CLI, the `tiny` model, and ffmpeg, with `auto_transcribe` enabled in the shipped configs — so voice transcription works out of the box with no host install. See [../docker/README.md](../docker/README.md#voice-transcription-out-of-the-box).
397+
**Docker:** the official image bundles the whisper.cpp CLI, the `small` (multilingual) model, and ffmpeg, with `auto_transcribe` enabled in the shipped configs — so voice transcription works out of the box with no host install, at usable German/English/Spanish quality. See [../docker/README.md](../docker/README.md#voice-transcription-out-of-the-box).
398398

399399
### Tool Progress (Narrator)
400400

0 commit comments

Comments
 (0)