microsoft / Windows-universal-samples

API samples for the Universal Windows Platform.
MIT License
9.53k stars 7.98k forks source link

Inputting voice fails to produce results #1385

Closed shirobusa1997 closed 1 year ago

shirobusa1997 commented 1 year ago

Which sample are you reporting a bug in?

Example: PredefinedDictationGrammar

Describe the bug

I am learning English, so I am sure there are many oddities in the text. Sorry to all the support people.

When I run the sample with the sample code unchanged and input audio, I get no results and speech recognition fails. When I try the network with both fixed and mobile lines, there is no change, and the microphone authority is obtained correctly.

I am developing an application in Unity that uses the Windows.Media.SpeechRecognition Runtime API in the same way, but only the speech recognition is not working, including older projects. This leads me to believe that it is a temporary problem on the service side, but is there any fix I can do?

To Reproduce

  1. Download latest samples from this repository
  2. Build and deploy samples for x64 platform in debug mode
  3. Select "4)Predefined Dectation Grammer" from left side menu
  4. Select "日本語 (Japanese)" Language
  5. Push "with UI" button and speech something
  6. Return result "Speech Recognition Failed, Status: Unknown"

Expected behavior Speech recognition should succeed and a string of the input speech should be obtained.

Screenshots image

Configuration OS : Windows 10 22H2 (OS Build 19045.2728) IDE : Visual Studio 2022 Version 17.4.4 Target Version : Windows 10 Version 2004 (10.0; Build 19041)

koizuka commented 1 year ago

Not only with the "4) Predefined Dictation Grammar" but also with the "8) Continuous Dictation," the same phenomenon occurs. This happens not only in Japanese but also in English when tested. I noticed this issue around the evening of April 8th Japan Standard Time, so it has likely been happening since then. Maybe something is going on server-side?

duwenlong2 commented 1 year ago

I also encountered the same problem, and my project has already integrated this feature. But starting from the day before yesterday, I also encountered issues that I couldn't use. I tested the previous sample code and it no longer worked.

kenter1 commented 1 year ago

Same issue and I use WinRT api for the Continous Recognition

naveenrobo commented 1 year ago

Still now same issue. We have a application deployed on production to use the Continuous Dictation. For last 2 days it doesn't seem to work. It is an Unity Application which inturn uses Windows Media Speech Recognizer. We thought it was a issue Unity. Now we checked this sample and this also it is not working.

livioenrico commented 1 year ago
livioenrico commented 1 year ago
RobertVS-MS commented 1 year ago

Hey all... we are currently attempting to track this down and understand more about the problem. We have seen reports of this problem start to resolve over the last couple of days, so if you are still experiencing the problem, please respond back so we can determine an appropriate way to collect additional information from you.

koizuka commented 1 year ago

@RobertVS-MS I tried testing again and the issue still persists in both my product and the Microsoft sample code...

RobertVS-MS commented 1 year ago

@RobertVS-MS I tried testing again and the issue still persists in both my product and the Microsoft sample code...

@koizuka - Are you able to open a case with us via our support teams? You can do that via the following: https://developer.microsoft.com/en-us/windows/support/?tabs=Contact-us

Select the option for UWP App Development. In the case description, you can reference the UWP Speech Sample, the link to this thread and that you are working with RobertVS-MS. What I am ultimately going to need is a few traces, and ideally a time travel debug. Having the case open will allow for me to provide you files to capture these scenarios as well as have you upload these back to us securely.

Let me know if this is possible, and if you do create a case please ping me the case number and I can search for it

livioenrico commented 1 year ago

We are testing every day on numerous different computers, with 32-bit and 64-bit operating systems, in various languages including American English, Italian, and Chinese, with the latest builds of Windows 10 (22H2 19045.2846) and also on less recent builds.

We also test the on-screen keyboard microphone and using the WINDOWS + H keys.

Among the tests, we also use the "SpeechRecognitionAndSynthesis" example found in Microsoft's official SDKs.

We also have applications written by us in CSharp for Desktop and UWP.

In all cases, using the classes of System.Speech.Recognition everything goes well, but the callbacks OnSpeechRecognized and OnSpeechHypothesized are never called.

All these examples worked perfectly on all PCs until a month ago.


If it is useful we opened the following cases: 1052228853 (12 April 2023)
1052363017 (15 April 2023)
1052430024 (17 April 2023)

RobertVS-MS commented 1 year ago

We are testing every day on numerous different computers, with 32-bit and 64-bit operating systems, in various languages including American English, Italian, and Chinese, with the latest builds of Windows 10 (22H2 19045.2846) and also on less recent builds.

We also test the on-screen keyboard microphone and using the WINDOWS + H keys.

Among the tests, we also use the "SpeechRecognitionAndSynthesis" example found in Microsoft's official SDKs.

We also have applications written by us in CSharp for Desktop and UWP.

In all cases, using the classes of System.Speech.Recognition everything goes well, but the callbacks OnSpeechRecognized and OnSpeechHypothesized are never called.

All these examples worked perfectly on all PCs until a month ago.

If it is useful we opened the following cases: 1052228853 (12 April 2023) 1052363017 (15 April 2023) 1052430024 (17 April 2023)

@livioenrico - I'm not fully sure I recognize those case formats. If you can tell me how you submitted them, I can try to figure out where they came from to see if they have additional information

livioenrico commented 1 year ago

They was references to some chats with the Microsoft Technical support.

