Live Transcription
Stream microphone audio directly to AmiVoice via WebSocket for real-time speech-to-text in the browser.
⚠️Requires Live Transcription Pack. An admin must enable this feature pack in Admin → Features before users can access the Live page.
How it works
Live transcription runs entirely in the browser. The backend only provides connection credentials — audio data is sent directly from the browser to AmiVoice.
Browser → GET /api/live-transcription/config → fetch WS URL + API key
Browser → getUserMedia → AudioContext(16kHz) → AudioWorklet → Int16 PCM → WS binary frames → AmiVoice
Browser → getUserMedia → AudioContext(16kHz) → AudioWorklet → Int16 PCM → WS binary frames → AmiVoice
- Browser fetches AmiVoice WS URL and API key from
GET /api/live-transcription/config. getUserMediarequests microphone access.AudioContextinitialised at 16 kHz; inline AudioWorklet converts Float32 to Int16.- Binary frames (prefixed with byte
0x70) are sent to AmiVoice via WebSocket. - AmiVoice responses are rendered on screen in real time.
WebSocket endpoint
Default endpoint: wss://acp-api.amivoice.com/v1/nolog/
Override with the AMIVOICE_WS_URL environment variable (e.g. to switch to the logging endpoint).
Response events
| Event | Meaning |
|---|---|
| U | Interim result — not yet finalised |
| A / R | Final result — confirmed recognition |
| s | Session error (note trailing space) |
| e | Session closed |
Requirements and gotchas
- HTTPS required:
navigator.mediaDevicesis only available on HTTPS or localhost. - Microphone permission: The browser will prompt for microphone access.
- Language selection: Select the language (ja-JP / en-US) in the UI before starting.
- Not auto-saved: Live transcription is for real-time monitoring. Results are not automatically saved as voicelog records.
ℹ️Do not include
sampleRate in getUserMedia constraints — some audio drivers reject it with NotFoundError.How to use live transcription
- Click Live in the navigation bar (visible only when the feature is enabled).
- Select a language (default: ja-JP).
- Click Start Recording and grant microphone permission.
- Speak — results appear on screen in real time.
- Click Stop Recording to end the session.