Author Topic: App volume and device preferences  (Read 8156 times)

Robertsmania

  • Newbie
  • *
  • Posts: 46
App volume and device preferences
« on: May 15, 2018, 12:17:41 PM »
The Windows 10 1803 update introduced new sound options: App volume and device preferences

You should be able to use those settings to re-direct the audio output from applications to various audio devices and set the volume levels independently.

So far I have not been able to get it to work with VoiceAttack.

Here is a brief video showing the issue and what I've tried so far:
https://www.youtube.com/watch?v=Sd8XPExjh2k

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: App volume and device preferences
« Reply #1 on: May 15, 2018, 12:35:34 PM »
Unfortunatley, TTS only comes out of the default audio device set up by Windows, *even if* you specify an output via control panel (control panel > Speech > Text To Speech > Advanced > Use this audio output device).  I don't have a way to internally set the output through the component at the moment, and the only place it channels is through the default audio device (yes, it's a pain).  In order to do what you are wanting to do, you'll want to set your Windows default audio output device to the Rift.  You can do this by the global option, or you can do it via Other>Windows>Change default audio device action.

On a side note, when playing a sound file, you can choose the channel of the output if you are using, 'Integrated Components' (and not Windows Media or Legacy).

Thanks for the video!

Robertsmania

  • Newbie
  • *
  • Posts: 46
Re: App volume and device preferences
« Reply #2 on: May 15, 2018, 12:42:59 PM »
Thats disappointing.

In my setup, having the Oculus be the default audio device is not satisfactory.

I am able to achieve what I need using CheVolume - it will re-direct the tts output to the Rift and then the Oculus audio mirroring does send the voice to both the headset and the default device.
http://www.chevolume.com/

But Che-Volume is old, fragile and has not been updated for a long time.  When it works, its fine but it crashes often.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: App volume and device preferences
« Reply #3 on: May 15, 2018, 12:51:02 PM »
The underlying component doesn't provide any options :(  I've got some things I can try, though (if it doesn't pose too much overhead).

Robertsmania

  • Newbie
  • *
  • Posts: 46
Re: App volume and device preferences
« Reply #4 on: May 15, 2018, 12:55:26 PM »
Thanks for your help!

If its possible for Che-Volume to do it, it seems like it should be possible for VoiceAttack - or for Microsoft to get the same behavior with the new settings.  Is it laughable to suggest you reaching out to their developer support to see if they can help with either changes to the TTS or new audio settings?

I'd love to be able to get away from Che-Volume...

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: App volume and device preferences
« Reply #5 on: May 15, 2018, 01:20:09 PM »
The problem is that the underlying component ONLY goes to the default audio device (it doesn't matter what you have VA routed to or even if you change the TTS settings in control panel).  To route the audio elsewhere can absolutely be done, but I would have to build my own channel map and effectively replicate what CheVolume is doing (my guess is that it's somewhat involved, as their product is 2-3x of VA).

Edit -  I may have something.  It will involve a little bit of legwork, but it just may work out.
« Last Edit: May 15, 2018, 01:29:30 PM by Gary »

Robertsmania

  • Newbie
  • *
  • Posts: 46
Re: App volume and device preferences
« Reply #6 on: May 15, 2018, 02:57:16 PM »
I believe in you! 

Gangrel

  • Caffeine Fulled Mod
  • Global Moderator
  • Full Member
  • *****
  • Posts: 216
  • BORK FNORK BORD
Re: App volume and device preferences
« Reply #7 on: May 15, 2018, 03:21:41 PM »
Would Voicemeeter Banana (or even Voicemeeter) be useful in this case? Or their products of audio cables?

Just wondering because I needed to do something similar in my setup

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: App volume and device preferences
« Reply #8 on: May 19, 2018, 11:29:47 PM »
Just a quick update - there will be an output channel selector for TTS in the next release.  Got a few more things to tighten up, but for the most part it is working.  I may just put an, 'unofficial' out before beta, as my code signing certificate is being reissued (changed computers) and that wont be done til after Monday.

Robertsmania

  • Newbie
  • *
  • Posts: 46
Re: App volume and device preferences
« Reply #9 on: May 20, 2018, 09:32:46 AM »
Splendid news! You rule.

And just for some comic value, this is one of the things that happens on my stream when Che Volume malfunctions.  The audio from VoiceAttack and iRacing constantly goes up in pitch!
https://www.youtube.com/watch?v=7IeSm4CZ7ps
« Last Edit: May 20, 2018, 06:16:04 PM by Robertsmania »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: App volume and device preferences
« Reply #10 on: May 22, 2018, 11:29:15 PM »
In lieu of beta:

I put a version of VA out in the, 'unofficial' bin:  http://www.voiceattack.com/unofficial

You just download that and put it in your install folder, overwriting your old VoiceAttack.exe (note that this is the non-Steam version).  There is now a dropdown on the TTS screen to select a channel... it will be available if, 'Integrated Components' is selected in the, 'Audio' tab of the Options screen.

I didn't get a chance to go full beta, as I'm suddenly out of time as I will be out of pocket for the next few days.  'Unofficial' builds are usually pretty solid, however, Pfeil will find fifteen things I neglected straight away ;)

