• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Changing voice in VoiceOver
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Changing voice in VoiceOver (From: André Renault <email@hidden>)

  • Prev by Date: Re: Invisible Unix "Icon" File
  • Next by Date: Re: Outlook 2010
  • Previous by thread: Re: Changing voice in VoiceOver
  • Next by thread: do shell script undesired behaviour (!)
  • Index(es):
    • Date
    • Thread