# Voice

> How to dictate a task in the web app and send voice messages in Telegram, and who turns the speech into text — Eggent AI, a provider of your own, or Whisper on the workspace's server.

Source: https://eggent.ai/docs/voice/

You can talk to the agent instead of typing. The recording is turned into text before the agent sees it; [who does that](#who) depends on the model the workspace runs on.

## Dictation in the browser {#dictation}

1. Press the microphone icon in the message box.
2. Allow the browser to use the microphone.
3. Speak. Press the icon again to finish.

The recognised text appears in the message box, where you can fix it before sending. The same microphone sits beside the answer field of a question the agent asks you.

> [!NOTE]
> Browsers only allow the microphone on secure addresses (`https://`) or on `localhost`. In the cloud this works out of the box. On your own server, open Eggent through a domain with HTTPS.

## Voice messages in Telegram {#telegram}

Send the bot a voice message, as you would to a person. The bot says it is transcribing and passes the text to the agent as an ordinary message. A caption on the voice message reaches the agent too.

After a successful transcription the audio file is deleted and the text stays in the history. If transcription fails, the file is kept so the agent can try again.

## Who recognises speech {#who}

- **On Eggent AI** (the cloud's included model), recordings go to Eggent AI's speech recognition: accurate, in any language, and paid from the Eggent AI balance by the length of the recording. If it cannot take one — the balance is spent, or it does not answer — Whisper on the workspace's server transcribes it, so a voice message is never lost.
- **On your own model**, Whisper on the workspace's server does it by default: nothing is spent and the recording does not leave the workspace. In **Settings → Models → Advanced → Images, voice and memory** you can choose instead:
  - **Eggent AI**, while the chat itself stays on your own model ([how that works](https://eggent.ai/docs/models.md#services));
  - **your own provider**: one connected with an API key whose API is OpenAI-compatible and recognises speech (the `/audio/transcriptions` request), plus the model id from that provider. A subscription sign-in has no key to send, so it is not offered. If the provider refuses, Whisper takes over.
- **On your own server** there is no Eggent AI: Whisper, or your own provider as above.

## Whisper on the server {#how}

- The recording is normalised with `ffmpeg`.
- The text is recognised by `whisper.cpp`, a local speech-recognition model. The language is detected automatically.
- The model is downloaded once, on the first transcription, and then lives in `data/models/whisper/`.

Whisper runs inside the workspace and costs nothing. The default model is small and fast; on your own server a larger one is more accurate (`EGGENT_STT_MODEL` below).

## Settings on your own server {#self-host}

| Variable | Default | What it does |
| --- | --- | --- |
| `EGGENT_STT_ENABLED` | `1` | Turns speech recognition on |
| `EGGENT_STT_MODEL` | `base` | Model: `tiny`, `base`, `small`, `medium`. Larger is more accurate and slower |
| `EGGENT_STT_LANGUAGE` | `auto` | The spoken language, or auto-detect |
| `EGGENT_STT_AUTO_DOWNLOAD_MODEL` | `1` | Download the model on first use |

More in [Configuring your server](https://eggent.ai/docs/self-host-config.md).
