Text To Speech
Legacy Text to Speech
Text to Speech (RunPod)
deprecated
RunPod Text-to-Speech endpoint.
Converts input text to speech audio using a specified speaker voice.
This endpoint uses the RunPod inference server for TTS generation.
Args:
request (Request): The incoming HTTP request object (required for rate limiting).
tts_request (TTSRequest): The request body containing text, speaker ID, and synthesis parameters.
background_tasks (BackgroundTasks): FastAPI background tasks for logging.
current_user (User): The authenticated user making the request.
Returns:
dict: A dictionary containing the generated speech audio with signed URL and metadata.
Raises:
BadRequestError: For invalid input parameters.
ValidationError: For invalid speaker_id, temperature, or max_new_audio_tokens.
ServiceUnavailableError: If the service is unavailable due to timeout.
ExternalServiceError: For connection errors or worker errors.
Speaker IDs:
241: Acholi (female)
242: Ateso (female)
243: Runyankore (female)
245: Lugbara (female)
246: Swahili (male)
248: Luganda (female)
Example Response:
{
"output": {
"audio_url": "https:...",
"blob": "tts/20251003082338_f2ff97b3-9cb9-42fb-850d-0657f51e539e.mp3",
"sample_rate": 16000
}
}
POST
Text To Speech
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
Response
Successful Response

