Skip to main content
POST
/
api
/
v1
/
voice
/
synthesize
Convert text to speech audio using specified voice and configuration
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    text: '<string>',
    voiceId: '<string>',
    model: '<string>',
    language: '<string>',
    provider: '<string>',
    speed: 123,
    vendorSpecific: {},
    inlinePronunciationRules: [{text: '<string>', alias: '<string>'}],
    pronunciationDictionaryId: '<string>'
  })
};

fetch('https://blackbox.dasha.ai/api/v1/voice/synthesize', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
"<string>"

Body

Text synthesis configuration with voice, speed, and provider settings

Request DTO for TTS synthesis operations

text
string
required

Text to synthesize into speech

Required string length: 1 - 5000
voiceId
string
required

Voice ID to use for synthesis

Minimum string length: 1
model
string | null
required

Model to use for synthesis

language
string
required

Language code for synthesis

Minimum string length: 1
provider
string
required

TTS provider name

Minimum string length: 1
speed
number<double>
vendorSpecific
object

Provider-specific configuration options

inlinePronunciationRules
object[] | null

Inline pronunciation rules for preview support. These rules are applied during synthesis without being stored in a dictionary.

Base class for pronunciation rules using the discriminator pattern. Uses TypeIndicatorConverter for polymorphic JSON serialization.

pronunciationDictionaryId
string | null

Pronunciation dictionary ID to use for synthesis. When provided, the dictionary rules will be applied during synthesis.

Response

Returns the synthesized audio as MP3

The response is of type file.