PDA

View Full Version : Voice recognition mode: Unable to set default audio device



Sabifa.
11-30-2017, 07:55 AM
Hello,
as I wanted to try out the voice recognition mode I came up with this problem.

My mic is set properly in windows and I installed the MSSpeech_SR_en-US_TELE.msi and SpeechPlatformRuntime.msi files.

If I click on any setting of the voice recognition mode buttons (hold button, always on etc), I always get this message:


18:09:25.986 : Attempting to initialise speech recognition for user specified location en
18:09:25.991 : Success
18:09:25.992 : Unable to set default audio device
18:09:25.993 : Exception message: Cannot find the requested data item, such as a data key or value.
18:09:25.993 : Attempted to initialise speech engine - success = False


Any help is appreciated!

Thanks, Sabifa.

mr_belowski
11-30-2017, 08:53 AM
This suggests that your mic is not set to be the default recording device in windows -

59

Sabifa.
11-30-2017, 09:31 AM
Thanks for your answer.
I set my mic in the windows menus and also tried to change it multiple times.

I can't open your attachment though.

Sparten
11-30-2017, 10:48 AM
Make sure Voice recognition mode is set

Edit:
Looks like there is an issue with attachments atm, i'll take a look at it.

Sabifa.
11-30-2017, 01:15 PM
I just double checked it with the latest version and the problem is still there.
Here is a screenshot: click (https://imgur.com/a/CwVVZ)

mr_belowski
11-30-2017, 01:40 PM
Googling the error, it seems that Microsoft speech recognition API simple doesn't work with some recording devices but there's not enough information out there to understand why :(

Sabifa.
11-30-2017, 01:49 PM
Okay I just tried using the Onboard Soundcard (Realtek High Definition from my ASUS Z370-e mainboard) instead of my Asus Xonar DGX and it doesnt worked as well.

Maybe you know someone else with this soundcard who could try it? I thought that it should work with the onboard soundcard because most of them are the same I guess but that's not the case, too bad.

mr_belowski
11-30-2017, 01:55 PM
that's really odd :(

The code that's failing is internal to Microsoft's speech recogniser - this line

Microsoft.Speech.Recognition.SpeechRecognitionEngi ne.SetInputToDefaultAudioDevice();

if that line throws an error (as it does in your case) I stop trying to initialise the recogniser. I could allow it to continue but i doubt it would work :(

The results I've found searching for this suggest it's something to do with the device not providing "low quality input" but this is as much as I can find

Sabifa.
11-30-2017, 02:16 PM
Alright, thank you for your help.

I'll try to find someone else with my soundcard and I let him try CrewChief out to find out if it's working for him.

If I have any furhter information I will answer to this thread again.

Til then I have to use it without the voice commands.

The Iron Wolf
11-30-2017, 02:28 PM
I am using Xonar STX microphone in (official drivers, which I imagine same cmedia hardware as your card) or Oculus microphone as input no problem. One last thing to check is make sure that microphone you want to use is Default Device, not just Default Communication device. Also, restart CC after any changes in Sound Control Panel.

However, the fact that it doesn't even work with built in card is suspicious, something is way off. Wild guess, but maybe try reinstalling SR?

Sabifa.
11-30-2017, 03:01 PM
Thanks for your tips Wolf.
It is the Default Device and I just reinstalled SR and the voice pack. Still nothing changed, same error 'Unable to set default audio device'.

Slowmover
11-30-2017, 09:53 PM
hm.. just tested, nearly identical Config like Sabifa. Reinstalled the speech packs and now i get in the logs:
23:50:40.720 : Loading controller settings
23:50:40.722 : Load controller settings complete
23:50:40.733 : Attempting to initialise speech recognition for user specified location en
23:50:40.800 : Success
23:50:40.815 : Loading all voice command alternatives from speech_recognition_config.txt
23:50:40.921 : Attempted to initialise speech engine - success = True

only worst thing... stupid spotter did not understand me... maybe my english is too bad or i don't know the correct commands ;)

The Iron Wolf
11-30-2017, 10:47 PM
hm.. just tested, nearly identical Config like Sabifa. Reinstalled the speech packs and now i get in the logs:
23:50:40.720 : Loading controller settings
23:50:40.722 : Load controller settings complete
23:50:40.733 : Attempting to initialise speech recognition for user specified location en
23:50:40.800 : Success
23:50:40.815 : Loading all voice command alternatives from speech_recognition_config.txt
23:50:40.921 : Attempted to initialise speech engine - success = True

only worst thing... stupid spotter did not understand me... maybe my english is too bad or i don't know the correct commands ;)
For the commands, check speeche_recognition_config.txt in CC install folder :) Also help window has most of them.

Sabifa.
12-03-2017, 12:19 PM
Okay so I got some news for you guys.
With the latest update I'm now able to hear a beep if I press my voice activation button and it won't output a failure message while configuring the voice recognition mode.

But I've got new errors. click (https://i.imgur.com/nNIsCrp.png)


14:14:30.788 : Listening for voice command...
14:14:30.790 : opened channel - waiting for speech
14:14:30.791 : Unable to start speech recognition No audio input is supplied to this recognizer. Use the method SetInputToDefaultAudioDevice if a microphone is connected to the system, otherwise use SetInputToWaveFile, SetInputToWaveStream or SetInputToAudioStream to perform speech recognition from pre-recorded audio.
14:14:30.892 : Invoking speech recognition...
14:14:30.893 : cancelling wait for speech
14:14:33.280 : Playing sounds, events: acknowledge/didnt_understand
14:14:33.964 : *** Processed acknowledge/didnt_understand


I'm not sure if it makes it any better but at least there is a bit of improvement.^^

mr_belowski
12-03-2017, 12:27 PM
I expect there will be an error message in the console when you first start the app grumbling about being unable to set the default audio input device. Sorry fella, it was always a long shot.

mr_belowski
01-01-2018, 08:48 AM
Not sure if you saw the recent updates, but this issue might be resolved by using nAudio for speech recognition - enable the "Use nAudio for speech recognition" property and restart the app. A new select box will be added to the UI allowing you to choose a speech input device. This makes the speech recogniser take its input from a stream, rather than from the recording device directly, so I think it should work with any recording device

Sabifa.
01-01-2018, 01:31 PM
It is working as it should without any problems til now! :)

Thank you so much for the update!

Greetings Fabian

mr_belowski
01-01-2018, 02:34 PM
Great stuff. Massive thankyou to Daniel Nowak who wrote the code to wire up nAudio to the speech recogniser :D