Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.slng.ai/llms.txt

Use this file to discover all available pages before exploring further.

voiceai is a single static binary that wraps the SLNG API. Use it to generate audio, transcribe files, stream over WebSocket, and pipe audio between tools.

Install

curl -fsSL https://slng.ai/install.sh | sh
Verify the install:
voiceai --help
On macOS, the curl-installed binary is unsigned. If the first run is blocked by Gatekeeper, run xattr -d com.apple.quarantine $(which voiceai) or right-click → Open in Finder once.

Authenticate

Get a key from app.slng.ai, then export it in your shell:
export VOICEAI_API_KEY="zpka_..."
Or save it to the CLI config:
voiceai config set api-key zpka_...
The config lives at ~/.config/voiceai/config.json. Environment variables take precedence.

Text-to-speech

Synthesize audio from text. By default the CLI plays the audio and saves a copy to $TMPDIR/voiceai-tts/.
voiceai tts "Hello from sunny Barcelona!" \
  --model slng/deepgram/aura:2-en \
  --voice aura-2-thalia-en \
  --out hello.mp3
Pipe raw audio when stdout is not a terminal:
voiceai tts "stream me" --model slng/deepgram/aura:2-en > out.mp3
Stream chunks over WebSocket for long text or low-latency playback:
voiceai tts "long passage…" --stream | ffplay -

Speech-to-text

Transcribe a file:
voiceai stt micro-machines.wav --model slng/deepgram/nova:3-en
Stream from the microphone:
voiceai stt --stream
Pipe raw PCM from arecord or any source:
arecord -f S16_LE -r 16000 -c 1 | voiceai stt --stream --source stdin

Discover models and voices

voiceai models               # list all models
voiceai voices --model slng/deepgram/aura:2-en

Configuration

Defaults that the CLI reads from ~/.config/voiceai/config.json:
KeyPurpose
api-keyDefault VOICEAI_API_KEY
default-tts-modelModel used when --model is omitted on tts
default-tts-voiceVoice used when --voice is omitted on tts
default-stt-modelModel used when --model is omitted on stt
base-urlOverride the API host (rarely needed)
Set any of them with voiceai config set <key> <value>. Override per-invocation with the matching flag.

Source and releases