Audio
Audio tools
Speech to text, voice changer, dubbing, dialogue and sound effects.
These /api/v1/* endpoints accept JSON with a public audio_url / source_url. (The non-v1 paths — /api/speech-to-text, /api/voice-changer, /api/dubbing — still accept a direct multipart/form-data file upload.) Auth: Authorization: Bearer sk_... or X-API-Key. Credits are charged per use and refunded on failure.
POST/api/v1/stt— Speech to Text
Transcribe audio to text (returns JSON + SRT transcript URLs). Source ≤200MB. 1,000 credits/minute.
curl -X POST "https://www.dubvoice.ai/api/v1/stt" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "audio_url": "https://example.com/audio.mp3" }'POST/api/v1/voice-changer— Voice Changer
Transform the voice in an audio file into a target ElevenLabs voice (target_voice_id is a bare ElevenLabs voice id; Minimax, Edge and cloned voices are not accepted). 2,000 credits/minute.
curl -X POST "https://www.dubvoice.ai/api/v1/voice-changer" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "audio_url": "https://example.com/source.mp3", "target_voice_id": "LB3SchLS4lHotJg4GcZW" }'POST/api/v1/dubbing— Auto Dubbing
Dub audio into a target language (returns dubbed audio + SRT). Source: MP3 or M4A only, ≤20MB or 5 min. 30,000 credits per task. Optional voice_id (a provider-prefixed id from /api/v1/voices, e.g. elevenlabs_...) is forwarded and applied: it adds a second, voice-replacement output spoken by that voice for 25% more credits.
curl -X POST "https://www.dubvoice.ai/api/v1/dubbing" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "source_url": "https://example.com/speech.mp3", "target_lang": "tr" }'POST/api/v1/dialogue— Text to Dialogue
Render a multi-speaker dialogue: each segment is synthesized with its own voice and concatenated. Provider minimax (default) or edge. Credits charged per segment; if a segment fails, the credits for the segments that succeeded are refunded too.
curl -X POST "https://www.dubvoice.ai/api/v1/dialogue" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "provider": "minimax", "segments": [
{ "voice_id": "209533299589184", "text": "Hello, how are you?" },
{ "voice_id": "209533299589198", "text": "I am doing great, thanks!" }
] }'POST/api/sound-effect— Sound Effects
Turn a description into a short sound effect. Synchronous: the response is JSON { "success": true, "audio_url": "https://...mp3", "audio_urls": ["https://...mp3"], "credit_cost": 750, "duration_seconds": 5, "model": "v3" } pointing at the finished MP3s. 150 credits per requested second (minimum 300), or 600 credits when duration_seconds is omitted and the model picks the length, for each sound effect.
curl -X POST "https://www.dubvoice.ai/api/sound-effect" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "text": "Thunder rolling with heavy rain", "duration_seconds": 5, "prompt_influence": 0.3, "loop": false, "model": "v3", "quantity": 2 }'duration_seconds 0.5–30 (omit for auto), prompt_influence 0–1 (higher sticks closer to the description), loop makes the clip tile seamlessly, model is v3 (default) or v2, quantity 1–4 returns that many takes in audio_urls. If some takes fail, the rest are returned, their credits are refunded and warning says how many. Text ≤450 characters.
Pronunciation dictionaries
A dictionary is a saved list of find/replace rules applied to the text just before synthesis, so a brand name or acronym is spoken the way you want on every voice provider. Pass its id to /api/v1/tts as pronunciation_dictionary_id; the text you send is stored and returned unchanged, only the audio differs.
# Create
curl -X POST "https://www.dubvoice.ai/api/pronunciation-dictionaries" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "name": "Brand names", "rules": [
{ "from": "AI", "to": "Ey Ay", "matchType": "word", "caseSensitive": true }
] }'
# List / read / update / delete
curl "https://www.dubvoice.ai/api/pronunciation-dictionaries" -H "Authorization: Bearer sk_..."
curl -X PUT "https://www.dubvoice.ai/api/pronunciation-dictionaries/<id>" ...
curl -X DELETE "https://www.dubvoice.ai/api/pronunciation-dictionaries/<id>" ...
# Dry-run a rule set without saving it
curl -X POST "https://www.dubvoice.ai/api/pronunciation-dictionaries/preview" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "text": "AI voices", "rules": [{ "from": "AI", "to": "Ey Ay", "matchType": "word", "caseSensitive": true }] }'matchType: word (whole words only, Unicode-aware) or contains (anywhere). Max 200 rules per dictionary, 200 characters per side. Rules run in order.