Author Topic: Can VC Announcements be Forwarded to SONOS  (Read 14462 times)

0 Members and 1 Guest are viewing this topic.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Can VC Announcements be Forwarded to SONOS
« Reply #30 on: October 08, 2014, 10:39:16 PM »
Good to know, and it makes sense. For fun, when you have the time, could you test out the following possible alternatives and let us know the outcomes?

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.0.3-->
<commandGroup open="True" name="Different TTS to Sonos tests" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="141" name="Another method for sending TTS" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="This is supposedly an &quot;outdated&quot; function, but it seems like it might be useful. According to the documentation: &quot;This action will pause the current playback, play the alert, and then the playback will be resumed.&quot;">
    <action>
      <cmdType>TTS.Speak2Wav</cmdType>
      <params>
        <param>This is the TTS announcement</param>
        <param>C:\VoxCommando\tts.wav</param>
        <param>False</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Vera.Raw</cmdType>
      <params>
        <param>data_request?id=action&amp;DeviceNum=184&amp;serviceId=urn:micasaverde-com:serviceId:Sonos1&amp;action=Alert&amp;URI=x-file-cifs://192.168.81.191/VoxCommando/tts.wav&amp;Volume=50&amp;Duration=15</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Another method for sending TTS</phrase>
  </command>
  <command id="145" name="Test the Sonos plugin's built-in TTS" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="According to the plugin documentation &quot;This action will pause the current playback, say the text, and then the playback will be resumed&quot;">
    <action>
      <cmdType>Vera.Raw</cmdType>
      <params>
        <param>data_request?id=action&amp;DeviceNum=184&amp;serviceId=urn:micasaverde-com:serviceId:Sonos1&amp;action=Say&amp;Text=This is the TTS announcement&amp;Language=en</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Test the Sonos plugin's built-in TTS</phrase>
  </command>
</commandGroup>
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

crawfofd

  • Jr. Member
  • **
  • Posts: 29
  • Karma: 3
    • View Profile
Re: Can VC Announcements be Forwarded to SONOS
« Reply #31 on: October 08, 2014, 11:15:09 PM »
nime5ter,

I did a test of your recent xml and both work. 

The addition of the duration in the (alert) made it so that if something was playing already it would mute and play the wav file, then return to playing. It still needs volume control.

The second one (say) does the same thing but returns immediately after is says what is past to it. It seems the best so far. This also needs volume control.

Great work!

Will do some more testing.

crawfofd

  • Jr. Member
  • **
  • Posts: 29
  • Karma: 3
    • View Profile
Re: Can VC Announcements be Forwarded to SONOS
« Reply #32 on: October 09, 2014, 12:05:35 AM »
nime5ter, I figured the volume out.  You just have to add &Volume=?? (?? 1-99) at the end of your 'say' or 'alert'.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Can VC Announcements be Forwarded to SONOS
« Reply #33 on: October 09, 2014, 09:06:42 AM »
Thanks for testing and reporting back. So the volume parameter adjusts the volume of the TTS message, which is a good idea.

15 seconds is a tad long for "duration". If left unspecified the default is 10 seconds, according to the documentation. Still, it's not an ideal method.

I really just wanted to test the examples provided in the documentation (on the page you linked to: http://code.mios.com/trac/mios_sonos-wireless-music-systems).

The scene method is probably best for most users, but some users might want other kinds of control -- for being able to customize which room/group is targeted, and that kind of thing maybe.

I'm not sure when it will come in handy, but hopefully this thread can give all Sonos users some tools to expand control.
« Last Edit: October 09, 2014, 10:00:28 AM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)