Speech module enhancements
Zoot last edited by
Here are a couple suggestions for the speech module, which I find to be one of the most fun parts of Pythonista.
Since speech is acync, it's easy to end up accidentally queuing up some ridiculous amount of speech in a loop etc. Perhaps when a script is stopped explicitly by pressing the stop button you could cancel all pending speech output?
A really useful enhancement would be to have an API that would enumerate the valid BCP-47 codes for voices. As noted here:
"Unfortunately Apple does not list all of the supported language codes in the class documentation but mentions they need to be BCP-47 codes. Luckily you can retrieve the codes for the full list of supported languages with the AVSpeechSynthesisVoice class method +speechVoices".
That would let a script present a scroll picker widget to select the desired voice, or choose a random voice, etc.
omz last edited by
Good suggestions, thanks!