Production-ready examples for integrating the Noiz.ai Text-to-Speech API into web apps, mobile clients, games, robots, and media pipelines. Use these samples to evaluate latency, voice quality, and multi-language workflows before you ship.
| Endpoint | Method | Description |
|---|---|---|
/v1/voices |
GET | List voices (custom/built-in) with pagination and search |
/v1/voices |
POST | Clone a voice from an audio file or URL |
/v1/voices/{voice_id} |
GET | Get voice details |
/v1/voices/{voice_id} |
DELETE | Soft-delete a voice |
/v1/text-to-speech |
POST | Text-to-speech with emotion, speed, and format control |
/v1/emotion-enhance |
POST | Auto-annotate text with emotions for expressive speech |
Base URL: https://noiz.ai/v1
Authentication: Send Authorization: <YOUR_API_KEY> on every request.
noizAPIExamples/
├── python/ # Python examples
│ ├── basic/ # Core API usage
│ ├── video_dubbing/ # Video dubbing service
│ ├── game_dubbing/ # Game NPC voice generation
│ ├── short_drama_translation/ # Short drama translation & dubbing
│ ├── robot_voice/ # Robot voice integration
│ ├── smart_assistant/ # Smart assistant / IoT voice
│ ├── audiobook/ # Audiobook production
│ ├── education/ # Education & language learning
│ ├── ivr_system/ # IVR phone system
│ └── content_creation/ # Short video & content creation
│
├── android/ # Android (Kotlin) demo app
│ └── NoizTTSDemo/
│
├── javascript/ # Node.js examples
│ ├── basic/
│ └── streaming/ # Real-time TTS HTTP server
│
├── curl/ # cURL command examples
│ └── examples.sh
│
└── csharp/ # C# / Unity examples
└── UnityGameDubbing/
Sign up at the Noiz.ai developer portal and create an API key.
export NOIZ_API_KEY="your_api_key_here"cd python
pip install -r requirements.txt
python basic/text_to_speech.py
python basic/voice_clone.py
python video_dubbing/video_dubbing_service.py
python game_dubbing/game_npc_voice.pycd javascript
npm install
node basic/text_to_speech.js
node streaming/realtime_tts_server.js # TTS server on port 3100Open android/NoizTTSDemo in Android Studio and add to local.properties:
noiz.api.key=your_api_key_hereexport NOIZ_API_KEY="your_key"
bash curl/examples.sh| Use case | Description | Path |
|---|---|---|
| Video dubbing | Dubbing with subtitle timing and duration control | python/video_dubbing/ |
| Game NPC voices | Character voices with emotion for dialogue and barks | python/game_dubbing/ |
| Short drama / localization | Cross-language dubbing while preserving voice character | python/short_drama_translation/ |
| Robotics | Service, education, and companion robots with caching and queues | python/robot_voice/ |
| Smart assistant | IoT and smart-home voice output | python/smart_assistant/ |
| Audiobooks | Long-form narration with chapter splitting | python/audiobook/ |
| EdTech | Vocabulary drills, dialogue practice, course narration | python/education/ |
| IVR | Phone menus and dynamic status messages | python/ivr_system/ |
| Content creation | Short-form video narration and batch voiceover | python/content_creation/ |
| Unity games | In-game TTS with caching and NPC dialogue | csharp/UnityGameDubbing/ |
- Up to 5,000 characters per request
- Output: WAV / MP3
- Speed control (
speed) - Emotion control (
emo, e.g.{"Sadness":0.2, "Surprise":0.5}) - Multi-language (
zh,en,zh+en, and others per API) - Duration control, silence trimming, similarity enhancement
- Upload WAV / MP3 / M4A or pass a remote URL
- Optional denoising
- Multi-language cloning
- Returns richer text for more expressive TTS
- Do not ship API keys in mobile or browser clients; keep keys on your server or use a backend proxy.
- Prefer environment variables or a secrets manager in CI/CD.
- TTS responses are binary audio streams; handle
Content-Typeand headers such asX-Audio-Durationas documented. - Respect rate limits; add backoff between batch jobs.