Skip to content

Telegram voice local mode

Telegram voice local mode keeps voice transcription private and local. Bestie downloads the voice file, converts Telegram Ogg/Opus to WAV, runs whisper.cpp, sends only the bounded transcript and metadata to the agent, then deletes raw voice/audio files when configured.

.bestie/tools/whisper-bin/whisper-cli
.bestie/tools/local-whisper-transcribe.sh
.bestie/models/ggml-small.bin

The wrapper accepts model path and audio path, converts with ffmpeg, and prints transcript text to stdout.

If the local files exist, configure local voice mode with:

Terminal window
bestie telegram voice setup-local

List models and the current configured model:

Terminal window
bestie telegram voice models

Preview a model download:

Terminal window
bestie telegram voice download-model small

Download and switch to the model:

Terminal window
bestie telegram voice download-model small --confirm --use

Supported names are tiny, small, medium, and large-v3-turbo. Existing files are not overwritten unless --force is provided.

{
"transcription": {
"provider": "local-whisper",
"command": ".bestie/tools/local-whisper-transcribe.sh",
"args": ["{modelPath}", "{audioPath}", "-l", "vi"],
"modelPath": ".bestie/models/ggml-small.bin",
"timeoutMs": 120000
},
"channels": {
"telegram": {
"attachments": {
"downloadPolicy": "allow",
"transcriptionPolicy": "allow",
"transcriptionMaxBytes": 10485760,
"deleteAfterProcessingKinds": ["voice", "audio"]
}
}
}
}

For Vietnamese, ggml-small.bin is the practical local baseline. ggml-tiny.bin is faster but commonly too inaccurate for Vietnamese voice chat.

Run Doctor:

Terminal window
bestie doctor

Expected checks include local transcription command, model, ffmpeg, and model quality warnings.

For a real Telegram smoke transcript:

Terminal window
bestie telegram --once --transcript .bestie/logs/telegram-local-voice-smoke.jsonl

The transcript file must not contain raw message text, transcript text, file ids, file paths, owner ids, chat ids, bot tokens, or provider secrets.

Preview retained old voice/audio files:

Terminal window
bestie tools attachments cleanup --older-than 7d --kinds voice,audio

Delete matched files:

Terminal window
bestie tools attachments cleanup --older-than 7d --kinds voice,audio --confirm