Re: Changing voice in VoiceOver
Re: Changing voice in VoiceOver
- Subject: Re: Changing voice in VoiceOver
- From: Axel Luttgens <email@hidden>
- Date: Tue, 16 Nov 2010 22:55:07 +0100
Le 14 nov. 2010 à 23:03, André Renault a écrit :
> My friend is looking to change the voice used with a simple keystroke. We got the keystroke part down, but not changing the voice. He's got two voices (for this example we'll call them Alex and Luciano). With Shift-Command-1 he'd like Alex and Shift-Command-2 he'd like Luciano.
>
> Can someone provide a pointer for this? I've looked through the VoiceOver dictionary and didn't see anything for this - is this some 'defaults write' command?
Hello André,
You already got many replies on the list; please find hereafter a non-GUI attempt.
HTH,
Axel
-- Vey, very empirical... usual caveats apply.
on VO_SetVoice(V)
local VOURunning, VORunning
tell application "System Events"
set VOURunning to exists application process "VoiceOver Utility"
set VORunning to exists application process "VoiceOver"
end tell
-- The utility seems to regularly update the plist. One could just tell it to
-- quit; here, we let the user decide.
if VOURunning then
display dialog "Please quit VoiceOver Utility."
return
end if
-- Write desired voice into the plist.
do shell script "defaults write ~/Library/Preferences/com.apple.VoiceOver3/default SCRCategories_SCRCategorySystemWide_SCRSpeechComponentSettings_SCRVoiceIdentifier com.apple.speech.synthesis.voice." & quoted form of V
-- Ask VoiceOver to re-read its configuration. Since it seems to run on
-- behalf of the logged in user, there should be no need for hazardous
-- administrator privileges.
if VORunning then ¬
do shell script "killall -HUP VoiceOver"
end VO_SetVoice
VO_SetVoice("Alex")
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden