Generate speech
generate speech is a command that generates speech from the given text, using the specified voice.
The Refresh parameter forces the speech to be regenerated, providing you with an updated version of the synthesized speech.
Parameters
Text: The text that you want to convert into speech.
Voice: The voice that you want to use for the speech synthesis.
Refresh: This parameter forces the regeneration of the speech if set to true. It defaults to false.
Example
connect to speech synthesis("your API key") generate speech("Hello, UBot Studio!", "Alexa", true)
Please replace "your API key" with your actual API key for the speech synthesis service.
In the script provided, "Hello, UBot Studio!" is converted into speech using the "Alexa" voice. The 'refresh' parameter is set to true, meaning that if the speech was previously generated, it will be regenerated.
Always double-check your API key, and handle it carefully due to its sensitivity. An incorrect or exposed key could result in errors or a breach of security. Also, ensure the voice you selected is supported by the speech synthesis service connected.