Author Topic: Recording Device not actively updating  (Read 2443 times)

Himeki

  • Guest
Recording Device not actively updating
« on: March 16, 2019, 07:22:25 PM »
Description: As subject. Recording device does not update unless using VoiceAttack Options menu despite using "Windows Default" to determine which input should be used.
OS: Windows 7
Version: v1.7.3
Expected Result: Changing windows default recording device changes what VoiceAttack listens to.
Actual Result: VoiceAttack ignores any changes to default recording device unless options are opened after changing.
Steps:
  • Set windows default device to microphone.
  • Open VoiceAttack.
  • Check VoiceAttack audio options for recording device listed.
  • Close VoiceAttack options.
  • Change default recording device to another source.
  • VoiceAttack will not detect the change and will keep responding to first recording device until Options menu is opened.
Notes: Updated from 1.6.8 after noticing issue hoping it was fixed. Issue remains.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Recording Device not actively updating
« Reply #1 on: March 16, 2019, 07:33:46 PM »
Thank you for pointing that out and providing all that info.  That is a known situation, actually.

The instance of Windows' speech engine that spins up when you launch VA does not poll to see if that device has been changed through Control Panel, nor does it respond to any event that Windows may have for that device changing/changed (this is the speech engine, outside of VA's control).  Also, there is no active thread within VoiceAttack that polls the device settings, as that is a fairly, 'edge case' event (that is, the device that the speech engine is using is suddenly changed to something else is not something that happens a lot).

If you do need to change the recording device through Control Panel, you'll need to reset the Windows speech engine instance within VoiceAttack.  If you have one of the later betas, you can click on the icon in the top-left corner of VA's main screen and select, 'Reset Speech Engine', or, you can include the, 'Reset Profile' action within a command.
If you don't have the latest beta, you can always open and close the options screen (can't remember if you have to make changes to the recognition-related stuff or not) or, close and restart VoiceAttack like the good old days.  Either of those restart the Windows speech engine.

Hope that helps!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4763
  • RTFM
Re: Recording Device not actively updating
« Reply #2 on: March 16, 2019, 07:41:19 PM »
You could also use the "Change Default Audio Devices" action to switch the recording device, which will reset the speech recognition engine for you.

If you prefer to manually switch recording devices, you can also use an inline function in a command to reset the speech engine afterward, if you don't want to reload the entire profile:
Code: [Select]
public class VAInline
{
public void main()
{
VA.Utility.ResetSpeechEngine();
}
}

Himeki

  • Guest
Re: Recording Device not actively updating
« Reply #3 on: March 16, 2019, 07:59:10 PM »
Description: As subject. Recording device does not update unless using VoiceAttack Options menu despite using "Windows Default" to determine which input should be used.
OS: Windows 7
Version: v1.7.3
Expected Result: Changing windows default recording device changes what VoiceAttack listens to.
Actual Result: VoiceAttack ignores any changes to default recording device unless options are opened after changing.
Steps:
  • Set windows default device to microphone.
  • Open VoiceAttack.
  • Check VoiceAttack audio options for recording device listed.
  • Close VoiceAttack options.
  • Change default recording device to another source.
  • VoiceAttack will not detect the change and will keep responding to first recording device until Options menu is opened.
Notes: Updated from 1.6.8 after noticing issue hoping it was fixed. Issue remains.
I didn't expect a response that fast. Thank you for the info.

Sad to know it's the speech engine, but ways to reload it solves the issue well enough for me.
I'm simply switching between VR and Desktop usage, so as you'd expect, different mic/audio output needed.

I'll just use the set audio with a "VR Mode" command or something I suppose.

You could also use the "Change Default Audio Devices" action to switch the recording device, which will reset the speech recognition engine for you.

If you prefer to manually switch recording devices, you can also use an inline function in a command to reset the speech engine afterward, if you don't want to reload the entire profile:
Code: [Select]
public class VAInline
{
public void main()
{
VA.Utility.ResetSpeechEngine();
}
}
I assuming I'm misunderstanding how to set this up as I get a compiling error (using C# inline function)
Quote
'VoiceAttack.VoiceAttackInvokeProxyClass' does not contain a definition for 'Utility' and no extension method 'Utility' accepting a first argument of type 'VoiceAttack.VoiceAttackInvokeProxyClass' could be found
Code Below (References left from default as I'm unsure what is needed for it)
Code: [Select]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

public class VAInline
{
public void main()
{
VA.Utility.ResetSpeechEngine();
}
}

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4763
  • RTFM
Re: Recording Device not actively updating
« Reply #4 on: March 16, 2019, 08:16:50 PM »
You did specify v1.7.3, I somehow assumed you had upgraded to the latest beta :o

ResetSpeechEngine() was added in beta v1.7.3.1, so you'll need at least that version to use it.

In that version it's not yet split into subclasses, so it'd be
Code: [Select]
public class VAInline
{
public void main()
{
VA.ResetSpeechEngine();
}
}

Himeki

  • Guest
Re: Recording Device not actively updating
« Reply #5 on: March 16, 2019, 11:06:47 PM »
You did specify v1.7.3, I somehow assumed you had upgraded to the latest beta :o

ResetSpeechEngine() was added in beta v1.7.3.1, so you'll need at least that version to use it.

In that version it's not yet split into subclasses, so it'd be
Code: [Select]
public class VAInline
{
public void main()
{
VA.ResetSpeechEngine();
}
}
Same "no definition or extension" error trying that method in v1.7.3 with above code.

I decided to run with a bool compare to toggle back and forth with one command instead of previous setup.

Working well enough for what I need, though I would have preferred just to be able to swap without it.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4763
  • RTFM
Re: Recording Device not actively updating
« Reply #6 on: March 16, 2019, 11:36:32 PM »
Same "no definition or extension" error trying that method in v1.7.3 with above code.

ResetSpeechEngine() was added in beta v1.7.3.1, so you'll need at least that version to use it.

The function does not exist at all in v1.7.3, you need a newer version of VoiceAttack to utilize it.

Himeki

  • Guest
Re: Recording Device not actively updating
« Reply #7 on: March 16, 2019, 11:57:09 PM »
The function does not exist at all in v1.7.3, you need a newer version of VoiceAttack to utilize it.

Ah my bad, I misunderstood.
Quote
In that version it's not yet split into subclasses, so it'd be...
Confused me, thought it simply wasn't split into subclass.

Thank you for the help and information, appreciate it a bunch.