Start playing speech

From UBot Studio
Jump to: navigation, search

start playing speech is a command that starts playing the speech for the given text and voice.

The Speech Synthesis commands use the Eleven Labs API to generate highly realistic sounding speech. Since there is some lag time in creating the audio, UBot Studio saves the all the audio generated to the hard drive. This way, when you play the speech audio, it can be played immediately instead of needing to wait for it to generate.

The start playing speech command will automatically generate the speech if it is not already generated. If the speech is generated, it will immediately play the generated speech audio.

Note that the script will continue as the audio is playing. If you need the script to pause while the audio plays, use the wait for speech command.

Parameters

Text: The text that you want to convert into speech.

Voice: The voice that you want to use for the speech synthesis. The values in the dropdown are provided by default by Eleven Labs. If you have created or imported other voices, you can manually enter the name of any voice in your account.

Refresh: If set to True, this command will regenerate the audio even if it was previously generated. If set to false, the command will only generate new audio if the audio for the text was not previously generated. It defaults to False.

Example

connect to speech synthesis("your API key")
start playing speech("Hello, UBot Studio!", "Rachel", False)
wait for speech

Please replace "your API key" with your actual API key for Eleven Labs.

In the script provided, "Hello, UBot Studio!" is converted into speech using the "Rachel" voice. The speech is played, and then the script waits for the audio to finish playing.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox