Skip to main content

STT & Language

HAL streams the microphone to a speech-to-text service while you talk and hands the transcript to the agent. Both STT options are Deepgram under the hood; the difference is whose key pays for it.

ProviderWhen it's usedLanguages
Autonomous STT (default)deepgram_api_key is emptyen, vi, zh-CN, zh-TW, or auto
Deepgram directdeepgram_api_key is setEnglish only (flux-general-en)

The provider is chosen when HAL starts.

Language​

stt_language sets the language you speak and the default TTS voice language:

ValueLanguageSTT model picked
""Autoflux-general-en
enEnglishflux-general-en
viVietnamesenova-3-general
zh-CNChinese (Simplified)nova-3-general
zh-TWChinese (Traditional)nova-3-general

(zh, zh-Hans and zh-Hant are accepted as aliases.) The model is set for you whenever you save the language — don't set stt_model by hand.

Web UI: http://<device-ip>/setting?debug=true#stt → Language.

API:

curl -s -X PUT $DEVICE/api/device/config \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"stt_language":"vi"}'

Changing the language restarts HAL (a few seconds without voice) and starts a fresh agent session. If tts_voice is empty, the default voice follows the language (Rachel → Ngan for Vietnamese, Amy for Chinese); if you set a voice yourself, pick one that speaks the new language — see TTS.

Use your own Deepgram key​

curl -s -X PUT $DEVICE/api/device/config \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"deepgram_api_key":"<deepgram-key>"}'

Or in Language → provider Deepgram → paste the key. HAL restarts and connects straight to Deepgram.

Deepgram direct is English-only

With deepgram_api_key set, HAL always runs Deepgram's flux-general-en model and ignores stt_language. For Vietnamese or Chinese, stay on the Autonomous STT proxy.

To go back to the proxy, remove the key. The API treats an empty string as "leave unchanged", so clear it in the file:

sudo jq 'del(.deepgram_api_key)' /root/config/config.json \
| sudo tee /root/config/config.json.new >/dev/null \
&& sudo mv /root/config/config.json.new /root/config/config.json \
&& sudo systemctl restart os-server hal

Point the proxy STT somewhere else​

Autonomous STT connects to <stt_base_url>/ws/audio/transcriptions over a WebSocket, authenticating with stt_api_key. Both fall back to llm_base_url / llm_api_key when empty — so if you point the brain at your own provider without setting them, STT goes to that provider and stops working. Pin them to the Autonomous values before switching the brain — see LLM → Step 1.

Keyword boosting​

HAL boosts recognition of the agent's name, the device type and the word "autonomous", so the wake phrase and name are transcribed reliably. The list updates automatically when you rename the agent (see Listening & Wake Word).

Watching what STT heard​

sudo journalctl -u hal -f | grep -i stt

For the live pipeline state and mic level from code, see HAL API → STT.

The Admin panel's Flow view (/monitor#flow) shows each turn's transcript live.