Announcement

Collapse
No announcement yet.

Adding a chime before speaking

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

  • Adding a chime before speaking

    Just started using the plugin and appreciate it.

    I would like to have a chime sound before spoken announcements so have successfully done this as follows:

    In each event with an announcement I have TWO speaking items; first is to play a chime file and second is the actual spoken announcement. This works fine with minimal delay to play the chime followed by the spoken announcement.

    Now to get fancy and to avoid having two speaking items in each event I thought - why not use the "Event Before" option on the plugin so I did the following:

    1) Setup an event called "Chimes" that only plays the file with the chime. This works fine when the event is executed by itself.

    2) Set up my announcement events that only speak the specific announcement. These work fine when executed on their own.

    3) Added the "Chimes" event in the "Event Before" option on the Airplay configuration page. - now is where it goes off the tracks...

    After doing step 3 above - when an announcement event is run there is a very long delay followed by the announcement occurring first and the Chime playing after.

    It seems that maybe I created some kind of recursive call with the method that really slows things down and that gets treated like a stack - where the last event pushed down is first event poped back up so that the execution is reverse of expected.

    Any thoughts on accomplishing what I was aiming for or should I just give-in and go with the less elegant approach of two speak items in each event (chime and spoken announcement)?

  • #2
    My event actions for this are:
    * Play Wav File - Set Advanced Option (Red Square) and select "wait for playing to finish:
    * Speak Text - Optionally set to wait for speaking if it's critical. Sometimes, you want info events to not always require the speaking to complete before next event can speak (i.e. batching).

    Also, try experimenting with them as priority events if that doesn't work.

    PS - Sometimes I just want the first few seconds of the Wav file, but keep it running while I speak. Then I'll do the event actions of:
    * Play Wav File X
    * Wait 3 Seconds
    * Speak X

    Comment


    • #3
      Thanks Agile. Just to clarify - are you using Airplay for the events you described? The reason I ask is that for me to get an audio file to play via AirPlay I have to use the "Speak" action with a filename in the text box; the "Play File" action does not seem to work on my AirPlay devices.

      Also, as noted, yes when I put the two Speak actions (Chime and announcement) into the same event they work fine it is when I tried to use the "Before Event" setting in the AirPlay Config page to speak the Chime that I was unsuccessful.

      Comment


      • #4
        I think Agile use the standard HS Speaker clients rather than Airplay speakers. As you noticed, the Play File action doesn't work with the Airplay plugin (or with any other plugin) because it can't be overridden by a plugin (only the Speak action can)

        As you correctly guessed I think having a Speak action in an event used as the "Event Before" option causes a recursive loop so I don't think it can work. Right now the only way of doing what you want that I can think of is to go with 2 speak actions in each event.

        Comment


        • #5
          Spud, thanks for the quick reply. I'll just stick to the double speak actions in the events - no problem. Hopefully this thread will save others some time before they try and get creative like I did with the "Event Before" setting.

          Still a happy plug-in user!

          Comment


          • #6
            Old post but I thought I'd toss something in. I've been thinking about the same thing and I see only one solution and that's to generate the speech then add the chime on the front before leaving speak_to_file.

            I'm going to add this to my features to add list for my PollyC python script that generate speech using Amazon's Polly. However, you'll be able to do it only when using SSML tags.

            Before I add this I'm hoping more people try PollyC. It has some of the most natural sounding speech I've heard in a long time, think Alexa quality, and it makes what comes out of HS3 currently sound like 1990's speech, which it is.
            HomeSeer Version: HS3 Standard Edition 3.0.0.500
            Linux version: Linux auto 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
            System Uptime: 9 Days 1 Hour 6 Minutes 33 Seconds | IP Address: 10.0.2.16 | Number of Devices: 421 | Number of Events: 668 | Available Threads: 399 | HSTouch Enabled: True | Event Threads: 13027

            Enabled Plug-Ins: 3.0.0.13: AirplaySpeak | 2.0.59.0: BLBackup | 3.0.0.56: EasyTrigger | 1.3.7006.42100: LiftMaster MyQ | 3.6.1.3: mcsMQTT | 3.0.0.53: PHLocation2 | 0.0.0.45: Pushover 3P | 3.0.1.258: Z-Wave

            Comment

            Working...
            X