Skip to content

OpenAI-compatible speech API ​

Aleph can lend its speech recognition and its voice to your other programs. Any tool that already speaks OpenAI's audio API — a transcription script, a note taker, a home-automation add-on — can point at your Aleph instead of at a cloud, and the audio never leaves your machine.

This is the speech half of Aleph, not the assistant. A request here is transcribed or spoken and nothing more: no conversation is started, nothing is remembered, and no tools run. To actually talk to Aleph, connect a satellite.

Switching it on ​

Setup → Speech API:

  1. Enabled — on.
  2. Access key — pick a long random string. Without a key the endpoints stay closed, even when enabled.

Both take effect immediately; no restart. The endpoints live on the same address and port as the Web UI.

Endpoints ​

Send the key as Authorization: Bearer <key> (or X-API-Key: <key>).

Transcribe audio ​

sh
curl http://192.168.1.5:5602/v1/audio/transcriptions \
  -H "Authorization: Bearer $ALEPH_KEY" \
  -F file=@memo.wav \
  -F model=aleph-stt
json
{ "text": "Erinnere mich morgen früh an den Müll." }

response_format may be json (default), text, or verbose_json (adds the clip's duration).

Speak text ​

sh
curl http://192.168.1.5:5602/v1/audio/speech \
  -H "Authorization: Bearer $ALEPH_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"aleph-tts","input":"Das Essen ist fertig.","voice":"standard"}' \
  --output ansage.wav

voice names one of your personas; leave it out for the voice Aleph normally speaks in. response_format may be wav (default) or pcm (raw 16-bit mono, sample rate in the X-Sample-Rate header).

List models ​

GET /v1/models returns the two ids this server serves: aleph-stt and aleph-tts. The common OpenAI ids are accepted as aliases, so a client that hardcodes whisper-1, tts-1 or tts-1-hd works unchanged.

What is different from OpenAI ​

Aleph runs your models, so a few request options have no meaning here. It says so instead of quietly ignoring them:

You sendWhat happens
An audio file that is not WAVRefused — convert to WAV first
Another model idRefused, naming the ids this server serves
response_format srt or vttRefused — the recognition produces no per-segment timestamps
speed other than 1Refused — the local voices speak at their own pace
language naming another languageRefused — Aleph speaks the one language set in Setup (a regional variant of it is fine)
prompt or a non-zero temperatureRefused — the recognition takes neither

Audio uploads are capped at 25 MiB. If the models are still starting up, a request answers 503 — wait and retry.