Announcement

Collapse
No announcement yet.

Speak from scripts?

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

  • Speak from scripts?

    My speak logic is somewhat complex (for each TTS event, check overall occupancy, individual occupancy, time of day, etc., then either speak it locally, remotely via Automate on our Android handsets, or not at all based on priority and individual), therefore I can't rely on an event action. Instead, I have a single "announce" script that takes parameters and then does hs.speak.

    I'm currently running TuneBlade on my Windows box to route all sound (including output from HS Speaker) to my raspberry pi's (running shairport-sync), and it's working quite well. I was about to write a plugin to control the status/volume of the connected "airplay" devices when I stumbled on yours; the only thing it's missing, as far as I can tell, is support for speaking from a script, which would be an easy function to add, if it doesn't exist already... am I missing something?

  • #2
    The AirplaySpeak plugin works as a speak proxy, i.e it uses native Speak actions and reroute them to Airplay Speakers when it detects the target speaker is an Airplay Speaker (or when you don't specify any target).
    So you should be able to use the Speak action in your scripts like this:
    Code:
    hs.Speak("This is a test for Airplay Speak scripting", True, "Airport Express 1")
    where "Airport Express 1" is the name of my airplay speaker

    Comment


    • #3
      Originally posted by spud View Post
      The AirplaySpeak plugin works as a speak proxy, i.e it uses native Speak actions and reroute them to Airplay Speakers when it detects the target speaker is an Airplay Speaker (or when you don't specify any target).
      So you should be able to use the Speak action in your scripts like this:
      Code:
      hs.Speak("This is a test for Airplay Speak scripting", True, "Airport Express 1")
      where "Airport Express 1" is the name of my airplay speaker
      Ok, thanks - that's what I was hoping. Long story short, my clients had flaked out but the audio was still being piped through TuneBlade, so I was still hearing sound files, just no TTS.

      Comment

      Working...
      X