๐ฏ Supernal TTS Quick Reference
Click to copy this entire guide to your clipboard, then paste it into your LLM conversation to give it complete instructions for integrating Supernal TTS.
๐ Quickstart Commandsโ
# Test without API keys
curl -X POST https://tts.supernal.ai/api/v1/generate \
-H "Content-Type: application/json" \
-d '{"text": "Hello!", "options": {"provider": "mock"}}'
# Compare all providers
./demo-scripts/compare-all-providers.sh "Test text"
# Open interactive demo
open demo-scripts/demo.html
๐ Provider Cheat Sheetโ
| Provider | Latency | Cost/1M | Best For | Key Feature |
|---|---|---|---|---|
mock | 500ms | $0 | Testing | No API key |
openai | 200ms | $15-30 | Quality | 8 voices + instructions |
cartesia | Low latency | ~$24 | Real-time | Emotions |
azure | 300ms | $0-16 | Budget | 500K free |
๐ค Voice Optionsโ
// OpenAI
['alloy', 'echo', 'fable', 'onyx', 'nova', 'shimmer', 'coral']
// Cartesia
['barbershop-man', 'broadway-diva', 'confident-british-man',
'doctor-mischief', 'friendly-sidekick']
// Azure
['en-US-JennyNeural', 'en-US-GuyNeural', 'en-US-AriaNeural']
// Mock
['mock-voice-1', 'mock-voice-2', 'mock-voice-3']
๐ง Environment Variablesโ
# Required for providers
OPENAI_API_KEY=sk-...
CARTESIA_API_KEY=...
AZURE_API_KEY=...
AZURE_REGION=eastus
# Optional
ENABLE_MOCK_PROVIDER=true
DEFAULT_PROVIDER=openai
CACHE_DIR=.tts-cache
PORT=3030