- Posted on
Sun Apr 02, 2023 5:44 am
-
anyone
offline
-
- Posts: 125
- Joined: Apr 03, 2011
- Location: Norfolk, VA
Thanks for the suggestions.
After considering your advice, I have implemented the scripting support that you built in for my plugin. The implementation allows users to select pre-built announcements from within my plugin
However, I've encountered a challenge when it comes to building and testing announcements. When the "Speak Announcement" button is pressed, the built-in synthesizer is the one that speaks. Since the built-in synthesizer may not recognize certain speech commands, it can be challenging to build complex speech strings. Unfortunately, I see no easy way to implement redirection of the speech output for this button.
Another challenge I've faced relates to refreshing. When an announcement is triggered, it needs to be refreshed to ensure that the announcement reflects the current state of the variable or device. Without this refresh, there can be a gap between the last refresh and the current state.
For instance, I have a trigger that announces the title and artist every time a song changes when listening to Apple Music. To implement this using your plugin, the announcement needs to be refreshed, and after a 1 second delay, the state value can be used. Otherwise, the current song's information will not be spoken.
To get around this issue, I've been accessing the plugins preference file to use the Indigo substitution string. This involves accessing com.fogbert.indigoplugin.announcements.txt, in a similiar manner that your plugin does to extract the substitution string. While this workaround is effective, I'm still experimenting with other ways to do it because I question if this is the best solution.
By the way, I noticed that line 270 in the runConcurrentThread(self) was commented out. I'm curious if this was intentional or if it was mistakenly commented out. Uncommenting it seemed to resolve issues I was experiencing related to updating announcement states.
Overall, I am pleased with the progress of the implementation and appreciate your feedback.