Windows based(EventGhost) Voice Recognition: Tutorial

  • 2.3K Views
  • Last Post 12 August 2015
Yokel posted this 10 April 2015

This isn't InControl specific, so i apologize if this isn't the appropriate place for this. I've had this setup for a couple of months & thought this would be of interest to other InControl users. You can use whatever mic you want but i've been using these far field mics. http://www.microcenter.com/product/432512/WinbookSurveillanceMicrophoneKitwith60ftAudioCable-PowerSupplyforCCTVSecuritySystems . They reliably pickup a 25' radius. Note these mics are really sensitive, you'll likely need to turn them down to less than 50%. Also turn off all effects in your soundcard.

There are other ways to communicate with InControl from EventGhost but for simplicity this example uses curl to launch InControl Scenes. So you'll need to have that installed and a working command line .exe. If you don't have that yet, follow this tutorial first. http://www.incontrolzwave.com/post/2012/05/11/Activate-a-scene-from-the-command-line.aspx

Required software: EventGhost: http://eventghost.net/downloads/

You'll also need to install the Voice Recognition plugin(and microsoft speech API) manually as described here. http://eventghost.net/forum/viewtopic.php?f=9&t=6809

[b]1st:[/b] Add the Voice Recognition plugin to your tree. https://dl.dropboxusercontent.com/s/rosnp7jut7sl623/addvoicerecognition.png?raw=1

[b]2nd:[/b] Open the voice recognition plugin settings by double clicking on it within the tree. I use the top set of words for my always active commands. The 2nd set of key words i use behind a trigger word(hey Jenny) & have it set to a lower accurucy. The bottom box is for excluded words/phrases. https://dl.dropboxusercontent.com/s/8oybrku4z0f3kui/voicerecognitionsettings.jpg?raw=1

Add the phrase you want to trigger your cmd line .exe into the top box. In my case that's going to be (Jenny lights please).

[b]3rd:[/b] Create a new(start application) macro. This will launch your cmd line script. https://dl.dropboxusercontent.com/s/fteu9y0520z91dm/addcurlcmd.jpg?dl=0 https://dl.dropboxusercontent.com/s/4hnb1b7jqwbmgli/curlsettings.jpg?raw=1

[b]4th:[/b] Create a new event with this text VoiceRecognition.Jenny lights please https://dl.dropboxusercontent.com/s/f13z8are23tsoe2/voicerecognitionevent.jpg?raw=1 . This is the event that will fire when the voice recognition plugin has a correct match.

When your done your tree should look like this. https://dl.dropboxusercontent.com/s/15y2zljygndemxi/config%20tree.jpg?raw=1

Here is a example EventGhost tree: https://www.dropbox.com/s/8pv7yfndvcnrqi8/egExampletree.xml?dl=0

I've found it's best to keep most commands behind trigger words to reduce false positives. Here's an example tree of that: https://www.dropbox.com/s/v74k1d9ezznn15i/EventGhostTriggerwordExample.xml?dl=0

You can take

Order By: Standard | Newest | Votes
eliashall posted this 19 April 2015

This is awesome, Thank you.
This is my first attempt at using curl. Where can I find more details about accessing IC via curl? I'd like to be able to do things like set light percentage levels, or set a temperature on the thermostat.
I'd also like to be able to request things like weather info or door status.

Yokel posted this 19 April 2015

Check out the developer pages. Here's the link to the web api page: http://docs.incontrolha.com/home/introduction . You don't necessarily need to use curl to run these calls to the api. It's just an easy way to do it on a PC.

eliashall posted this 21 April 2015

Yokel, Today I received my Microcenter box containing two 60 foot mic kits as you listed in your post.
mine came with BNC connectors and RCA adapters. I scrounged around and found a mono 3.5mm to Stereo RCA adapter which I plugged into the sound card. I tested both microphones and neither of them work other than if you speak directly into them from about 2 inches away. I don't know if it's the way I've rigged my adapters, but I'm curious what you used for your adapters and sound card?
I plugged my desktop mic back in and can detect commands from around 4 ft away. I was hoping to get the same 25ft radius you reported with the kit you ordered.

Yokel posted this 21 April 2015