Here are the notes that would normally go along with the beta (again, sorry for the rush... pressing matters to tend to):


v1.7.0.7

 -  Improvements
 
     -  TTS output channel is now selectable if you are using, 'integrated components' (also included
        in mass update).
     
     -  Added volume control to Options > Recognition > Windows Speech Recording Device option
        (value is saved on submit).   
     
     -  Added token, '{STATE_SYSDIR}' which renders the path of the system directory.
     
     -  Added token, '{STATE_WINDIR}' which renders the path of the windows directory.

     -  Moved/added often-used Windows speech utilities to Options > Recognition tab, 'Utilities'
        button.  Might save a few clicks.

     -  'Run an application' parameter box now accepts environment variables.     


 -  Bug Fixes
 
     -  'Train speech engine' link on, 'Tips' screen has been fixed.
     
     -  Highlighted tts remains highlighted after preview.

Robertsmania

  • Newbie
  • *
  • Posts: 46
Re: App volume and device preferences
« Reply #11 on: May 23, 2018, 11:08:48 PM »
This works GREAT!  No issues so far.  Thank you so very much.

Robertsmania

  • Newbie
  • *
  • Posts: 46
Re: App volume and device preferences
« Reply #12 on: May 31, 2018, 12:07:11 AM »
Actually I have had a few instances where my Voice Attack application - the Digital Race Engineer stops working with this unofficial build.

It says:
Command canceled: Another command is not allowing others to execute

It has happened a few times and I've never seen this error or behavior before.  Its certainly possible its something with the DRE but my hunch is its the experimental version of Voice Attack.

Is there anything I can do to provide more information about it?  This is the link to the plugin I'm running with iRacing:
https://theawe.dk/product/dre/

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: App volume and device preferences
« Reply #13 on: May 31, 2018, 02:52:04 AM »
If you click the "Stop Commands" button(or the corresponding hotkey), does it list any stopped commands in the log?

It's likely a command keeps running in the background that doesn't have "Allow other commands to execute while this one is running" checked.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: App volume and device preferences
« Reply #14 on: May 31, 2018, 08:15:43 AM »
Also, there is a setting in Option>System/Advanced that is labeled, 'Cancel Blocked Commands'.  That will have an effect on how commands interact with each other.

Robertsmania

  • Newbie
  • *
  • Posts: 46
Re: App volume and device preferences
« Reply #15 on: June 02, 2018, 05:29:42 PM »
If you click the "Stop Commands" button(or the corresponding hotkey), does it list any stopped commands in the log?

It's likely a command keeps running in the background that doesn't have "Allow other commands to execute while this one is running" checked.

I did get it to happen again.  When I clicked the "Stop Commands" button, it showed that "set fuel" was stopped.  Looking at the details for that command, indeed it does not have the "allow other commands to execute while this one is running" checked.

Here is the sequence of instructions in that command:
Code: [Select]
Set decimal [fuelAddDecimal] value to 0
Execute external plugin, 'The Digital Race Engineer (v2.6.0)' and wait for return
Set decimal [fuelAddLocal] value to the converted value of {CMDSEGMENT:1}
Begin Text Compare : [{CMDSEGMENT:3}] Has Been Set
    Begin Text Compare : [{CMDSEGMENT:3}] Does Not Equal ''
        Set decimal [fuelAddDecimal] value to the converted value of {CMDSEGMENT:3}
    End Condition
End Condition
Begin Decimal Compare : [fuelAddDecimal] Does Not Equal 0
    Begin Decimal Compare : [fuelAddDecimal] Is Greater Than 10.00000
        Set decimal [fuelAddDecimal]to [fuelAddDecimal] divided by 100.00000 (round to 2 decimal places)
    Else
        Set decimal [fuelAddDecimal]to [fuelAddDecimal] divided by 10.00000 (round to 2 decimal places)
    End Condition
End Condition
Set decimal [fuelAddLocal] to [fuelAddLocal] plus [fuelAddDecimal]
Set decimal [addFuelDecimal] value to the value of [fuelAddLocal]

Most of the other commands I spot checked do allow other commands to run, but this one does not.  I can experiment with turning that on and see but something tells me the author did it intentionally.  Do you see anything in the logic that would justify not letting other commands run, or that might get it hung up so it doesnt complete?

Robertsmania

  • Newbie
  • *
  • Posts: 46
Re: App volume and device preferences
« Reply #16 on: June 02, 2018, 05:32:56 PM »
Also, there is a setting in Option>System/Advanced that is labeled, 'Cancel Blocked Commands'.  That will have an effect on how commands interact with each other.

I checked, and my settings do have the "Cancel Blocked Commands" checked.  But from what I can see the issue is commands like "set fuel" are blocking other commands and not ending properly themselves.  It seems like turning this feature off would just make the other commands hang around?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: App volume and device preferences
« Reply #17 on: June 02, 2018, 05:48:48 PM »
The other commands will hang around until the blocking command is finished.  Then, it's a gang rush if multiple commands are waiting as the commands are not queued.  There used to not be an option, but some wanted to be able to completely keep other commands from running at all when blocked.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: App volume and device preferences
« Reply #18 on: June 03, 2018, 04:01:46 AM »
Do you see anything in the logic that would justify not letting other commands run, or that might get it hung up so it doesnt complete?

The only part of that command that should cause it to hang/keep running is the plugin, because VoiceAttack must wait for it to execute(to avoid a race condition where the variables haven't been set when the next action executes).

Being a plugin, there's no telling what it's doing or what's going wrong, though it seems like a safe assumption that it's not supposed to take more than a few seconds to gather the information it needs.


I'd recommend contacting the author of "The Digital Race Engineer" to find out what could be causing this.

Robertsmania

  • Newbie
  • *
  • Posts: 46
Re: App volume and device preferences
« Reply #19 on: June 27, 2018, 07:20:45 PM »
Being a plugin, there's no telling what it's doing or what's going wrong, though it seems like a safe assumption that it's not supposed to take more than a few seconds to gather the information it needs.


I'd recommend contacting the author of "The Digital Race Engineer" to find out what could be causing this.

I did reach out to the plugin author on the iRacing forums.  And so far I am the only one reporting this issue.

I've tried updating to the v1.7.0.15 prerelease and what I observe is that if I enable the feature to "Override Default Text-to-Speech Device" then I get the issue with blocked commands - usually fairly quickly.

If I switch that back to "Do not override (use Windows Default Playback Device)" then it works properly and consistently (knock on wood, back to using it that way for several days and no issues).

In addition to the blocked commands when I run with the audio device override I do hear multiple voice effects simultaneously from time to time even though I have the "Single TTS instance" box checked on the System/Advanced options tab.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: App volume and device preferences
« Reply #20 on: June 28, 2018, 08:17:28 PM »
Just note that any TTS or sound playing functionality in a plugin is (aside from calling commands inside of a VA profile) is using a separate TTS engine or sound player outside of VA's control.