I know you can't access vo preferences. However, open up Script Editor, go to 
file > open dictionary, and select vo's dictionary. In there is the "output" 
commnd in which I am very interested. I differs from the "say" script command 
in that it will use the vo configuration to speak, not any parameters set in 
the command. This is what I want to get working, and it should be possible if 
only I could get the syntax right.
On Sep 18, 2012, at 5:44 PM, Esther <mori...@mac.com> wrote:

> Hi Alex,
> 
> This is a late reply, but I'll just add to what Chris described.  You
> cannot access any of the default VO settings when you use the "say"
> command.  Also, although you can use all of the embedded speech
> commands (described in the link to the Developer's Document that Chris
> gave you) as part of the "say" command, with arguments to control
> speaking rate, volume, etc. between  the double set of left and right
> brackets, you cannot specify the voice that is used as an embedded
> command.  You can, however, specify the voice as a variable in the
> command line use of the "say" command in Terminal.
> 
> For example, I could type or paste in the following command in
> Terminal, and press return.
> say -v Fred "[[rate 400; volm +0.2]]Do you have anything you want to
> say?"
> The result would be to use the Fred voice, speaking the quoted phrase
> with the rate and volume modifications specified by the embedded
> commands that are enclosed within the double layer of brackets, also
> within the quoted text.
> 
> If you want to play around with voice selections, you can do that in
> Automator.  Some of the actions like "Speak Text" or "Text to Audio
> File" have a pop up menu where you can select the voice to be used.
> 
> HTH.  Cheers,
> 
> Esther
> 
> 
> On Sep 13, 9:18 am, Chris Blouch <cblo...@aol.com> wrote:
>> 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...
>> 
>> 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 <cblo...@aol.com> 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 <cblo...@aol.com> 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 useosascriptto 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:
>>>>>>> osascripttell 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)
>>>>>>> mehg...@gmail.com
>> 
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "MacVisionaries" group.
> To post to this group, send email to macvisionaries@googlegroups.com.
> To unsubscribe from this group, send email to 
> macvisionaries+unsubscr...@googlegroups.com.
> 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)
mehg...@gmail.com



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

Reply via email to