Announcer update? To find some alternative to "play sound"?

Posted on
Mon Jul 01, 2019 4:53 pm
shapa offline
Posts: 483
Joined: Sep 08, 2014
Location: Swindon

Announcer update? To find some alternative to "play sound"?

Using Announcer Plugin a lot - directly connected speakers to my mac home server. Simple and efficient to announce messages, not relying on internet connection.

With the latest OS (10.14+), after reboot - "software is not compatible" on the first call, because of playsound is 32bits. So I need to login remotely and push the button.
Unfortunately, there is no way to switch off the nag message anymore - Apple is pushing developers to upgrade.

Is it possible to use some alternative tool? Or built-in functionality?

Posted on
Mon Jul 01, 2019 5:35 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Announcer update? To find some alternative to "play soun

Simple script that spawns an external process that uses the say terminal command:

Code: Select all
from os import system
system('say Hello world!')


Or, you can directly call macOS APIs:

Code: Select all
from AppKit import NSSpeechSynthesizer
speechSynthesizer = NSSpeechSynthesizer.alloc().init()
speechSynthesizer.startSpeakingString_('Hello world!')

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Jul 01, 2019 5:59 pm
shapa offline
Posts: 483
Joined: Sep 08, 2014
Location: Swindon

Re: Announcer update? To find some alternative to "play soun

I know, thanks :)

But announcer is a bit more convenient.
Attachments
Screenshot 2019-07-02 00.54.55.png
Screenshot 2019-07-02 00.54.55.png (211.56 KiB) Viewed 1974 times

Posted on
Mon Jul 01, 2019 11:05 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Announcer update? To find some alternative to "play soun

Hi shapa.

Thanks for the reminder. @Jay: Thanks for the scripting tips too.

The primary reasons for relying on Play Sound with the Announcer plugin, as opposed to using basic command-line "say" functionality or macOS API calls were 1) Play Sound is multi-threaded. It can play multiple audio streams simultaneously which is perfect if you want to have background "ambiance" to play behind the spoken announcement. You can't do that with the "say" command. I'm not at all familiar with the macOS API. Perhaps that can be done using that method, though it'd probably require a fair bit of work to implement. And 2) Play Sound audio output can be hijacked by AirFoil and sent to any number of AirPlay speakers simultaneously. This is also the reason for the "Use Specific Copy of Play Sound" option in that dialog. By having multiple copies of Play Sound running, you can actually have multiple simultaneous announcements playing at once all being sent to different AirPlay speakers. I believe the "say" command uses the same macOS API calls to generate the audio, which means that in order for AirFoil to send the output to another speaker, it'd have to send all system audio to the other speaker, not just the output produced by Announcer.

In any case, I'll see what I can come up with, but unfortunately, the Play Sound developer has been long absent with no trace of the original code and no equivalent, at least of which I'm aware. If I can't find a solution, the options are to either discontinue the Announcer plugin or severely handicap its functionality, rendering it no more useful than the built-in "Speak" option found at the bottom of all Indigo event settings. (No disparagement toward that feature intended).

Posted on
Tue Jul 02, 2019 2:15 pm
shapa offline
Posts: 483
Joined: Sep 08, 2014
Location: Swindon

Re: Announcer update? To find some alternative to "play soun

Actually, the developer moved here:

http://david.blache.net

Tried to contact him...

Posted on
Sun Sep 29, 2019 7:16 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Announcer update? To find some alternative to "play soun

How was the contact? :D

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests