Microsoft Cognitive Speech - Text To Speech

 
#1

Hello y'all,
I've created a C# project and I'm already able to do basically the same as the Bing Speech Recognition plugin does, but I also need to make my EZ-B (JD) "speaks" in another language. I've installed a Microsoft voice, but that's a pretty bad one, and the Azure platform offers two very nice voices to be used.

Right now I'm stuck with how I send the voice received from Azure to the EZ-B. Azure offers a variety of audio formats.

Has anyone tried this before? I've gone through some of the tutorials in the SDK but couldn't find one that does something like that.

Thanks!
Gilvan

#2

HTML5 Speech Synthesis works pretty good and has a variety of voices to offer...

https://stackoverflow.com/questions/25336428/html5-speech-synthesis?rq=1

#3
#4

Thanks @Mickey666Maus, that sounds great. But my question is on how to send the audio received to the EZ-B. I guess I'd have the same problem there.

#5

@Gilvan,

Check the UniversalBot code
http://www.ez-robot.com/EZ-Builder/UniversalBot

Browsing the code you have information needed to send the sound data to EZB.

I've done that before, but i can't find the code.

#6

This is related to the Microsoft Cognitive API, maybe DJ is working or will be working to support that feature too.

@DJ ?

#7

@Mickey666Maus,

The api you mentioned

javascript example code:

Code:


var speech = new SpeechSynthesisUtterance('Ola Brazil!');
speech.lang = 'pt-BR';
window.speechSynthesis.speak(speech);



is only supported within the browser (not all) although chrome handles pretty well.

some complains:
http://ejb.github.io/2015/06/07/html5-speech-synthesis-api.html

even if you manage to launch the chrome engine (v8) like EZ-Builder does with blocky editor, you don't have a way to extract the voice sound.

https://stackoverflow.com/questions/21905583/record-html5-speechsynthesisutterance-generated-speech-to-file

Still a neat idea for the web...

#8

@ptp the api works quiet well...and to me it is kind of a good work around to get different voices and languages going. But you are totally right, it is only working from within a browser, so I was kind of pointing to the wrong direction I guess!

This is a working example of a web based client! Which can also send data over to EZ-Builder, but cannot be called from within EZ-Builder!

http://www.downtown-tattoo.de/robotics/test123.html

#9

To connect to the EZ-Builders server you would just have to make an XMLHttpRequest(); to call eg a ControlCommand() in EZ-Builder...

But the limitation is clearly that EZ-Builder cannot send data to the browser I guess?
At least I did not find a solution on this! Smile

#10

I updated the plugin tutorial to include instructions on how to output audio: http://www.ez-robot.com/Tutorials/UserTutorials/146/24

I also created a plugin with complete example and source code: http://www.ez-robot.com/EZ-Builder/Plugins/view/202