microsoft / BotFramework-WebChat

A highly-customizable web-based client for Azure Bot Services.
https://www.botframework.com/
MIT License
1.59k stars 1.54k forks source link

Switch from Bing Speech API to Speech Services in Web Chat #1217

Closed thejasondt closed 5 years ago

thejasondt commented 6 years ago

I am using the following code in the webchat:

const speechOptions = {
    speechRecognizer: new CognitiveServices.SpeechRecognizer({ subscriptionKey: 'YOUR_COGNITIVE_SPEECH_API_KEY' }),
    speechSynthesizer: new CognitiveServices.SpeechSynthesizer({
      gender: CognitiveServices.SynthesisGender.Female,
      subscriptionKey: 'YOUR_COGNITIVE_SPEECH_API_KEY',
      voiceName: 'Microsoft Server Speech Text to Speech Voice (en-US, JessaRUS)'
    })
  };

from:

https://docs.microsoft.com/en-gb/azure/bot-service/bot-service-channel-connect-webchat-speech?view=azure-bot-service-3.0

However, I have been told to switch from Bing Speech API to Speech Services API.

I am unsure where I can find documentation on how to do so in my bot service webchat.

I have tried using my new Speech Services API Key but it doesn't work.

Is there documentation on how to do so with the new API?

compulim commented 6 years ago

It's on roadmap, but it might not hit Web Chat v3. Speech Services team just GA and release their SDK on 9/24 and we are busy GA-ing Web Chat v4.

The missing piece: convert Speech Services SDK into W3C Web Speech API ponyfill, then consume it in Web Chat (targeting v4). Web Chat v4 support anything that is compliant to the W3C standard.

Since Web Chat v3 also support W3C Web Speech API, the ponyfill might just works in v3 too. But until the missing piece is done, I can't surely tell how it works in v3.

thejasondt commented 6 years ago

OK, will stick with Bing Speech API for now

UsamaAslam commented 6 years ago

I'm creating a bot which accept text and voice input and also can answer in both mode. The bot works really good but i have to click always the button of microphone to speak with the bot. Do you know it is possible to make microphone always on and to recognize the voice without clicking the button of microphone ?

@compulim @sgellock

deva96 commented 5 years ago

Hey i cant even create a bing speech api service now ?

stevkan commented 5 years ago

@UsamaAslam, the 'always on' microphone feature is being reviewed for v4. There is no ETA at this time. You can review the current discussion in issue #859. Hopefully this answers some of your questions. For v3, there is no out-of-the-box functionality

corinagum commented 5 years ago

This is being tracked over at #1336

compulim commented 5 years ago

@UsamaAslam we created a new issue #1401 for the "always-on microphone".

saurav2107 commented 5 years ago

Hi Team, Is there any update on using Speech Services in Web Chat v3, can you please point me to the solution.

TestUsetGitHubUser commented 5 years ago

@compulim is speech service now supported on Web Chat(directline) v4(or v3) using client side, if yes can we have any sample?

Thanks,

soso-maitha commented 5 years ago

I am using the following code in the webchat:

const speechOptions = {
    speechRecognizer: new CognitiveServices.SpeechRecognizer({ subscriptionKey: 'YOUR_COGNITIVE_SPEECH_API_KEY' }),
    speechSynthesizer: new CognitiveServices.SpeechSynthesizer({
      gender: CognitiveServices.SynthesisGender.Female,
      subscriptionKey: 'YOUR_COGNITIVE_SPEECH_API_KEY',
      voiceName: 'Microsoft Server Speech Text to Speech Voice (en-US, JessaRUS)'
    })
  };

from:

https://docs.microsoft.com/en-gb/azure/bot-service/bot-service-channel-connect-webchat-speech?view=azure-bot-service-3.0

However, I have been told to switch from Bing Speech API to Speech Services API.

I am unsure where I can find documentation on how to do so in my bot service webchat.

I have tried using my new Speech Services API Key but it doesn't work.

Is there documentation on how to do so with the new API?

so is there any documentation for the steps to migrate from Bing Speech to new Speech Service? We have the same case and speech stopped working. We are using same javascript code, I created a new Speech Service and changed the keys but still not working.

Kindly advise as i need it importantly.

regards,

corinagum commented 5 years ago

@TestUsetGitHubUser, @soso-maitha, please take a look at our speech samples for Cognitive Services Speech Services implementation of Web Chat.