text_to_speech
Generate MP3 audio from text with customizable language, accent, and speaking rate.
Instructions
Convert text into spoken audio (MP3) using Google TTS (gTTS).
Args:
text: The text to speak. Required, must be non-empty.
language: Language code such as "en", "bn", "es". Defaults to "en".
slow: Speak more slowly when True.
accent: Google domain TLD controlling accent for some languages,
e.g. "com" (US), "co.uk" (UK), "com.au" (AU), "co.in" (India).
output_path: Where to write the MP3. If omitted, a timestamped file
is created under the configured output directory.
Returns:
A human-readable status string including the saved file path, or an
"Error: ..." message describing what went wrong.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slow | No | ||
| text | Yes | ||
| accent | No | com | |
| language | No | en | |
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |