text_to_speech
Input: Text to convert to speech, language ID, and voice type.
Output: Returns the URL of the generated audio file.
Functionality: This tool converts text to speech in the specified language and voice. It follows these steps:
Gets user_id from context and validates tokens.
Generates speech from the text using the specified language and voice.
Args: text: The text to convert to speech language_id: The language ID (defaults to "en" for English) voice_id: The voice type (defaults to "female")
Returns: The URL of the generated audio file
INSTRUCTION FOR CLIENT MODEL:
Extract the required input parameter 'text' (type: string) and optional parameters 'language_id' (type: string, default 'en') and 'voice_id' (type: string, default 'female') from the user's prompt.
If 'language_id' or 'voice_id' are not specified, use the default values.
Ignore any extraneous information in the user's input.
Pass the extracted values to this tool as 'text', 'language_id', and 'voice_id'.
RECOMMENDATION: Call get_languages() first to see available language IDs before choosing a language_id.
Example: For user input "Convert 'Hello world' to French with a male voice", extract 'text' as 'Hello world', 'language_id' as 'fr', and 'voice_id' as 'male'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| voice_id | No | female | |
| language_id | No | en |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |