SpeechRecognition

Plugins SpeechRecognition

MacGruber

Invaluable member
Developer
Featured Contributor
Messages
1,537
Reactions
3,012
Points
143
MacGruber submitted a new resource:

SpeechRecognition - Recognizes keywords or complex grammar using Windows 10 and Unity's speech recognition features.

This can recognize simple keywords lists as well as more complex grammar using Windows 10 and Unity's speech recognition features. When starting with this project the assumption was I can wrap the simple looking API in a plugin and build a simple demo scene in just a few hours. However, making a reasonable plugin UI, implementing error handling and necessary performance features as well as circumvent VaM quirks with file dependencies took a bit longer.

(Watch video...

Read more about this resource...
 
I finally tried that and sadly, nothing's happening for me.

I think it might be on my side, but I can't see what could be a blocker. I made sure my microphone (default headset) is working, started Windows Speech recognition and even trained it: that works fine. But in VAM, it doesn't trigger anything. Feels like I'm speaking in the wind.

Is there a windows parameter to activate somewhere?
I simply wanted to release the poor penguins 😭
 
I finally tried that and sadly, nothing's happening for me.

I think it might be on my side, but I can't see what could be a blocker. I made sure my microphone (default headset) is working, started Windows Speech recognition and even trained it: that works fine. But in VAM, it doesn't trigger anything. Feels like I'm speaking in the wind.

Is there a windows parameter to activate somewhere?
I simply wanted to release the poor penguins 😭
Things to try:
  1. Check whether you allow apps to use the microphone in Windows 10 Settings - Privacy - Microphone
  2. I think you also need to allow Settings - Privacy - Voice activation
  3. If you changed the default mic while VaM was running, make sure to restart VaM
 
Thanks for the reply! Unfortunately...

1)
1629544183596.png

VAM is not in the list of desktop apps, but that might be normal.

2)
1629544165444.png


3)
I tried to plug the headset with microphone in before starting VAM. Also tried to switch to Word and start Windows Speech Recognition to check if it was correctly recognizing what I was saying:
1629546166154.png


No penguins have been freed so far...


Edit: just realized I have this error at scene launch
1629546665474.png

I might add that English's not my mother tongue and I have another language installed, which is my default grammar checking language in Office.
Windows is in English and I've set up English as speech recognition language, though.
 
Last edited:
Description of that error says: "The language of the speech recognizer does not match the language of a grammar."

If have set Windows 10 Settings - Time & Language - Speech - Speech language to "English (United States)". Maybe you got it set to UK english or something? Possibly you need to install the US voice package, too, its at the bottom of the same settings page.
 
If have set Windows 10 Settings - Time & Language - Speech - Speech language to "English (United States)". Maybe you got it set to UK english or something? Possibly you need to install the US voice package, too, its at the bottom of the same settings page.
Yep, it's the UK one. I'll try to install the US package (y)
 
Hello! I'm getting the following error when I try to add the plugin to a scene or atom:

Capture.PNG


I have the dependencies fulfilled, but I'm using your v10 logicbricks, not the v8 as stated.
 
I have the dependencies fulfilled, but I'm using your v10 logicbricks, not the v8 as stated.
I guess you are talking about the EvilCorpHQ demo. For plugins always use the exact same version as stated in the dependency. That's why VARs are so useful, because it allows you to have multiple versions installed in parallel, just those needed by your various different scenes. Ideally you should install via the Hub-Browse window within VaM, it does automatically download everything you need (for resources marked with the green "hub-hosted" tag)
 
I guess you are talking about the EvilCorpHQ demo. For plugins always use the exact same version as stated in the dependency. That's why VARs are so useful, because it allows you to have multiple versions installed in parallel, just those needed by your various different scenes. Ideally you should install via the Hub-Browse window within VaM, it does automatically download everything you need (for resources marked with the green "hub-hosted" tag)

At least for me, the scene shows as "Dependencies not all on hub"; but the download button for the bricks v8 says "download" with a green background (like a file that was found), I download it and it shows as downloaded; but the package manager still points to it as a "yellow" dependency. When I open the page again, the button says "Download" again, as if it wasn't downloaded the first time. The VAM version is the latest.

It's also relevant to say that the mic setup is working ok, since I'm using it with VamX.
 
Last edited:
This plugin looks amazing!
Can somebody please explain how do I install my own mother language to work with it?
Is it something I need to do inside the plugin? or in Windows 10?

If so... how do I change to my language to be recognize, it will be very helpful for newbies and upcoming noobs as well.
Thanks ahead for any help! :)

UPDATE:
It seems to work perfectly fine with English.
I'm not sure if I did it wrong, in windows 10 >> Speech Settings
I've downloaded my language and change the default speech to my language.
When I try (many different simple words) in VAM and the plugin, it only recognize English...

Any idea what am I doing wrong? did I skip a step to make it work with my own language?
 
Last edited:
Any idea what am I doing wrong? did I skip a step to make it work with my own language?
I'm not 100% sure, but I think the Keyword Recognizer is always set to English, AFAIK you can't change it. If you want another language, you need to use the Grammar Recognizer and set a language in the XML, besides obviously installing the language pack in Windows 10 Speech Settings.
 
I'm not 100% sure, but I think the Keyword Recognizer is always set to English, AFAIK you can't change it. If you want another language, you need to use the Grammar Recognizer and set a language in the XML, besides obviously installing the language pack in Windows 10 Speech Settings.
Thanks, I double check I guess my language doesn't even have speech recognition supported in Microsoft Windows Speech Recognition for many years (probably won't be anytime soon) it only supports TTS.
I did see my language on other online services, but probably can't use it for VAM (I'm not a programmer, I have no clue).

I thought maybe somehow I can "trick" the English if I can write the words sound like my language, but it didn't work... I guess it looks for ACTUAL English words and not how the words "sound like" hehe... I would totally do that if it worked :)
 
I'm getting this when I load the scene. Any idea what I'm doing wrong? I have all dependencies downloaded.

1669676536277.png
 
@VamTimbo
hm, not sure....please check:
  1. All VARs needed for this need to be located directly in the AddonPackages folder. Putting them in subfolders (e.g. by creator name) is not supported. At least I never tried and it may cause trouble here.
  2. Check whether *.json files from the VAR are correctly extracted to the cache location in Custom/PluginData/SpeechRecognition
 
@VamTimbo
hm, not sure....please check:
  1. All VARs needed for this need to be located directly in the AddonPackages folder. Putting them in subfolders (e.g. by creator name) is not supported. At least I never tried and it may cause trouble here.
  2. Check whether *.json files from the VAR are correctly extracted to the cache location in Custom/PluginData/SpeechRecognition
I checked the cache location - all files present. But also please note - I downloaded all packages from the hub - so their location hasn't been altered. I did notice that I have a newer version of logic bricks and that the downloader in the hub keeps trying to download an earlier version and it fails to download.
 
Last edited:
I checked the cache location - all files present. But also please note - I downloaded all packages from the hub - so their location hasn't been altered.
Weird. What's the full file path of one of the Grammar files? Any weird symbols in there? The file is opened not by VaM/Unity, but by the Windows SpeechRegognition API. It may have trouble with things like spaces or other special characters in the filename.
E.g. for me it would be: D:\Games\VaM\VaM_Release1.20\Custom\PluginData\SpeechRecognition\MacGruber.EvilCorpHQ.1\Custom\Assets\MacGruber\Showcase\EvilCorpHQ\penguin_secure.json

I did notice that I have a newer version of logic bricks and that the downloader in the hub keeps trying to download an earlier version and it fails to download.
Oops. It depends on LogicBricks.8 and you can download old versions here: https://hub.virtamate.com/resources/logicbricks.1975/history
However, version 8 was never available as free version, version 9 was directly release as free instead. That's why the Hub doesn't find it. Weird that the demo still shows as "Hub-hosted" in that case, though. Also nobody reported it as a problem ;) Anyway, you can take the attached file. However, that shouldn't cause the error messages you are seeing.
 

Attachments

  • MacGruber.LogicBricks.8.var
    135.5 KB · Views: 0
MacGruber updated SpeechRecognition with a new update entry:

Version 2 (free)

Changelog for EvilCorpHQ demo
  • Upgraded to current plugin versions. This mainly fixes the broken references to LogicBricks.8.
  • AI voice has improved in recent years...now using Amazon Polly, which is better than the old Google voice.
  • Switching to VaM 1.22 build-in lip sync
  • Slightly nicer demo scene, only VaM build-in assets
  • New video and screenshots
(Watch video with sound!)

Read the rest of this update entry...
 
I can't figure out why this plugin won't work for me.

Windows recognizes my Q2 mic, Voice Attack recognizes it, but this plugin in VAM will not respond to any of the commands I put into it. Not sure what's going on as I don't get any errors either I don't think...

Just...nothing happens.
 
Windows recognizes my Q2 mic, Voice Attack recognizes it, but this plugin in VAM will not respond to any of the commands I put into it. Not sure what's going on as I don't get any errors either I don't think...
Please refer to the "Notes / FAQ" section of the resource page.
Most notably:
This plugin is using your system default microphone, not your microphone setting in Oculus or SteamVR software! Make sure your mic is enabled and has a reasonable volume setting.
Also check your Windows 10 speech settings, set it to English US. You may need to install the voice pack as well.
 
Back
Top Bottom