Skip to main content

Introduction

Speech-to-text turns what the user says into text. STT_SERVICE in the API's configuration picks the provider:

  • whisper (the default): a Whisper web service you run, local and free
  • google
  • azure
  • http: a speech service with a small HTTP API (/v1/transcribe)

Each provider needs its own setup, on its page. Every option is in API variables.

Clips that are too short or too quiet (STT_MIN_DURATION_MS, STT_MIN_RMS_DBFS) are dropped before STT. When the provider returns no text, or the speaker check rejects the voice, the turn is dropped too and the kiosk shows "Sorry, I didn't catch that". After several dropped turns in a row (DIALOGUE_NOISY_THRESHOLD) the avatar suggests typing instead.

The avatar's own voice coming back through the microphone is recognised by the speaker check and dropped silently: it does not count as a dropped turn.

Talking over the avatar​

While the avatar speaks, the microphone hears it too. On top of the browser's echo cancellation, the web toolkit only sends speech that overlaps the avatar's voice (or starts within half a second after it) when it holds about 700 ms of confident speech; anything shorter is treated as echo or noise and dropped on the device. When the visitor does talk over the avatar, its voice is lowered, not paused. If the API accepts the turn, the avatar stops and the new answer follows; if it drops it, the avatar's voice comes back.

Restart the API after changing the provider.