VoxCommando

Help and Support (Using VoxCommando) => Bug Reports => Topic started by: squatingyeti on December 17, 2014, 09:31:59 PM

Title: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 17, 2014, 09:31:59 PM
Hey james, I've run into an error moving my setup into the living room with kinect as the mic. This may be because the way I tried to do it or because something else entirely. I'll start with the way I moved things in case I did something stupid. I wanted to take all the commands I had already created on my main PC and use them in the living room. I had considered the main PC as the testing ground. So, I simply copied my VC folder to the living room. Then, I downloaded the new VC 2.1.27. Everything is working fine, but I had never setup XBMC on the other computer. So, I tried to load the standard XBMC commands and it took away my other commands.

I don't know the correct way to add standard commands to an already existing command structure :( I then just opened up a copy of my saved commands from my main PC and proceeded to drag each group to the tree with the XBMC commands. Probably the complete incorrect way to do this. After all this, everything worked correctly. All my old commands worked fine.

I followed the steps to get XBMC up and going by setting the plugins correctly and adding the vox plugin to XBMC. Generated my payloads but noticed VC was going crazy in the event history. I had to turn VC off to see what it was doing. That's when I saw Wave Reco Complete over and over for as far as the history would show. Purged and rebuilt grammar, upgraded to VC 2.1.29 and restarted everything. Worked great again, but as soon as XBMC opens I get nonstop Wave Reco Complete and I have to turn off VC and close it. Nothing short of closing XBMC seems to make it stop.

