Announcement

Collapse
No announcement yet.

TTS Confusion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    TTS Confusion

    New to Sonos, so forgive my cluelessness. I have read all the TTS threads, but I am still confused.

    My plan is to slowly wean myself off the Media Player plugin in favor of Sonos - only one whole-house zone for now. So I want both MP and Sonos systems to be active while I work on integrating Sonos into my interfaces, scripts, etc. I use an AB8SS speaker switcher (2 inputs, 8 outputs) - input A is HS with Media Player, input B will be HS with Sonos. I have split the line-out from HS - one to my existing A side amp (for MP), and one to the Connect and its B side amp (for Sonos). Most of my TTS announcements are via script. So when MP is running, I use HS's normal TTS interruption. When Sonos is running, I should have the same HS TTS coming into the Connect via its line in. So my thought is that I should get my announcements using either system.

    I have been trying a few simple events to try out TTS, but getting unexpected results. I must be doing something wrong, and/or I just don't understand how it works.

    Problem 1: If I send TTS out of the HS default line out, I hear it on A and B sides - makes sense. If I do speakex 60 or route to $SONOS$TTS$AUDREY3EFAULT, I still hear it on A. Shouldn't that send directly to the Connect and not via HS line out?

    Problem 2: If I send TTS while Sonos is playing a tune, the music stops, switches to Sonos line-in and I catch only the last few seconds of speech. I guess I can add a delay for that. But music does not resume after the speech. I have to restart music manually to switch back. Also, when I do restart music, the Sonos volume is turned way down. Is that the way it is supposed to work, or have I messed up? I assumed that the PI would pause music and restart when TTS was done.

    Screenshots attached for Config and test events.

    Sorry for the long story. Please help the clueless.
    Attached Files
    Mark

    #2
    Originally posted by Mark S. View Post

    Problem 1: If I send TTS out of the HS default line out, I hear it on A and B sides - makes sense. If I do speakex 60 or route to $SONOS$TTS$AUDREY3EFAULT, I still hear it on A. Shouldn't that send directly to the Connect and not via HS line out?
    Suggest you set the "speak To File" flag in the Sonos config screen on, don't forget to hit save.


    Originally posted by Mark S. View Post
    Problem 2: If I send TTS while Sonos is playing a tune, the music stops, switches to Sonos line-in and I catch only the last few seconds of speech. I guess I can add a delay for that. But music does not resume after the speech. I have to restart music manually to switch back. Also, when I do restart music, the Sonos volume is turned way down. Is that the way it is supposed to work, or have I messed up? I assumed that the PI would pause music and restart when TTS was done.
    Not quite sure why this isn't restoring. The PI has an announcement queue so doing multiple announcements shouldn't mess up anything. You do have two very different ways to do announcements in one action (the regular speak and then the speakex), I wonder whether there is something I overlooked. If you set the "speak to file" flag, does it still happen. If so, can you separate the two action, so just try the "Speak and wait" action only or the "script" only.

    If all else fails, turn the debug flag for the Sonos PI on and post the log.

    Dirk

    Comment


      #3
      With no music playing, the test events above work as expected, with one exception. I get no TTS out of Sonos if I use speakex 60 without checking "Speak to File". But it does come out of HS (A side), and actually so does $SONOS$. Shouldn't speakex 60 come only out of Sonos? Hopefully, I captured this in the debug log.

      With music playing, it gets weirder.

      Originally posted by dcorsus View Post
      Suggest you set the "speak To File" flag in the Sonos config screen on, don't forget to hit save.
      With "Speak to File Checked" both $SONOS$ and speakex 60 seem to work - music pauses, speaks, and restarts music when done. But hsspeak (for my A side) stops the music, turns the Sonos volume down and then back up while speaking, then back down, no music restart. This problem messes me up because I have a gajillion existing events and scripts that use hsspeak, and I'd rather this didn't mess up my Sonos side. Added this to the debug log.

      With "Speak to File" unchecked, I get all kinds of weird. Upon executing the TTS event, the music stops and the Sonos volume turns way down, and slowly comes back up again while speaking... most times. After speaking, the volume goes back down to about 20% and music does not restart. This scenario should also be in the debug log.

      As I mentioned above, most of my TTS comes from scripts, so I am most interested in the best way to get that working well. So far, only "Speak to File" seems to work. Should it work without speaking to file, or am I messing up? Shouldn't hs.speak have no effect on the Sonos plugin?

      Thanks for your help.
      Attached Files
      Mark

      Comment


        #4
        I'm struggling to get my head around this and there is a ton of stuff in the log file, it is nearly impossible to figure out what you are trying to do at what point.

        So let's replay what I think I understand:

        a/ you have ONE output from your HS PC forked between two inputs of your amplifier, is that correct? Or do you have TWO physical connections and therefore two sound cards in this PC? If it is one, not sure what you are trying to accomplish maybe elaborate.

        b/ Let's clarify nomenclature. What I typically call in the help doc as TTS, and what shows up on the config page/ linktable as TTS is use of streaming of announcements to the Sonos player using a physical connection from HS PC to Sonos audio input. As a consequence, obviously the announcements goes out physically on the speaker port and in your case will end up on both inputs of your amp. When I speak about "speak to file", there is no need for a physical connection and as such nothing goes out physically on that connection. The announcement is streamed to a file and that file is transferred to Sonos. So when you use that nothing will be received on the "A side" of your amp. When you set the "speak to file" flag, it is a master overwrite, that means everything that the Sonos PI thinks belongs to it (either because it is marked up as a $SONOS$ device, or the deviceID matches) will be streamed to file and therefore NEVER show up on the physical port. This is the most preferred mechanism by most given it requires no physical connection and HS PC and Sonos players don't need to sit side-by-side. I understand that for your testing you probably don't want that. So when the "speak to file", which is the master overwrite is not set, you can set for each linkgroup whether it should use TTS (physical connection) or stream to a file. So in your case what I think is missing is that the "TTS" field in your linkgroup is not check marked so changed that (speak to file off and TTS on)!

        I have no idea why the music is not coming back, what exactly where you playing? There is a fail save mechanism in the PI, the music always comes back unless something else hoses it up. I see some other events and scripts being triggered in the log file, I see volumes being changes, as I said, you need to split the log files in separate pieces and capture one event in one file with full description what was going on. In fact the log shows that your player was sourcing from its audio input when you were doing the TTS tests, so whatever you heard coming and going I assume was from your media player on your HS PC. At the end of the log file, I see tracks being played but I see no more TTS tests, so check your setting before and after a test to prevent contaminated testing.

        Hope this helps else just capture the info, describe exactly what was going on and what settings you had, and I'm sure we'll quickly get to the bottom of this. By the way, which version are you using? Probably 88 from the updater, I've been planning to update the updater with latest which can be found here (http://board.homeseer.com/showpost.p...45&postcount=1) but recently ran into some issues and therefore I was waiting for a few weeks of confirmation that latest is running good before updating the updater.

        Dirk

        Comment


          #5
          Thanks, Dirk. Sorry for the long log above.

          Originally posted by dcorsus View Post
          a/ you have ONE output from your HS PC forked between two inputs of your amplifier, is that correct? Or do you have TWO physical connections and therefore two sound cards in this PC? If it is one, not sure what you are trying to accomplish maybe elaborate.
          Yes, one sound card on the HS machine. I split the HS machine's line out - one to an amp that feeds AB8SS input A, and one to a separate amp that feeds AB8SS input B. The idea is that I will use Media Player and Sonos as two separate music sources/interfaces with HS - of course only one at a time. The Media Player plugin is so integrated into my home system that I can't dump it yet - I want to keeping it working at least until I get Sonos fully integrated into touchscreens, events, Stargate, scripts, etc.

          When I use the MP plugin for music, HS pauses music and resumes it after TTS announcements. Nearly all my announcements originate from numerous scripts that all use hs.speak "announcement".

          So I was hoping that Sonos could work the same way. I wanted Sonos music to pause when it sees a HS line-out signal coming into the Sonos line-in, and then resume playing after the announcement ends. That way, I can use the same existing scripts and events for announcements no matter what music source I am using. At this point, with only one zone, I don't need to link zones.

          Thanks for the explanation of the difference between TTS via Sonos input and "Speak to file" with no connection. That has sunk in. By the way, checking TTS field in the linkgroup doesn't seem to make any difference. I just updated from version .88 to .104 - no difference.

          I don't want to use "speak to file" because that would involve changing many scripts to use/add hs.speakex 60 "announcement", rather than just leaving all my existing hs.speak lines. I am trying to get hs.speak from HS line-out coming into the Sonos line-in to interrupt music and then Sonos to resume playing after it finishes. That is what I can't seem to figure out.

          So taking one thing at a time - attached is a cleaned-up debug of Sonos playing a library album, HS line-out run into Sonos line-in, Proxy flag unchecked, Force Wait flag checked, Speak to File unchecked, TTS checked in a linkgroup called TTS, initiate a script hs.speak "testing 1...10". On the Sonos Room Settings, I have line-in source named Computer, source level set at Level 8, autoplay room set to House (my Connect). What happens is - music stops; Sonos switches to Source Computer, Room House; Sonos volume starts at about zero and slowly increases to 100% by the time the announcement gets to 9 10. So I miss the announcement because the volume was down for most of it. Sonos stays on Source Computer and does not switch back to the album, which is still stopped of course.

          Thanks for bearing with me.
          Attached Files
          Mark

          Comment


            #6
            Originally posted by Mark S. View Post
            I don't want to use "speak to file" because that would involve changing many scripts to use/add hs.speakex 60 "announcement", rather than just leaving all my existing hs.speak lines. I am trying to get hs.speak from HS line-out coming into the Sonos line-in to interrupt music and then Sonos to resume playing after it finishes. That is what I can't seem to figure out.

            Proxy flag unchecked,
            OK, almost there. You need to keep the SpeakerProxy flag on else the PI won't be intercepting any announcements, it's like an off switch for the TTS functions. So that's why nothing is happening.

            One more thing to clarify, using speaktofile has nothing to do with whether you can use hs.speak versus hs.speakex, the clue is that the PI needs to know what it should grab and what it should let pass.

            See it this way, first of all the Speakerproxy flag will cause ANY speak event to flow through the PI. Every event that comes through will be "analyzed". The PI will look whether a Host with prefix $SONOS$ is present or whether the Device ID is equal to the one set to the linkgroup. If neither matches, the announcement is passed on to HS and will come out as normal Speech.

            So when you use hs.Speak, you cannot set the deviceid in your script but it is actually fixed set to value 100. So you use that in your linkgroup.

            The way to find out what the device ID is, is to turn the Sonos PI debug flag on and look for this log entry

            SpeakIn called for Device = 100, Text = hello 1 2 3 4, Wait=False, Host =

            As you can see the device Id = 100. A lot of other scripts will use deviceid=0. So if you have more than one to intercept than create more than one linkgroup with the same configuration but different SpeakerDevice IDs. Even if you have one player, you need to create a linkgroup and you can create as many as you want, with different Speaker Device IDs, different volume settings for day or night etc.

            Once the PI has a match it really doesn't matter whether you use SpeakToFile or old school TTS, the former is more of a convenience as you would not need any cable.

            Makes sense?

            The attached log showed absolutely nothing because you didn't have the SpeakerProxy flag on

            Dirk

            Comment


              #7
              Woo hoo. I think we got it.

              I left the proxy off for the test because 1) that was the default setting on the plugin after install, 2) I was getting the same behavior whether I had proxy set or not, and 3) I assumed that an automatic pause/resume for line-in was built into the Connect and independent of the plugin. Duh.

              But it was your explanation of device id and how the plugin intercepts them - that's when the light suddenly came on. I did not realize that the default id was 100. Once I plugged that into the Link Group table, all seems to be working as I wanted. As suggested, I will create multiple groups (100, 0) for each speak id from HS.

              I will play with it some more to make sure I can manage to get all my existing scripts/events working with Sonos.

              Thank you very much, Dirk. Great support.
              Mark

              Comment

              Working...
              X