Speech Input (Speech-to-Text)
Apis AI can turn your voice into text and send it to the chat. You can dictate a single message, or switch a chat into voice chat mode and talk freely with the AI: as soon as you stop speaking, your sentence is transcribed and sent automatically.
Choosing a Backend
Apis AI supports two speech-to-text backends:
| Backend | Runs | Cost | Notes |
|---|---|---|---|
| Whisper.cpp (local) | On your machine | Free | Private, works offline. Needs whisper.cpp and a model file. |
| OpenAI-compatible (remote) | In the cloud | Per use | No installation. Needs an API key (e.g. OpenAI or Groq). |
Local Setup (whisper.cpp)
The local backend talks to whisper-server from the
whisper.cpp
project. Apis AI can start and stop that server for you.
-
Install whisper.cpp. Build it and make sure the
whisper-serverbinary is available:
The binary is then atgit clone https://github.com/ggml-org/whisper.cpp cd whisper.cpp cmake -B build cmake --build build --config Releasebuild/bin/whisper-server. -
Download a model. A good default is
medium; usebaseorsmallon slower machines:./models/download-ggml-model.sh medium -
Configure the paths in Apis AI. Open
Settings → System → Speech Input, choose
Whisper.cpp (local) and enter:
- whisper-server path – full path to the binary, e.g.
/home/you/whisper.cpp/build/bin/whisper-server(empty = search in PATH). - Whisper model path – full path to the model file, e.g.
/home/you/whisper.cpp/models/ggml-medium.bin. - Server URL –
http://127.0.0.1:8081(default).
- whisper-server path – full path to the binary, e.g.
-
Start the server. Either enable Start Whisper server automatically –
Apis AI then launches
whisper-serveritself at every app start and again before transcribing, if it is no longer reachable – or click Start local server once. Apis AI startswhisper-serveron the configured port and writes its output to~/.local/state/apis-ai/whisper.log. A server you started yourself in a terminal is detected and reused instead of being started a second time. - Test it. Click Test connection. A green Connection successful means you are ready.
whisper-server defaults to port 8080, which is often already used by a local
Llama server. Apis AI therefore defaults to 8081. Keep the
Server URL and the local server port in sync.
glslc first):
cmake -B build -DGGML_VULKAN=ON
cmake --build build --config Release
A larger model then stays fast, which improves accuracy noticeably.
Remote Setup (OpenAI-compatible)
Any service that exposes the OpenAI /audio/transcriptions endpoint works.
Examples:
| Service | Base URL | Model |
|---|---|---|
| OpenAI | https://api.openai.com/v1 | whisper-1 |
| Groq | https://api.groq.com/openai/v1 | whisper-large-v3 |
- In Settings → System → Speech Input choose OpenAI-compatible (remote).
- Enter the Server URL including
/v1. - Paste your API key and the model name.
- Click Test connection.
Settings Reference
| Setting | Meaning |
|---|---|
| Enable speech input | Shows the microphone (dictation) and voice chat buttons in the chat. |
| Backend | Whisper.cpp (local) or OpenAI-compatible (remote). |
| Server URL | Address of the speech-to-text endpoint. |
| API key | Only for remote services. |
| Model | Only for remote services. |
| Language | ISO code (e.g. de, en). Empty = auto-detect. |
| Speech threshold (VAD) | How loud a segment must be to count as speech in voice chat mode. |
| Silence until sending | How long it must be quiet before a sentence is sent in voice chat mode. |
| whisper-server path | Path to the local whisper-server binary (empty = search in PATH). Local backend only. |
| Whisper model path | Path to the GGML/GGUF model file the local server loads. Local backend only. |
| Local server port | Port Apis AI uses when it starts the local server itself. |
| Start Whisper server automatically | Local backend only. Apis AI starts whisper-server itself at app start and again before transcribing if it is no longer reachable, and stops the server it started when the option is switched off or the app closes. A server you started yourself is reused and never stopped. Requires the Whisper server path and Whisper model path. |
Dictation
Click the microphone button:
- Click the microphone to start recording.
- Click stop to finish – the transcript is inserted into the input field, where you can edit it before sending.
- Or click Send while recording – the recording stops, is transcribed and sent immediately.
Voice Chat Mode
Click the voice chat button (speaker icon) next to the microphone. Apis AI now listens continuously:
- While you speak, a live preview of the current sentence is shown below the input.
- When you stop speaking (the configured silence until sending elapses), the sentence is transcribed and sent automatically.
- Short fragments wait: a few words without closing punctuation are held briefly and merged with the continuation, so a short pause in the middle of a sentence does not split it. If you do not continue, the fragment is sent after a moment.
- Non-speech is ignored: empty results and the usual Whisper artifacts (
[BLANK_AUDIO],(Musik), "Untertitel von …") are dropped instead of being sent. - You can talk over the AI at any time: if you speak while an answer is still running, the answer is interrupted and your new sentence is sent (just like sending a normal message).
- Click the voice chat button again to leave the mode.
Troubleshooting
The microphone button is missing
Speech input is disabled. Enable Settings → System → Speech Input; the microphone and voice chat buttons then appear in the chat input.
"Connection failed" when testing
- Local: Is the server running? Click Start local server or enable
Start Whisper server automatically, then check
~/.local/state/apis-ai/whisper.log. Is the model path correct? Does the Server URL match the local server port? - Remote: Is the URL complete (including
/v1)? Is the API key valid? Is the model name spelled correctly?
No microphone / no recording
On Linux, check that the app can access your sound server (PipeWire/PulseAudio/ALSA) and that an input device exists:
arecord -l
If arecord lists no capture device, the problem is outside Apis AI.
Nothing is recognized
- Select your spoken language explicitly instead of relying on auto-detect.
- Move closer to the microphone and raise the input volume.
- Use a larger model (
smallormedium) for better accuracy.
The local server does not start
Make sure the path to whisper-server is correct and executable, and that the model
file exists. The log at ~/.local/state/apis-ai/whisper.log contains the exact error.
With Start Whisper server automatically enabled Apis AI tries again before every
transcription and shows the result in the speech settings; if it keeps failing, check the paths
above or start the server manually in a terminal.