That's how i usually hook mine up. One of these: http://www.microcenter.com/product/348084/35mmMonoPlugtoRCAFemaleJackAdapterBlack .

I hate to say it but i think you probably got bad mics. The quality control on the mics sucks. I have 5 of these around the house for cams/voicecontrol. Three of the five i purchased had to return because of the same problem. When they're working properly your levels should be off the chart from 4' away.

This is how my levels are set now & currently have soft music playing.
https://www.dropbox.com/s/2mb86kedtemv3m2/mic.levels.jpg?raw=0 Make sure you have all effects off too. https://www.dropbox.com/s/umvf72uviioj39g/mic%20settings.jpg?raw=0

eliashall posted this 22 April 2015

I tested the mic rig on one of my laptops instead of the server and it works great. I guess the issue is the USB sound card I have on the server.
I need to find a higher quality USB sound card I guess.
In the meantime I have been porting all of my EventGhost + Scripts over to the laptop so I have something working.
You are right, these Mics are great, I have it 15 ft away and it works really well. I tested the Mic doing some recordings and found that it was best at 100 level vs your 28 (different sound card I guess)


Yokel posted this 22 April 2015

Good. I'm glad you got it working. I have them running into internal motherboard sound cards running realtek drivers. I've been setting up a NUC via TTRS cable & noticed that I needed to boost the levels a bit. So levels are gonna vary depending on the soundcard. If you have a slot in your server. I'd look into a PCI souncard.

bradap@comcast.net posted this 21 July 2015

How are you controlling the light when Jenny speaks? I am new to EventGhost.

Yokel posted this 21 July 2015

I have a philips hue strip light mounted above my TV. If you have a hue bulb/bridge you can use the EG Philips hue Plugin available here: http://eventghost.net/forum/viewtopic.php?f=9&t=6770 . There is an event generated by the Intellispeech plugin when it has finished speaking. I have that event fire the hue pulse command. The attached screenshot shows how i have that setup within EG. https://www.dropbox.com/s/k90twysnvkmacwz/pulselight.jpg?raw=0

I thought i'd mention to anyone that is interested in this thread. I've migrated over to VoxCommando for all my Voice commands and AI. It is a lot more sophisticated than the EG Voice recognition plugin. I did this command collection posted here: http://voxcommando.com/forum/index.php?topic=2220.0. It is basically a plugin for InControl. It will scrape & build friendly databases of your InControl devices. Which are then used to issue voice commands. It eliminates the need to use Curl & having to search through a bunch of text to find the device/scene ID's. VoxCommando is not free but is very reasonably priced software & does come with a non expiring trial version(you have to restart VoxCommando after every 40 commands). Vox link: http://voxcommando.com/home

bradap@comcast.net posted this 11 August 2015

I got everything working with out Vox but attempting use 2 mics and getting lots of false voice recognitions'. I have a control word with confidence set to 94% - even when I use a headset at 95% it fails to get a recognition.
Are you mixing 2 inputs?
How are you switching output as well for the music? Are you doing this through EG?

Yokel posted this 11 August 2015

How is it working just running a solo mic? I have run two mics' split to the same input. I don't recall more false positives. I didn't like it setup that way mainly because the tts always has to be played in both locations. If I had to guess, your probably getting too much noise on the line for it to get a match. I use wmc for my pvr tv around the house. So i use separate pc's for each mic & have a cheap pair of pc speakers hooked up for always on tts replies. If you need to switch audio outputs within EG you could write a python script or use nircmd: http://www.nirsoft.net/utils/nircmd.html.

This is a sample script for nircmd, save as .cmd:

[code]@ECHO OFF C:\NIRCMD\NIRCMDC setdefaultsounddevice "FPD TV-1" 2 C:\NIRCMD\NIRCMDC setdefaultsounddevice "Microphone" 1 C:\NIRCMD\NIRCMDC setdefaultsounddevice "Realtek Digital Output" 1[/code]

bradap@comcast.net posted this 12 August 2015

Initially I tested my headset mic and it seemed fine. I looked online and saw VAC,http://software.muzychenko.net/eng/vac.htm , and it allowed 2 or more mics to be combined as one. I am looking at a mixer now.

I wanted one PC to control the whole house so will look into nircmd - thanks.

Close