Mandala
Tools

Text-to-Speech

Convert text to speech using AI voices

Usage Instructions

Generate natural-sounding speech from text using state-of-the-art AI voices from OpenAI, Deepgram, ElevenLabs, Cartesia, Google Cloud, Azure, and PlayHT. Supports multiple voices, languages, and audio formats.

Tools

tts_openai

Convert text to speech using OpenAI TTS models

Input

ParameterTypeRequiredDescription
textstringYesThe text to convert to speech
apiKeystringYesOpenAI API key
modelstringNoTTS model to use (tts-1, tts-1-hd, or gpt-4o-mini-tts)
voicestringNoVoice to use (alloy, ash, ballad, cedar, coral, echo, marin, sage, shimmer, verse)
responseFormatstringNoAudio format (mp3, opus, aac, flac, wav, pcm)
speednumberNoSpeech speed (0.25 to 4.0, default: 1.0)

Output

ParameterTypeDescription
audioUrlstringURL to the generated audio file
audioFilefileGenerated audio file object
durationnumberAudio duration in seconds
characterCountnumberNumber of characters processed
formatstringAudio format
providerstringTTS provider used

tts_deepgram

Convert text to speech using Deepgram Aura

Input

ParameterTypeRequiredDescription
textstringYesThe text to convert to speech
apiKeystringYesDeepgram API key
modelstringNoDeepgram model/voice (e.g., aura-asteria-en, aura-luna-en)
voicestringNoVoice identifier (alternative to model param)
encodingstringNoAudio encoding (linear16, mp3, opus, aac, flac)
sampleRatenumberNoSample rate (8000, 16000, 24000, 48000)
bitRatenumberNoBit rate for compressed formats
containerstringNoContainer format (none, wav, ogg)

Output

ParameterTypeDescription
audioUrlstringURL to the generated audio file
audioFilefileGenerated audio file object
durationnumberAudio duration in seconds
characterCountnumberNumber of characters processed
formatstringAudio format
providerstringTTS provider used

tts_elevenlabs

Convert text to speech using ElevenLabs voices

Input

ParameterTypeRequiredDescription
textstringYesThe text to convert to speech
voiceIdstringYesThe ID of the voice to use
apiKeystringYesElevenLabs API key
modelIdstringNoModel to use (e.g., eleven_monolingual_v1, eleven_turbo_v2_5, eleven_flash_v2_5)
stabilitynumberNoVoice stability (0.0 to 1.0, default: 0.5)
similarityBoostnumberNoSimilarity boost (0.0 to 1.0, default: 0.8)
stylenumberNoStyle exaggeration (0.0 to 1.0)
useSpeakerBoostbooleanNoUse speaker boost (default: true)

Output

ParameterTypeDescription
audioUrlstringURL to the generated audio file
audioFilefileGenerated audio file object
durationnumberAudio duration in seconds
characterCountnumberNumber of characters processed
formatstringAudio format
providerstringTTS provider used

tts_cartesia

Convert text to speech using Cartesia Sonic (ultra-low latency)

Input

ParameterTypeRequiredDescription
textstringYesThe text to convert to speech
apiKeystringYesCartesia API key
modelIdstringNoModel ID (sonic-english, sonic-multilingual)
voicestringNoVoice ID or embedding
languagestringNoLanguage code (en, es, fr, de, it, pt, etc.)
outputFormatjsonNoOutput format configuration (container, encoding, sampleRate)
speednumberNoSpeed multiplier
emotionarrayNoEmotion tags for Sonic-3 (e.g., ['positivity:high'])

Output

ParameterTypeDescription
audioUrlstringURL to the generated audio file
audioFilefileGenerated audio file object
durationnumberAudio duration in seconds
characterCountnumberNumber of characters processed
formatstringAudio format
providerstringTTS provider used

tts_google

Convert text to speech using Google Cloud Text-to-Speech

Input

ParameterTypeRequiredDescription
textstringYesThe text to convert to speech
apiKeystringYesGoogle Cloud API key
voiceIdstringNoVoice ID (e.g., en-US-Neural2-A, en-US-Wavenet-D)
languageCodestringYesLanguage code (e.g., en-US, es-ES, fr-FR)
genderstringNoVoice gender (MALE, FEMALE, NEUTRAL)
audioEncodingstringNoAudio encoding (LINEAR16, MP3, OGG_OPUS, MULAW, ALAW)
speakingRatenumberNoSpeaking rate (0.25 to 2.0, default: 1.0)
pitchnumberNoVoice pitch (-20.0 to 20.0, default: 0.0)
volumeGainDbnumberNoVolume gain in dB (-96.0 to 16.0)
sampleRateHertznumberNoSample rate in Hz
effectsProfileIdarrayNoEffects profile (e.g., ['headphone-class-device'])

Output

ParameterTypeDescription
audioUrlstringURL to the generated audio file
audioFilefileGenerated audio file object
durationnumberAudio duration in seconds
characterCountnumberNumber of characters processed
formatstringAudio format
providerstringTTS provider used

tts_azure

Convert text to speech using Azure Cognitive Services

Input

ParameterTypeRequiredDescription
textstringYesThe text to convert to speech
apiKeystringYesAzure Speech Services API key
voiceIdstringNoVoice ID (e.g., en-US-JennyNeural, en-US-GuyNeural)
regionstringNoAzure region (e.g., eastus, westus, westeurope)
outputFormatstringNoOutput audio format
ratestringNoSpeaking rate (e.g., +10%, -20%, 1.5)
pitchstringNoVoice pitch (e.g., +5Hz, -2st, low)
stylestringNoSpeaking style (e.g., cheerful, sad, angry - neural voices only)
styleDegreenumberNoStyle intensity (0.01 to 2.0)
rolestringNoRole (e.g., Girl, Boy, YoungAdultFemale)

Output

ParameterTypeDescription
audioUrlstringURL to the generated audio file
audioFilefileGenerated audio file object
durationnumberAudio duration in seconds
characterCountnumberNumber of characters processed
formatstringAudio format
providerstringTTS provider used

tts_playht

Convert text to speech using PlayHT (voice cloning)

Input

ParameterTypeRequiredDescription
textstringYesThe text to convert to speech
apiKeystringYesPlayHT API key (AUTHORIZATION header)
userIdstringYesPlayHT user ID (X-USER-ID header)
voicestringNoVoice ID or manifest URL
qualitystringNoQuality level (draft, standard, premium)
outputFormatstringNoOutput format (mp3, wav, ogg, flac, mulaw)
speednumberNoSpeed multiplier (0.5 to 2.0)
temperaturenumberNoCreativity/randomness (0.0 to 2.0)
voiceGuidancenumberNoVoice stability (1.0 to 6.0)
textGuidancenumberNoText adherence (1.0 to 6.0)
sampleRatenumberNoSample rate (8000, 16000, 22050, 24000, 44100, 48000)

Output

ParameterTypeDescription
audioUrlstringURL to the generated audio file
audioFilefileGenerated audio file object
durationnumberAudio duration in seconds
characterCountnumberNumber of characters processed
formatstringAudio format
providerstringTTS provider used

Notes

  • Category: tools
  • Type: tts
Text-to-Speech