tldr : VC with kinect is spamming the event Wave Reco Complete when XBMC opens and becomes unresponsive :(

Thanks and it's likely I did something stupid.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: jitterjames on December 17, 2014, 10:48:57 PM
I really don't know.  The wav reco event is normally generated after a wav file is analyzed for speech audio.  Normally this is only used by VoxWav with the TcpMic plugin but it might also happen if you have set a "wav watch folder" in options/advanced.  Check that you did not put something in there by accident.

I recommend that you do a clean install and only add the default XBMC config and see how that goes first.

Then check out the "combining different configurations video": http://voxcommando.com/mediawiki/index.php?title=Video_Tutorials

You also mention Kinect but I don't really know how you are using it or if it is relevant.  Try using another mic to see if it is related.

When weird things happen it always helps if I can look at a log file.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 17, 2014, 11:08:20 PM
I'll get that log to you. First step I wanted to just go with a clean install so I setup another VC and installed it. I'm using Kinect as the mic. After install and starting VoxCommandoSP I get this error screen:

Pretty sure I went through the right steps to install the MS speech platform.

After the attached error is closed I get: "Failed to create cfg: srgs\SP_en-US_XBMC Payload Actions.cfg
so it looks like an error with my speech install??

Throws the attached error again if I genxml with xsql. Get the wave reco complete error if I try to do anything with xbmc while VC is running. Definitely no watched folders or wavs in them. Something to do with kinect and my errors I imagine.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: jitterjames on December 18, 2014, 12:01:18 AM
That error is related to the SP engine being a bit picky about the commands in a particular group (it is a bug in the MS SP engine) but it has nothing to do with your other problem with wav reco events, and all your other groups should still work.  For now I recommend you do not use SP unless you have a good reason to do so.

Are you just using Kinect as a regular microphone or are you using the Kinect streaming as found in Options, under the Kinect tab?  Please do test without the Kinect to see if it is related.

I have never heard of anything like this with the wav reco events. I really don't know what you might have done.  Is this your first time trying to use XBMC?  Please tell us what version of XBMC you are using.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 18, 2014, 12:09:49 AM
I'm using kinect streaming as found in the options and just the settings you recommend are checked. I'll test without kinect, but it will have to wait until tomorrow as I'm already getting the stink eye for another one of my projects taking up my time lol
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: jitterjames on December 18, 2014, 12:12:07 AM
I understand.

Well it sounds like you have changed 5 things at once.  You need to break it down.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 18, 2014, 02:19:38 PM
Ok...I think I have it working. Well, everything except kinect which is my next test. I started completely over, but first I ran a test on my main PC. Created another version of VC and started with just the standard XBMC commands. I installed XBMC on that computer and scanned everything into the library my HTPC can see. Works perfectly including VoxSP without that big error attached earlier. Then, I started copying commands and payloads one by one from my current configuration and testing. Everything checked out with no problems after all options, payloads, and commands were added.

I then moved back to the HTPC and went for a fresh start there as well with a yeti mic for tests instead of the kinect. Did the same thing except got the previously attached error thrown at me again as soon as I installed and picked the standard XBMC config. Now, both my HTPC and main PC have the same OS (Win8.1) and run everything pretty similar, so that had me confused. I was convinced something had to be wrong with the MS speech installs. Deleted everything, including kinect drivers and downloaded each file again. Installed them and restarted for peace of mind lol. Even started over with Vox again. Voila! No error thrown with the standard XBMC config using VoxSP. It seems something had not installed correctly with the MS speech despite the system thinking it had.

Followed the steps of adding my backed up commands, payloads etc as with the main PC and everything is running PERFECT! Now, I will do everything with adding the kinect from here step by step with tests each step to see if I get the repeated Wave Reco Complete issue.

tl;dr Started over with everything including drivers and have no errors with a Yeti mic. Will be adding kinect to the equation now and reporting back my hopeful success.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: jitterjames on December 18, 2014, 02:47:32 PM
Before trying with the Kinect I suggest you make a complete backup of your current folder (just copy the whole folder to a new location), then mess with the copy to see if you can get the Kinect working.

Try with and without SP.  If you don't notice a big difference then I suggest you stick with the non-SP version.

*Note you can also just use the Kinect as an ordinary Windows microphone without enabling the streaming option.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 18, 2014, 02:57:05 PM
Well, step by step everything worked with kinect and SP...until I changed the kinect option to attempt to use kinect device with audio streaming :/ Again, it works fine that way with all commands, but as soon as I start XBMC it goes haywire with the Wave Reco Complete event. I've made extra sure I'm watching no folders or anything.

I can get you a log to see if that will help track this down.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 18, 2014, 03:44:40 PM
Well, I can tell you it has something to do with the sound output of XBMC on my HTPC and the Kinect AEC setting. If I change the sound output from WASAPI HDMI to DirectSound HDMI, I am able to use XBMC normally until I play any music or video. Doing that brings back the Wave.Reco.Complete event and hangs Vox. Turning off AEC allows everything to work normally with kinect.

So, this is probably something unique to my setup maybe. I go from HTPC to receiver using HDMI and I have passthrough enabled, but not sure I actually need that as my HTPC can handle DTS-HD and whatnot on its own. No matter which output I use, Vox always throws an error on the TTS.SpeakSync that is set to fire when you start playing a movie and it doesn't actually say anything. Otherwise, TTS works normally.

Not sure if it's worth your time to look at a log as this seems specific to something in my setup, but I can make it throw the repeating Wave.Reco.Complete and get you the log if you'd like.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: jitterjames on December 18, 2014, 05:30:26 PM
Actually if you don't mind I would like to see that log.

I can see how multi-channel and AEC could cause unusual results, but I still don't see how that event would be triggered!  If I look at your log and check my source code I might be able to figure it out, but mostly just to satisfy my curiosity.

If you are using digital pass-through then AEC won't work anyway so you might as well turn that off.  TTS will also fail if you are trying to use the same output that XBMC with WASAPI is already using.  That is not specific to you, that is how it works with XBMC.  WASAPI takes exclusive control of the output.  If you want to use TTS on the same output then XBMC must use DirectSound with no pass-through.  I get around this by using my TV speakers for TTS when using XBMC.  When I run MediaMonkey (which I have configured to not use WASAPI) then it automatically switches the TTS output back to my stereo in case I want to turn my TV off while listening to music.

When watching multi-channel-audio videos I believe that you should always use pass-through for the purist surround sound and least amount of work for your PC, but there are probably others out there that will disagree with me. I'm no expert.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 18, 2014, 05:48:23 PM
Ok, give me a little time to create that log for you. The stink eye has returned and chances of sleeping on the couch are rising lol. I'm with you on the pass-through, but I've heard a few disagree. I think VC even freezes if I ask for it to do a few things that require TTS while xbmc is running. Anyway, I'll get you the log in a bit. Btw, how do you get the sound to the TV from your setup?
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 18, 2014, 06:12:57 PM
She got preoccupied with something and I seized my opportunity  :biglaugh. Here's the log with AEC on and you can see after the movie starts it just starts firing off the same error over and over.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: jitterjames on December 19, 2014, 08:15:04 AM
Thanks for the log.  ;D

If I can figure it out I may at least be able to detect when this specific situation arises and automatically fall back to non AEC mode.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: jitterjames on December 19, 2014, 10:46:43 AM
I think VC even freezes if I ask for it to do a few things that require TTS while xbmc is running.
Under what circumstances?  I've never had this happen.  Do you mean when using the Kinect streaming with AEC and using WASAPI?

Btw, how do you get the sound to the TV from your setup?

I have an HDMI cable that goes directly to my TV which carries both the video and sometimes audio.  (This means I don't have to have my energy sucking Onkyo on just to browse the web etc.)

I have an optical output connected to my Onkyo which only carries audio.

If you feel that you need to have HDMI going to your receiver, then you can probably also use an analog output to your TV (or some other small speakers).  Or if you have two HDMI outputs you can connect one to the TV and one to the receiver.  The actual setup will vary depending on the hardware you have available.

I switch my TTS outputs using the action TTS.SetOutput
I trigger commands to switch the output using focused events (in case XBMC or MM was started manually) and also in my "listen to music" and "watch TV" commands.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 19, 2014, 02:29:14 PM
Awesome on the sound setup. I'm gonna mess with that today. I'll test and see what caused the VC freeze and if I can duplicate it.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 23, 2014, 02:42:18 PM
Ok, the freeze was not actually a freeze at all, just a bit of a hang. Also, not caused by VC, but rather when vera decides it wants to act up and take too long to respond to a status check of a device. I'm guessing this is more of a UI7 issue still as those on UI5 don't seem to run into this very much, but it seems to happen after messing with stuff like PLEG a bit and can be resolved by a precautionary reboot of the vera after several changes are made.

On another note, I read where you said kinect can't interpret numbers correctly and needs a payload iirc. Is there a quick way to do this or will I literally have to go through each number connecting one-1 and so on?
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: jitterjames on December 23, 2014, 03:46:43 PM
It isn't the Kinect itself that has the number limitation so just because you are using the Kinect as a microphone does not mean it will affect you.  It is only a problem if you are running the SP version of VC and you select a specific recognizer such as Microsoft Server Speech Recognition Language - Kinect (en-US) in the main options tab.

Actually, all of the SP engines seem to have difficulties with numbers, but the Kinect engines completely reject numbers.

I'm pretty sure that when Microsoft releases any kind of speech api, they never actually use it and never fix any of the bugs that people report.  There are still major bugs in the speech API (SAPI) left over from Vista.  In most cases I have had to create workarounds to try to cope with them.  And in some cases I ended up with something better anyway.  The speech platform version 11 has a new set of issues for us to discover and have fun with. :P

But you know, it's only version 11 of the Windows Speech Platform, so we can still consider it a beta for now.  :biglaugh
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 23, 2014, 04:21:20 PM
 :biglaugh They only realize they've made a mistake when they skip version numbers. I patiently await the jump from 11 to 13 (13 being bad luck we might get straight to 14 if we're lucky).

So am I correct in the understanding I need to make a payload tying each word with each number i.e one - 1 to the highest number I'll likely need? Dear god, 2001 A Space Odyssey will be the death of me. HAL!
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: nime5ter on December 23, 2014, 05:03:45 PM
Since VC supports partial matching of payload phrases, maybe you can just try saying commands like "Play movie 2001" as "Play movie Space Odyssey"? (Make sure that "submatch" is checked in those payload xml files, of course.)

Stick to using a digit ->phrase payload xml file just for things where you really do want to use a number value -- e.g. for turning volume to a particular level between 1 and 100, or light levels etc. Then hopefully a list from 0 to 100 will cover most situations . Actually, since in those cases you're most likely to use larger increments "dim light to (10/50/80) percent", "set volume to 20/25/30", you might be able to get away with a list of multiples of five or ten or whatever.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: jitterjames on December 23, 2014, 05:34:31 PM
So am I correct in the understanding I need to make a payload tying each word with each number i.e one - 1 to the highest

I don't know.  It depends on your setup.  Which version of VC are you using and which speech engine?
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 23, 2014, 06:35:20 PM
Yeah nime5ter, I think I can get away with using increments like that and just catch special cases like 21/22 jump street.

James, I'm using the latest VC 2.1.2.9 and the MS speech recognition for kinect-us
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: jitterjames on December 23, 2014, 07:14:14 PM
as Nime5ter said you can probably just say "jump street" instead of "21 jump street".

Actually, with SP and a Kinect engine, when using payloadRanges and payloadLists VC will automatically convert numbers to phrases for you (as though you had created a payloadXML with words for the phrases and integers for the values.  It only does this in English though.  You can try it.  The problem then arises (and I think you have seen this), that if you have too many similar commands with payload ranges in the same group, then one of the MS bugs will surface and your groups will not load.  You will get an error about a rule reference not found or something to that effect.

Personally (I think I'm repeating myself),  I would try the non-SP version first to see if it can work for you.  Far less headaches.  It still works with Kinect though *possibly* not as well.  You should try it to make sure.
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: squatingyeti on December 23, 2014, 10:17:00 PM
Yeah, I'll give the regular version a shot and see how it goes. Do I need to still use the kinect speech recognition or do I switch to the regular one and not worry about the kinect beam forming and whatnot?
Title: Re: Infinite Wave Reco Complete after starting XBMC
Post by: jitterjames on December 24, 2014, 07:43:06 AM
It's up to you. See what works best for you.

Beam forming etc. is still supported with the standard engine.  The SP recognizers were apparently tuned to the Kinect's audio profile.