Bing Speech Stopped working on WinRT 8.1 Store App

89 views Asked by At

I'm currently working on a WinRT 8.1 Store app and in this app i'm using Bing.Speech SDk, which was working fine about a month before. But now it stopped working. I can't find it work now.

Here is the code.

using Bing.Speech;

 public async void GetSpeechText()
        {
            var credentials = new SpeechAuthorizationParameters();
            credentials.ClientId = "ClientID";
            credentials.ClientSecret = "My Secret";
            SpeechRecognizer SR = new SpeechRecognizer("en-US", credentials);

            var result = await SR.RecognizeSpeechToTextAsync();
            if (result.TextConfidence != SpeechRecognitionConfidence.Low)
            {
                lblError.Text = "";
                txtBox.Text = string.IsNullOrEmpty(result.Text) ? "" : result.Text.Trim('.');
            }
}

Please guide me

Thanks

1

There are 1 answers

0
Cherry Bu - MSFT On

Firstly, please check your Client ID and Client Secret are all correct, you can go the Windows Azure Marketplace Developers page and click the Register button.

Note: you may notice the red banner at the top of the page “DataMarket and Data Services are being retired and will stop accepting new orders after 12/31/2016. Existing subscriptions will be retired and cancelled starting 3/31/2017. Please reach out to your service provider for options if you want to continue service.”

Then please make sure you have configured your project for speech recognition.

  1. Right-click the Package.appxmanifest file and select View code add a Capabilities section
<Capabilities>
<Capability Name="internetClient" />
<DeviceCapability Name="microphone" />

  1. Immediately after the Capabilities section and add the Extensions section
<Extensions>
<Extension Category="windows.activatableClass.inProcessServer">
<InProcessServer>
   <Path>Microsoft.Speech.VoiceService.MSSRAudio.dll</Path>
  <ActivatableClass  ActivatableClassId="Microsoft.Speech.VoiceService.MSSRAudio.Encoder" ThreadingModel="both" />
</InProcessServer>
</Extension>
<Extension Category="windows.activatableClass.proxyStub">
<ProxyStub ClassId="5807FC3A-A0AB-48B4-BBA1-BA00BE56C3BD">
  <Path>Microsoft.Speech.VoiceService.MSSRAudio.dll</Path>
  <Interface Name="IEncodingSettings" InterfaceId="C97C75EE-A76A-480E-9817-D57D3655231E" />
</ProxyStub>
</Extension>
<Extension Category="windows.activatableClass.proxyStub">
<ProxyStub ClassId="F1D258E4-9D97-4BA4-AEEA-50A8B74049DF">
  <Path>Microsoft.Speech.VoiceService.Audio.dll</Path>
  <Interface Name="ISpeechVolumeEvent" InterfaceId="946379E8-A397-46B6-B9C4-FBB253EFF6AE" />
  <Interface Name="ISpeechStatusEvent" InterfaceId="FB0767C6-7FAA-4E5E-AC95-A3C0C4D72720" />
</ProxyStub>
</Extension>
 </Extensions>

Since “DataMarket and Data Services are being retired and will stop accepting new orders after 12/31/2016. Existing subscriptions will be retired and cancelled starting 3/31/2017”, I suggest you use the WinRT Speech API.

More info , you can refer to how to register speech and how to enable a project for speech recognition.