Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by YuKairi · Sep 01, 2016 at 05:14 PM · unity 5crashspeechrecognition

Creating a KeywordRecognizer makes Unity crash

Hi !

I am currently trying to develop a project using both Speech Recognition and the Oculus Rift DK1.

I developed the speech recognition part by using the KeywordRecognizer from Unity Scripting API (Note : I'm working on Windows 10). It worked well and I was able to detect words and do an action depending on the recognized word.

After that, I installed the Oculus Runtime for Windows V0.8.0.0-beta which also required me to install an NVIDIA graphic driver with a version above 358.xx, so I installed the latest version which was 369.09.

Later, when I tried launching my game which already used a KeywordRecognizer, Unity crashed. By crash I mean it did not even freeze for 1 second but I immediately had the message "Unity Editor has stopped working". I tried creating a whole new project with only one script (the one given in the Unity Documentation) :

 [SerializeField]
 private string[] m_Keywords;

 private KeywordRecognizer m_Recognizer;
 
         void Start()
         {
             m_Recognizer = new KeywordRecognizer(m_Keywords);
             m_Recognizer.OnPhraseRecognized += OnPhraseRecognized;
             m_Recognizer.Start();
         }

But it still crashes everytime I launch the game in the Editor. I tried debugging it with Visual Studio, and the problem comes from the following line :

 m_Recognizer = new KeywordRecognizer(m_Keywords);

When Unity crashes, I can debug it and have the following error :

Unhandled exception at 0x77485E93 (ntdll.dll) in Unity.exe: 0xC0000005: Access violation writing location 0x00000040.

I am sure the problem is not coming from the string[] table since I tried several examples given by Unity Documentation or Microsoft Developer Network.

Since it is an access violation error, I thought maybe another process is trying to access the same location in memory at the same time. I uninstalled the Oculus Runtime and driver, and I also uninstalled the NVIDIA driver. It still didn't work. I uninstalled and reinstalled Unity several times, tried launching my script in different versions of Unity (5.4.0f3 - 32 and 64 bits, and 5.4.0b15 - 32 and 64 bits), but nothing works.

I compiled my project and tried launching the .exe file, and the executable also crashed. Then, I put the exact same .exe file on a Surface Pro 3 running under Windows 10, and it worked perfectly.

At this point, since I had no restore points on Windows, I decided to reset my PC (but still keep my files). It still does not work ... The last thing I tried was replacing the Windows.Media.Speech.dll (in C:\Windows\System32) on my computer by the one I found on the Surface Pro, but it didn't help.

I am running out of ideas and I would like to know if anyone already faced this problem or has an idea of something I could try to "repair" Unity, before I reset my PC completely.

EDIT : I tried using a DictationRecognizer instead of a KeywordRecognizer, and the problem is still the same.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by YuKairi · Sep 15, 2016 at 03:46 PM

Okay.

I'm not sure why, but now it works. Here's what happened :

I uninstalled VS 2015 and installed VS Express 2013, and I uninstalled/reinstalled all the VC Redistributable (2010, 2012, 2013, 2015). After that, Unity did not crash anymore but when I wanted to use a KeywordRecognizer it would give me the error "Speech recognition is not available on this machine" (or something like that).

I did nothing else and then today there was a major Windows 10 Update, and now speech recognition works properly. So I guess a dll was corrupted during a previous Update or when I installed new drivers ...

Problem solved. :)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How to make speech recognizer on android? 2 Answers

Adding custom words to DictationRecognizer 1 Answer

Standalone mobile speech to text for Unity? 0 Answers

Unity randomly going unresponsive when importing script changes 0 Answers

Unity closing automatically without any error? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges