Author Topic: TTS to different Zones  (Read 3845 times)

0 Members and 2 Guests are viewing this topic.

dwvaughn

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
TTS to different Zones
« on: January 06, 2014, 03:07:57 PM »
So I am currently using the kx Audio driver with two Sound Blaster SB0060 sound cards which allows me to use each output on the card individually (i.e. front l/r becomes a zone, rear l/r becomes a zone, etc.)

I'm wondering, is there a way to have VoxCommando only respond to certain "zones" or outputs from the card using this driver somehow?  I am currently using J River Media Center which can do the zone control but I'm not sure how I would pass the TTS to the appropriate zone.

Ultimately I envision VoxCommando running my HTPC which is linked to each room and I will use Serial commands to tell VoxCommando what room I'm in and then VoxCommando can respond accordingly.  Do you think this is doable?

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: TTS to different Zones
« Reply #1 on: January 06, 2014, 03:45:04 PM »
I think this is possible, please take a look in this post

http://voxcommando.com/forum/index.php?topic=959.0
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS to different Zones
« Reply #2 on: January 06, 2014, 04:15:56 PM »
No, that won't help.

You can send TTS to any windows output using the TTS.SetOutput action.  But you can't send it to specific channels on the same output.  So you would need to fool VC into seeing them as separate outputs somehow.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS to different Zones
« Reply #3 on: January 06, 2014, 05:06:23 PM »
Ultimately I envision VoxCommando running my HTPC which is linked to each room and I will use Serial commands to tell VoxCommando what room I'm in and then VoxCommando can respond accordingly.  Do you think this is doable?

Sure, why not?  You just need to find a way to tell VC where you are.  There are many ways you could do this.  It depends on what hardware you have available.  You could for example use a motion sensor, or a remote control to tell VC what room you are in, or you could check what zone JRiver is currently targeting.

dwvaughn

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Re: TTS to different Zones
« Reply #4 on: January 06, 2014, 05:27:02 PM »
Sure, why not?  You just need to find a way to tell VC where you are.  There are many ways you could do this.  It depends on what hardware you have available.  You could for example use a motion sensor, or a remote control to tell VC what room you are in, or you could check what zone JRiver is currently targeting.

The motion sensor thing is the plan.  I am currently doing Insteon in my house so I'm going to use that to set variables and tell VC where I am.  I will look tonight to see if VC sees each channel as a separate output.  The kx driver is pretty neat and I think they show up separately.  I'll let you know what I find out.

dwvaughn

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Re: TTS to different Zones
« Reply #5 on: January 06, 2014, 11:01:52 PM »
Turns out it's super easy.  I used AudioEndPoint.GetList to generate the list of audio devices that I had on my machine (first I used OSD to display them then realized it would be more beneficial to use File.Write to actually save them somewhere).  Then I correlated those to the actual outputs from the sound card.  Now I can just use AudioEndPoin.SetByNum or SetByName to set the output depending on what room I'm in (based on the info from the motion sensors of course).

So for example this is the list it gave me (comma delimited):

Wave Out 2/3 (kX 10k2 Audio (3550) - Generic),Wave Out 6/7 (kX 10k2 Audio (3550) - Generic),Wave Out 4/5 (kX 10k2 Audio (3550) - Generic),Wave Out 6/7 (2- kX 10k1 Audio (3550) - Generic),Wave Out 2/3 (2- kX 10k1 Audio (3550) - Generic),SPDIF/AC3 Output (2- kX 10k1 Audio (3550) - Generic),Master Mixer (2- kX 10k1 Audio (3550) - Generic),Master Mixer (kX 10k2 Audio (3550) - Generic),Headphones (2- High Definition Audio Device),SPDIF/AC3 Output (kX 10k2 Audio (3550) - Generic),Wave Out 4/5 (2- kX 10k1 Audio (3550) - Generic),Digital Audio (S/PDIF) (2- High Definition Audio Device),AMD HDMI Output (AMD High Definition Audio Device)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS to different Zones
« Reply #6 on: January 07, 2014, 09:59:37 AM »
To clarify, when I said that Kalle's link would not help, I meant that it would not allow you to split output between channels on the same output.

If changing the default systemwide output works for you, that is great, but if you just want to redirect the output of your TTS, it makes more sense to use TTS.SetOutput
Since jriver targets specific outputs and does not use the default it may not matter to you, but ma y program s will be affected by a change of the default output.  Sometimes you might want that and then the audioendpoint  action is handy.

dwvaughn

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Re: TTS to different Zones
« Reply #7 on: January 07, 2014, 01:30:13 PM »
To clarify, when I said that Kalle's link would not help, I meant that it would not allow you to split output between channels on the same output.

If changing the default systemwide output works for you, that is great, but if you just want to redirect the output of your TTS, it makes more sense to use TTS.SetOutput
Since jriver targets specific outputs and does not use the default it may not matter to you, but ma y program s will be affected by a change of the default output.  Sometimes you might want that and then the audioendpoint  action is handy.

I think I understand, so if I use AudioEndpoint and I have something playing on the default output (a movie or something) I will get that along with the TTS.  But, given the AudioEndpoint information I should be able to use the names given in the list to TTS.SetOutput() correct?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS to different Zones
« Reply #8 on: January 07, 2014, 03:41:20 PM »
Yes.

But you can also just get the names of devices by opening your windows sound settings.  You can also rename your outputs here if it makes life easier.  right-click the little speaker icon in your Windows notification area (near the clock) and choose "playback devices".

the tts.setoutput is also very forgiving in that you can use a substring of the name to select the device.  So with the outputs I have (see image) I can set the outputs using a parameter like "analog" or "jabra"

Obviously you need to be careful if you have two outputs that contain the string "analog" since then you won't know which one you are getting... though it would probably be the one at the top of the list.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="tts set ouputs example" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="247" name="test jabra output" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.SetOutput</cmdType>
      <cmdString>jabra</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <cmdString>testing</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="266" name="test analog output" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.SetOutput</cmdType>
      <cmdString>analog</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <cmdString>testing</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
</commandGroup>

dwvaughn

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Re: TTS to different Zones
« Reply #9 on: January 13, 2014, 03:21:15 PM »
James,

Thanks I was able to figure it out with what you provided.  I hate to admit it but I"ve been using PCs for 15ish years and never knew you could rename Audio Outputs (not that I've ever needed to before now but still).  Thanks again.