Converting ActionGroup to Python

Posted on
Wed Oct 16, 2019 10:08 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Converting ActionGroup to Python


I am not sure if I should post this in this plugin section or in the script section. Anyways:

I have a Notification category that has a minor problem after I converted my Applescripts to Python,
I use an action group that plays a sound via afplay before an announcement is spoken.
Code: Select all
import subprocess"/usr/bin/afplay /Users/wilhelm/Music/STARWAVE/c827.WAV",shell=True)

This AG is set in the "before speech" option of the notification category. This AG used to play a common sound using the "do shell script" statement calling afplay in an embedded AppleScript.
So the sound was played before the announcement was spoken by the OS.
After convertion that mini scipt to python I realize, that the sound and the spoken text are produced simultaneously - I suppose the phython script runs in an additional thread so both are ececuted nearly at the same time.
What can I do?

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest