Requires Node.js 18+. Install from npm.
Installation
Configuration
Client Options
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | UPLIFTAI_API_KEY env | Your API key |
baseUrl | string | https://api.upliftai.org | API base URL |
timeout | number | 30000 | Request timeout (ms) |
maxRetries | number | 2 | Auto-retries on 429/5xx errors |
Quick Example
Available Methods
Text to Speech
Generate complete audio buffers
Stream TTS
HTTP streaming for low-latency playback
Async TTS
Background jobs with pre-signed URLs
WebSocket TTS
Real-time multiplexed streaming
Speech to Text
Transcribe audio files
Phrase Replacements
Control pronunciation of specific words
Output Formats
| Format | Identifier | Use Case |
|---|---|---|
| WAV | WAV_22050_32 · WAV_22050_16 | Highest quality, larger files |
| MP3 | MP3_22050_128 · MP3_22050_64 · MP3_22050_32 | Compressed, good for web |
| PCM | PCM_22050_16 | Raw audio, WebSocket default |
| ULAW | ULAW_8000_8 | Telephony (Twilio, SIP, PSTN) |
