Text to Speech

POST

The official Python API for Deeptune. Deeptune brings the most human-like text to speech and voice cloning technology to your project in only a few lines of code.

Request

This endpoint expects an object.
textstringRequired

The text to be converted to speech.

voicestringRequired

Voice ID to be used, you can use the API or https://app.deeptune.com to browse voices and clone your own.

language_codestringOptional

Language code used to specify language/accent for the model, see supported languages. If not specified, language is auto-detected.

seedintegerOptional

Assuming all other properties didn’t change, a fixed seed should always generate the exact same audio file.

output_formatstringOptionalDefaults to mp3_44100_192

Output audio format. Must be one of the following:

  • mp3_44100_192 - MP3 with 44.1kHz sample rate at 192kbps
  • mp3_44100_128 - MP3 with 44.1kHz sample rate at 128kbps
  • mp3_44100_96 - MP3 with 44.1kHz sample rate at 96kbps
  • mp3_44100_64 - MP3 with 44.1kHz sample rate at 64kbps
  • mp3_44100_32 - MP3 with 44.1kHz sample rate at 32kbps
  • mp3_22050_32 - MP3 with 22.05kHz sample rate at 32kbps
  • wav_44100 - WAV with 44.1kHz sample rate
  • wav_24000 - WAV with 24kHz sample rate
  • wav_22050 - WAV with 22.05kHz sample rate
  • wav_16000 - WAV with 16kHz sample rate

Response

This endpoint returns a file.