Overview
The GistMag Text-to-Speech API converts text into natural-sounding speech using KittenTTS (local, English) and Google Cloud Text-to-Speech (all other languages). It also provides Speech-to-Text transcription using the OpenAI Whisper API. The API supports multiple languages, multiple voices, streaming, background music, and high-quality audio transcription.Features
Basic TTS
Convert text to speech with a simple API call
Streaming
Stream audio in real-time as it’s generated
Batch Processing
Process long text in batches with pauses
With Music
Generate speech with background music
Speech-to-Text
Transcribe audio files to text
Change Speed
Adjust playback speed of audio files
Add Music
Add background music to existing audio
Voices
Browse and select from KittenTTS and Google Cloud voices
Languages
List all supported languages
Supported Languages
The TTS API supports multiple languages, including:- English (en)
- Spanish (es)
- French (fr)
- German (de)
- Italian (it)
- Portuguese (pt)
- Japanese (ja)
- Korean (ko)
- Chinese (zh)
Audio Formats
- Input: Text (plain string)
- Output: WAV (uncompressed) or MP3 (compressed) audio files
- Streaming: MP3 format for efficient streaming
Engines
Text-to-Speech
TTS runs on two engines, and requests are routed automatically — you never have to pick one:
How routing works:
- Naming a voice selects its engine — the eight names above run on KittenTTS, anything else is a Google voice.
- With no voice named, English uses KittenTTS and other languages use Google.
- Setting
pitchorvolume_gain_dbroutes to Google, since KittenTTS has no equivalent.
provider field ("kitten" or
"google") on /tts, /tts/stream, /tts/batch and /tts/with-music.
Selecting a KittenTTS voice while also setting
pitch or volume_gain_db will
ignore those two parameters — the named voice takes priority. Omit the voice
name to have the request routed to Google instead.GET /tts/providers reports which engines are currently available.
Speech-to-Text
The API uses OpenAI Whisper API for STT, which provides:- High-accuracy transcription with automatic language detection
- Support for many audio formats (MP3, WAV, M4A, FLAC, OGG, etc.)
- Multi-language support with automatic language detection
- Robust handling of various accents and audio qualities