text_to_speech
Convert text to speech with customizable voice, speed, and language options; generate MP3 files with optional S3 upload for efficient audio file management.
Instructions
Convert text to speech using the Kokoro TTS service.
Args:
text: The text to convert to speech
voice: Voice ID to use (default: af_heart)
speed: Speech speed (default: 1.0)
lang: Language code (default: en-us)
filename: Optional filename for the MP3 (default: auto-generated UUID)
upload_to_s3: Whether to upload to S3 if enabled (default: True)
Returns:
A dictionary with information about the generated audio file
Input Schema
Name | Required | Description | Default |
---|---|---|---|
filename | No | ||
lang | No | en-us | |
speed | No | ||
text | Yes | ||
upload_to_s3 | No | ||
voice | No | af_heart |
Input Schema (JSON Schema)
{
"properties": {
"filename": {
"default": null,
"title": "Filename",
"type": "string"
},
"lang": {
"default": "en-us",
"title": "Lang",
"type": "string"
},
"speed": {
"default": 1,
"title": "Speed",
"type": "number"
},
"text": {
"title": "Text",
"type": "string"
},
"upload_to_s3": {
"default": true,
"title": "Upload To S3",
"type": "boolean"
},
"voice": {
"default": "af_heart",
"title": "Voice",
"type": "string"
}
},
"required": [
"text"
],
"title": "text_to_speechArguments",
"type": "object"
}