Ahh, I guess I missed the point that you wanted to use their default VO settings. Not sure there is a way to do that unless you pull their preferences and use the same ones for your speech. Not that there is also a set of commands to give in-text directives so you can do

say "[[pbas 50;rate 500]]Hello there"

Still doesn't pull those settings from the VO defaults but at least you can set anything you want. Details of other commands here:

https://developer.apple.com/library/mac/#documentation/userexperience/Conceptual/SpeechSynthesisProgrammingGuide/FineTuning/FineTuning.html#//apple_ref/doc/uid/TP40004365-CH5-SW10

CB

On 9/13/12 7:42 AM, Alex Hall wrote:
Yes you could, but what if the user's voice is not what I set? I don't want 
this for just me, it has to work for anyone who uses the package. Interfacing 
directly with vo is the only way to do that.
On Sep 12, 2012, at 5:31 PM, Chris Blouch <[email protected]> wrote:

I guess since I don't know Applescript I keep going to the shell. You can set 
the rate and voice for the say command using various flags:

say -v Bruce "help" -r 400

So wouldn't you be able to do something like

os.system("say -v Bruce 'help' -r 400")

CB

On 9/12/12 4:09 PM, Alex Hall wrote:
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.



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