Build Bots That Talk Like Humans – Speech Synthesis UBot Studio
Today we’re diving into the new speech synthesis commands in UBot Studio Enterprise Edition.
We have integrated Eleven Labs, which is, at the time of writing, generally considered to be the highest quality speech synthesis ever created. Let’s find out if it lives up to the hype!
To start, I used some random inspirational text generated by chat GPT. After hitting ‘generate’, the synthesized speech was impressively human-like. If I didn’t know better, it would be pretty hard to differentiate it from a real human voice.
Now, let’s get into the nitty-gritty of how to use this feature in UBot Studio.
After opening UBot Studio and navigating to the public bot bank, select ‘speech synthesis’. Start with the ‘connect to speech synthesis’ command and enter your API key (you can find this on the 11 Labs website under your profile).
Once connected, we can start playing around with the various commands.
The ‘start playing speech’ command allows you to input text and listen to the synthesized speech. To ensure the script doesn’t continue playing while speaking, don’t forget to include the ‘wait for speech’ command.
You may notice a slight lag between hitting run and the start of the speech. However, the second time you hit run, the speech begins instantly. This is because the system generates the audio and saves it to the hard drive. If you play the same bit of speech again, it simply plays the already saved file.
If you want to regenerate the audio file each time, you can set the ‘refresh’ parameter to true. This means each time you run the command, the speech will sound slightly different as it generates a new file.
If you want to generate the files without playing them immediately, use the ‘generate speech’ command. This is particularly useful if you have a large amount of text to generate and want to play it in real time later.
You can also save the audio to a file using the ‘save to speech file’ command. Lastly, the ‘voice’ parameter allows you to select from a dropdown of default 11 Labs voices or manually enter the name of any voice set up in your account.
The new generation of speech synthesis in UBot Studio Enterprise Edition is a significant leap forward. It offers computer voices that sound strikingly like real people. So go ahead, explore and enjoy this new feature.
See you next time!
Here’s the code:
connect to speech synthesis("your eleven labs key")
start playing speech("Imagine a world where you\'re not bound by the limitations of time and manual labor. A world where you can automate repetitive tasks, freeing up your time to focus on what truly matters. That\'s the world Ubot Studio opens up for you. It\'s a world where efficiency meets creativity, where technology serves humanity, and where the only limit is your imagination.","Rachel","False")
wait for speech