Powered by Lightning TTS v3.1 and the new Lightning v3.1 Pro pool.
Generate natural-sounding speech from text using Smallest AI's Lightning TTS API. 80+ voices on standard Lightning v3.1, plus a curated Pro voice catalog across American, British, and Indian accents. 44.1 kHz native sample rate, ~200ms latency.
curl -X POST https://api.smallest.ai/waves/v1/tts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Hello from Smallest AI!", "voice_id": "meher", "model": "lightning_v3.1_pro", "sample_rate": 24000, "output_format": "wav"}' \
--output hello.wavDrop the model field (or set it to "lightning_v3.1") to use the standard pool — that pool has more voices, the full 12-language catalog, plus voice cloning. The unified /waves/v1/tts route serves both.
Get your API key at app.smallest.ai.
Generate speech in under 2 minutes — no setup, no config files:
pip install requests
export SMALLEST_API_KEY="your-api-key-here"
python text-to-speech/quickstart/quickstart.py| Example | Description |
|---|---|
| Quickstart | 5-line hello world — generate speech in under 2 minutes |
| Getting Started | Configurable synthesis with voice, speed, language, output format |
| Voices | List 80+ voices, filter by language/gender/accent, preview any voice |
| Streaming | Real-time audio streaming via SSE and WebSocket |
| Pronunciation Dicts | Custom pronunciation for names, acronyms, and domain terms |
| SDK Usage | Python SDK patterns (coming soon — SDK does not yet support v3.1) |
| Voice Cloning | Instant voice cloning from a short audio sample (coming soon) |
| Example | Description |
|---|---|
| Expressive TTS | Control emotion, pitch, volume, accent — make the same voice happy, angry, whispering, sarcastic |
| Chinese Whispers Game | Same sentence through 5 characters with different emotions/accents — viral shareable demo |
| Example | Description |
|---|---|
| Voice Gallery App | Browse, filter, preview 80+ voices in a web UI. One-click deploy to Vercel. |
| Example | Description |
|---|---|
| Multilingual Translator | Hear any text spoken in English, Hindi, Spanish, and Tamil side by side |
| Podcast Generator | Give it a topic, get a two-host AI podcast (LLM + TTS) |
| Audiobook Generator | Convert any text file into a narrated, chaptered audiobook |
| Voice Explorer | Interactive browser to preview all voices, search by use case or emotion, and play audio inline |
| News Voice App | Web dashboard that groups headlines into story clusters and plays each as a 2-3 min audio summary |
| Language Translation App | Translate text between 40+ languages with TTS and STT — type or speak input, hear results spoken aloud |
For all examples beyond the quickstart, run
uv venv && uv pip install -r requirements.txtat the repo root. See the main README.
export SMALLEST_API_KEY="your-api-key-here"
uv run text-to-speech/getting-started/python/synthesize.py "Hello from Smallest AI!"Standard Lightning v3.1: en English · hi Hindi · mr Marathi · kn Kannada · ta Tamil · bn Bengali · gu Gujarati · te Telugu · ml Malayalam · pa Punjabi · or Odia · es Spanish · auto
Lightning v3.1 Pro: depends on the voice — Indian Pro voices speak en + hi; British and American Pro voices speak en. Query GET /waves/v1/lightning-v3.1/get_voices and read tags.language for the source of truth.
pcm (raw) · wav · mp3 · mulaw