I'm developing an AI to act as a personal assistant which gets Voice Commands from input,Matches them against a preloaded Grammar and do some jobs based on the result. Everything is fine except as I use Microsoft.Speech, It gets used to my voice. So it gets better and better recognizing my voice but it doesn't recognize my wife's voice at all!
So I guess my options are:
1.Dynamically switch profiles.
2.Go with another library.
What should I do?
Any other suggestion would be nice.
I can inject any other library into my Robot if u know a better one.
After searching for a while, I finally used wit.ai speech recognition. It works fine for me at the moment, Except it takes a couple of seconds until it shows me the result. I'm going to use google speech engine as well. I'll let you know if it works better than wit.ai
Related
While building for mobile and PC I've run into issues implementing look scripts that don't interact with UI elements such as a mobile joystick. They created a new input system to manage this and every tutorial seems to have parts of this but never includes other parts that I need. Like perfectly showcases controls but no look script, or has both perfectly but doesn't work with the new input system.
This has been a nightmare, I am not a professional coder, I don't claim to know anything and I have tried reaching out on C# Discord without even being noticed for 2 weeks so I just left. Hopefully someone comes across this some day and sends help.
I will update this if I find a way through it. Thanks everyone.
I know how to make it so it'll trigger to different phrases, but I want one SpeechRecognitionEngine to listen for a wakeup word (example: trigger), then start another Engine to listen for everything until enough silence, and then save what I've said. If this isn't possible with SpeechRecognitionEngine, is there a way to do it in C# with an API of some sorts?
Porcupine has support for C# it runs on Windows, Linux, and macOS at the moment. You can check the quick start on its GitHub repo.
I am making a flashlight application in unity C#. The application is almost complete I just want to add this voice command feature in this like when I say "ON" the flashlight should turn on and when I say " OFF " the flashlight should turn off. The application is for Android devices. I saw several tutorials about calling functions on voice commands but that all were only for windows platform please help me if you know something about doing this in android thanks
I have not used any Speech Recognition tools but its not very difficult to implement if you can create a java plugin & use it to call native function. Anyways I have found few of the SDK:
You can check out the pocket sphinx demos for speech recognition.
https://github.com/cmusphinx/pocketsphinx
https://github.com/cmusphinx/pocketsphinx-android-demo
Here is a repo I found which uses AndroidSpeechRecognition.
https://github.com/gsssrao/UnityAndroidSpeechRecognition
Programmer has given a nice explaination of voice recognition implementation natively:
How to add Speech Recognition to Unity project?
Then there is WatsonSDK for unity but it seems to be via cloud but you can check this one out:
https://github.com/watson-developer-cloud/unity-sdk
And if you dont mind paying for this plugin called Android SpeakNow you can grab it from asset store:
https://assetstore.unity.com/packages/tools/integration/android-speaknow-16781
These are some cloud based packages from asset store, I really doubt you might need this one to implement but in any case this is for someone who may require them at some point of time:
https://assetstore.unity.com/packages/add-ons/machinelearning/google-cloud-speech-recognition-vr-ar-desktop-desktop-72625
https://assetstore.unity.com/packages/tools/integration/yandex-cloud-speech-recognition-vr-ar-mobile-desktop-75155
And finally DictationRecognizer; by default this one is available only for windows 10 as of Unity 2018.2. So this is out of question. My best bet would be cmusphinx or implementing natively which I believe would be more suitable for your needs. Check them out. Try to implement one or two and let us know if you were successful or not.
If anyone can add more links to SDK for voice recognition feel free to add. This would be really great.
If you just need only ON and OFF voice inputs you can use the following code
Speech to text in unity
If you need exact speech recognition then refer the following code
Speech recognition in unity
For a project, I would like to have people talk in front of a Kinect (v1) and every adjective they say should appear on a screen.
Unfortunately, I'm new to Kinect development and I'm having real trouble finding good documentation and tutorials.
I did some testing of the idea, but the best I could do is hack one of the Kinect SDK samples for basic speech recognition and put some adjectives in the grammar.
The problem is that this doesn't work well when saying full sentences in front of the Kinect, and you have to speak pretty loudly and close to the Kinect. I will not be able to place the Kinect that close to the speaker.
I've also tried using System.Speech and (like the sample) Microsoft.Speech. However, none of them seem to support the Dictation grammar. I did some research on what the error (Grammar referenced by grammar not found) means, and it seems this indicates that the dictating functionality is not installed on my system, or something similar. I don't know how to proceed from here.
Can you point me to some other things I could try to recognize the adjectives people are saying in front of a Kinect (or another microphone)?
I ended up using the grammar-based speech recognition which I simply prefilled with a lot of adjectives. Users were limited to saying one word at a time, instead of being able to speak freely, but I couldn't make it work otherwise.
I'm writing an app (in C#) which as a part of it must simulate and send some key strokes to another application. I'm using http://inputsimulator.codeplex.com/ project for simulating keys, and it works in many applications, but in some it doesn't - i.e. Mortal Combat 4.
I've googled about it, and found many answers varying from 'it's impossible' to 'you must use XXX library' etc. Those answered scared me a lot, and even nearly convinced I'm not able to do it at that time, BUT...
M$ Virtual Keyboard works. It works in ALL applications. So it IS possible... Does anyone of you, clever guys, know how can I achieve this?
Ok, I think I finally got it to work. I used API Monitor recommended by Neal P and it showed just minimal differences between OSK calls and mine. A bit later I've tried to make my calling thread sleep some time between sending messages with press and release key and that was it.
Although you were able to achieve your purpose, the way you achieved it does not fundamentally answer your question: How to simulate keyboard input in ALL applications?
There's a bunch of situations where the common user mode Microsoft API already mentioned does not work, like game applications that use the DirectInput API or protected games.
I have built a library that can help in this situations, it provides a simple C API that internally communicates with device filter drivers. It is able to send input for DirectInput based games and also is able to bypass some game protections. I have checked and it is still able to bypass some known game protections by using the x64 version of the library. Game protections commonly hook only the x86 system's api. Well, at last now, 18 February 2012, this is what I'm seeing happening.
Take a look at SendKeys on MSDN