Author Topic: Question about rebuilding after VC.SetProfile  (Read 1753 times)

0 Members and 1 Guest are viewing this topic.

bodiroga

  • $upporter
  • Jr. Member
  • *****
  • Posts: 48
  • Karma: 1
    • View Profile
Question about rebuilding after VC.SetProfile
« on: May 14, 2012, 02:52:39 PM »
Hi James!

I have a question about the VC.SetProfile command: why does VC make a rebuild after changing the voice profile? Is it really necessary? As I have big movies, series and music databases, it takes 7-8 seconds (with an SSD) to complete the rebuild and I would like to reduce it (I know that it's not too much but I am very perfectionist and I want to make the system as fast as possible).

I suppose that VC does it because it needs to know that the voice profile has changed, but shouldn't be enough just turning VC off-on to detect it? As least it works that way to detect that the default sound recorder device has change. Am I right?

Many thanks for you help and best regards,

Aitor

PS: Ohhh, I have remembered that I also want to ask about the "check mic status every (secs)" option. How does it work? I sometimes see in the history tab messages like: "trying to reset mic: 5 seconds", "trying to reset mic: 10 seconds", "trying to reset mic: 15 seconds",... Does this mean that the mic is connected or that VC is trying simply trying to reset it without success?

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Question about rebuilding after VC.SetProfile
« Reply #1 on: May 14, 2012, 03:59:28 PM »


Quote
PS: Ohhh, I have remembered that I also want to ask about the "check mic status every (secs)" option. How does it work? I sometimes see in the history tab messages like: "trying to reset mic: 5 seconds", "trying to reset mic: 10 seconds", "trying to reset mic: 15 seconds",... Does this mean that the mic is connected or that VC is trying simply trying to reset it without success?

Hi Aitor,
Mic check status every (sec): Is sometimes useful if your usb microphone disconnects itself (Some wireless mic do this to save battery). Set this to number of seconds between checks. If VoxCommando determines that it has lost connection with the microphone it will reinitialize. Set to 0 to disable. Recommended to leave off unless you determine that you need to use this feature to stay connected to your microphone.

Kalle
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Question about rebuilding after VC.SetProfile
« Reply #2 on: May 15, 2012, 10:43:28 PM »
I have a question about the VC.SetProfile command: why does VC make a rebuild after changing the voice profile? Is it really necessary? As I have big movies, series and music databases, it takes 7-8 seconds (with an SSD) to complete the rebuild and I would like to reduce it (I know that it's not too much but I am very perfectionist and I want to make the system as fast as possible).

I suppose that VC does it because it needs to know that the voice profile has changed, but shouldn't be enough just turning VC off-on to detect it? As least it works that way to detect that the default sound recorder device has change. Am I right?


Hi Aitor.  It does not actually *rebuild* although it may say rebuilding on the screen. (if it did a true rebuild it would take much longer) but it does need to reload all the grammars.  I agree that it does not make a lot of sense, and maybe it is a mistake by Microsoft, but this is the way that the Windows speech engine works, and there is no way to avoid it, as far as I can tell.  It has been a while since I looked at the code for switching profiles, but if I remember correctly, you actually have to dispose of the current engine and create a new engine, using the new profile.  Then you need to load the grammars (groups) back into the engine. This is one reason why I created the grammar cache in the first place because before it had to recreate everything when we either restarted VC, or switched profiles and it took much longer.  Loading the precompiled cache is relatively quick.

The only way you might be able to get around this would be to run two VoxCommandos at the same time, one for each profile, but I don't think it is worth the trouble of trying to set it up in an easy to use way.

I have nothing to add to what Kalle said about the microphone.  It all sounds right to me.

bodiroga

  • $upporter
  • Jr. Member
  • *****
  • Posts: 48
  • Karma: 1
    • View Profile
Re: Question about rebuilding after VC.SetProfile
« Reply #3 on: May 16, 2012, 11:10:13 AM »
Many thanks to both for your help! (I should learn more ways of saying "thanks", I always use the same form and it's boring :D:D:D)

Ok, I understand that it's how windows speech engine works, it's a shame. When I have more time perhaps I can try to change the voice profile manually using a Python script and this window:



But I doubt that it will be much faster and it will be less reliable for sure.

For the "check mic status" option I'm going to disable it as I think that it makes VC less stable and I don't know if it's doing something or not. We will see if I have any problem with the mic in the next weeks.

Oh, James, one new feature that I would really love to see in VC is an option to see the time when events happen in the history tab (yeah, just like in Eventghost!). If you like the idea please take your time, it's not an important feature so you can leave it for future updates ;)

Thanks again and best regards,

Aitor

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Question about rebuilding after VC.SetProfile
« Reply #4 on: May 16, 2012, 11:34:27 AM »
Changing the speech profile that way won't have any effect.

Adding timestamps to the history window seems like a good idea.  I'll try to add that in the next release.  I'm away from home and not really doing any programming at the moment.