But there is a good new ! I tested the dictation now and it is working !!! I've tried it already on numerous computers including some 32 bit tablets as well and it works again on all of them.

Tech support told me they would send a patch within a week but they didn't, the system started working again on all the PC without updating them.

So it is clear that the defect was on the server.

Now it would be very helpful to know some references on what they did to fix it. I say this because the same defect had occurred in mid 2021 and also January 2022 and each time it takes many days of searching and trying to fix it.

So it would be helpful to have some precise reference so that we can tell Microsoft what to do next time it happens.

Can any of you ask Microsoft for some reference on what they did to fix it?

koizuka commented 1 year ago

hmm... still not working on my environment....

livioenrico commented 1 year ago

Dear koizuka, where are you ? Have you tested with Windows + H ? Your system is Windows 10 ?

koizuka commented 1 year ago

@livioenrico, I'm in Japan. My system is Windows 10 and, When I press Windows+H, the Microsoft Text Input Application notifies me that dictation cannot be used for the current language (Japanese), so I haven't tested it. In the same environment, I was previously able to use dictation from UWP applications.

livioenrico commented 1 year ago

Ok, the same was for me. But now it works correctly on all the PC in Italy.

Others said it started working again in the past few days but here it still didn't work. So I'm starting to think that there are numerous servers located in various countries and they are restoring them one after another.

And since this happens pretty much every year for a few days I'm starting to think there's something that expires that Microsoft forgets to renew or pay. Then maybe they renew the subscription, they are given the new keys and little by little they restore them on all the servers...

Mine are just guesses but they coincide with the data in our possession.

It would be helpful for Microsoft to say something about this so we can give them references to speed up the restore process next time.

koizuka commented 1 year ago

Sure, then maybe Japan's issue will be fixed soon too. I'll keep an eye on it for a bit.

nmanis commented 1 year ago

Thanks for the updates and this matches what we see in Europe now too (working again). We do have support staff looking at this from Japan side too.

Will update once we do get more information to pass along including what we can advise for root cause.

shirobusa1997 commented 1 year ago

@RobertVS-MS Thank you for your reply.

We are creating an application for UWP (Hololens2), similar to the first post in this Issue, that uses the Windows.Media.SpeechRecognition Runtime API, which is a Windows Runtime API. However, about a week or two ago, the service suddenly became unavailable and the results of the speech recognition could not be obtained from the service.

I also tested with the speech recognition sample "PredefinedDictationGrammar" in the Windows-universal-samples repository, but it is not returning any speech recognition results as well.

I checked again this morning (4/20 AM 9:00 JST), but the condition has not improved.

livioenrico commented 1 year ago

It seems to be resolved for everyone, all around the world, let's hope it doesn't happen again! Unfortunately, it has already happened at least three times (April 2023, January 2022, summer 2021) So let's make a summary to help Microsoft next time.

SYMPTOMS

TESTS TO REPRODUCE THE PROBLEM

NON-WORKING SOLUTIONS Microsoft in these cases suggests various changes but: DO NOT FOLLOW THESE TIPS

HOW THE PROBLEM WAS SOLVED

It would be greatly appreciated if someone from Microsoft could add some references below, so as to facilitate the solution the next time the same problem occurs.

nmanis commented 1 year ago

Microsoft in these cases suggests various changes but: DO NOT FOLLOW THESE TIPS

To be clear, lots of the posts are not Microsoft staff but others in community trying to help each other. We flagged & updated as soon as possible when seeing posts marked as answers in community when should just been that user's comment on what worked for them.

It seems to be resolved for everyone, all around the world, let's hope it doesn't happen again! Unfortunately, it has already happened at least three times (April 2023, January 2022, summer 2021) So let's make a summary to help Microsoft next time.

We are reviewing Japan still as of now. It is mostly resolved at this time though for all other regions.

It would be greatly appreciated if someone from Microsoft could add some references below, so as to facilitate the solution the next time the same problem occurs.

Thanks for write-up. We are looking further on what we can add & comment on thi s here.

koizuka commented 1 year ago

It seems the issue has not yet been resolved in Japan....

nmanis commented 1 year ago

It seems the issue has not yet been resolved in Japan....

Thank you for confirmation & matches what we are debugging. Thanks again & will post back once we get to clear state

RobertVS-MS commented 1 year ago

It seems the issue has not yet been resolved in Japan....

@koizuka Can you try now? We're seeing some of our repros getting resolved now.

koizuka commented 1 year ago

@RobertVS-MS I have checked it. now it's working!

shirobusa1997 commented 1 year ago

To all who participated in this discussion, thank you for your cooperation in this matter. I have confirmed that speech recognition is possible in my environment, both with my own application and with the samples in this repository.

livioenrico commented 1 year ago

Thank you all !!! The quality of voice dictation ( Windows.Media.SpeechRecognition ) is great. It can recognize without errors even in terrible audio conditions. This is an important component that greatly elevates the Windows Systems value!

nmanis commented 1 year ago

Thank you for the reports and assistance.

For root cause, we have determined that an intermediate service component used in the legacy Windows Dictation experience failed to communicate properly with the speech recognition service, thereby causing speech recognition to fail during transcription. Service was fully restored across all regions on 16:40 UTC on 20 Apr. 2023.

RobertVS-MS commented 1 year ago

I don't have permission(s) to close an issue, but please do consider this resolved. If similar symptoms are found in the future, please lets treat it via a new issue.