Yes, like this:
import os
os.system("""osascript 'say "hello"'""")
The problem is that say does not honor vo settings. For instance, vo uses 
Serena on my system, but my default voice is Alex, so I know the difference 
(particularly helpful in chess). I want to use vo itself so that all settings 
are used, regardless of the system's defaults. I know it can be done, as this 
output command is in vo's dictionary in script editor, I just don't know the 
right syntax to use.
On Sep 12, 2012, at 4:03 PM, Chris Blouch <[email protected]> wrote:

> Can you use Python to execute shell scripts? Then you could invoke
> 
> say "sometext" to get your speech output from Python.
> 
> CB
> 
> On 9/11/12 6:17 PM, Alex Hall wrote:
>> Hi all,
>> I'd like to use osascript to tell vo to output text, which would be part of 
>> a python module. Long story short, can someone provide a quick example of 
>> the exact syntax? I thought it might be:
>> osascript tell voiceover to output "hello world"
>> but I'm guessing at punctuation and exact wording. Any help would be great. 
>> Thanks.
>> 
>> 
>> Have a great day,
>> Alex (msg sent from Mac Mini)
>> [email protected]
>> 
>> 
>> 
> 
> -- 
> ¯\_(ツ)_/¯
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "MacVisionaries" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/macvisionaries?hl=en.
> 



Have a great day,
Alex (msg sent from Mac Mini)
[email protected]



-- 
You received this message because you are subscribed to the Google Groups 
"MacVisionaries" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/macvisionaries?hl=en.

Reply via email to