Core concepts
Audio: speech & voice
Transcribe audio to text, synthesize text to speech across 13+ Indian languages, or combine both into a single conversational call.
Speech to text — POST /stt
Transcribe an audio file. Send the file as multipart form data.
bash
curl https://api.tnsaai.com/stt \
-H "x-api-key: $TNSA_API_KEY" \
-F "file=@recording.wav"Response:
json
{
"success": true,
"transcribed_text": "Namaste, how are you today?",
"detected_language": "hi",
"language_probability": 0.97
}Text to speech — POST /tts
Synthesize a text string into an MP3. Fields:
text— the text to convert.language— language code (see below).speaker— voice profile:Daksh,Deekshita,Sita, orRam.
bash
curl https://api.tnsaai.com/tts \
-H "x-api-key: $TNSA_API_KEY" \
-F "text=Namaste, aap kaise hain?" \
-F "language=hi" \
-F "speaker=Ram"Supported languages
| Code | Language |
|---|---|
| en | English |
| hi | Hindi |
| te | Telugu |
| ta | Tamil |
| kn | Kannada |
| ml | Malayalam |
| mr | Marathi |
| gu | Gujarati |
| bn | Bengali |
| pa | Punjabi |
| or | Odia |
| as | Assamese |
| ur | Urdu |
Conversational voice — POST /audio-text-speech-pro
Combines transcription, NGen reasoning, and speech synthesis into a single call to minimize round-trip latency for voice assistants. Send audio in, get a spoken reply (plus text) back.