Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 DerpMerf · Jul 28, 2015 at 10:01 AM · microphonespeech

Microsoft.Speech.dll being finicky

I've installed this version of Microsoft.Speech.dll: http://www.microsoft.com/en-us/download/details.aspx?id=27226, the x86 version. I've imported it into my unity project, and successfully referenced it in code. However, when I run the program, I get this error:

PlatformNotSupportedException: Speech Recognition is not available on this system. SAPI and Speech Recognition engines cannot be found.

Microsoft.Speech.Internal.SapiInterop.SapiRecognizer..ctor (RecognizerType type) Microsoft.Speech.Recognition.SpeechRecognitionEngine.Initialize (Microsoft.Speech.Recognition.RecognizerInfo recognizerInfo) Microsoft.Speech.Recognition.SpeechRecognitionEngine..ctor () FightVoiceManager.Start () (at Assets/Scripts/Managers/FightVoiceManager.cs:10)

Which is interesting, because this is literally the only code I've created for this before testing:

 using UnityEngine;
 using System.Collections;
 using Microsoft.Speech.Recognition;
 
 public class FightVoiceManager : MonoBehaviour {
 
     SpeechRecognitionEngine sre;
 
     void Start() {
         sre = new SpeechRecognitionEngine();
     }
 
 }

It does not give me any console errors at all before clicking Play. My syntax is alright. My references are alright. The editor understands where Microsoft.Speech.Recognition is. I'm completely perplexed. If any help could be had, I'd greatly appreciate it. Thanks!

Comment
Add comment · Show 32
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
avatar image DerpMerf · Jul 28, 2015 at 12:48 PM 0
Share

Somebody! Anybody!

avatar image Dave-Carlile · Jul 28, 2015 at 01:06 PM 0
Share

Does.... does your system support speech recognition?

avatar image DerpMerf · Jul 28, 2015 at 01:06 PM 0
Share

I don't know. How can I find out?

EDIT 1

I've set up my computer for speech, but Unity still claims that it's not, even after reopening Unity.

avatar image CHPedersen · Aug 04, 2015 at 01:27 PM 1
Share

It fails because a short times a short gets converted to an int32 in the background. This is done to prevent overflow, since it's possible to multiply two shorts and arrive at a number too large to be representable by a short.

If you are certain this does not happen in your code, you have the option to explicitly cast the result back to a short:

this._blockAlign = (short)(this._channelCount * (this._bitsPerSample / 8));

But the compiler cannot do this implicitly for you for above reason. So it gives you an error ins$$anonymous$$d.

avatar image DerpMerf · Aug 05, 2015 at 05:09 PM 1
Share

Yes, I did check both the 32-bit and 64-bit versions of the .dll, and neither worked, but I do know that that's a mistake that a lot of people make so I don't blame you. I'm pretty sure that it's a problem with the .NET runtime difference between the .dll and Unity and the SAPI engine I have installed on my computer to Unity, as Unity has a runtime of 2.0, but the .dll is 4.5, which is why I'm updating the .dll. Thanks anyway!

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Can you force Unity to use Oculus microphone? 0 Answers

Microphone Noise Reduction speech enhancement 1 Answer

Microphone to Gameplay mechanics 1 Answer

Dictation Recognizer does not recognize words 0 Answers

Microphone Input In Background 0 Answers


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