Q: What is the keyboard shortcut for changing dictation language in Yosemite?
I can't find the keyboard shortcuts to change the dictation language in Mac OS X?
I would really appreciate if someone help me with this problem. I work with two languages and I really can't find any way to do that.
Thanks for your help guys
MacBook Pro with Retina display, OS X Yosemite (10.10.1), Mail forwarding problem
Posted on Apr 7, 2015 4:07 AM
Until the developer can release dictationswitcher compatible with Yosemite, here is an AppleScript that will toggle between two languages. After it switches, it will speak which language has been set. Currently, the spoken text is in English (United States). This script will work on Yosemite and Mavericks. Tested.
What you need to do to get this to work.
- Add your alternative language to the Dictation Language pop-up.
- Set your languages in the AppleScript property strings exactly as they appear in the Dictation Language Menu.
- Copy/Paste the following AppleScript into your Script Editor (/Applications/Utilities).
- Click the hammer (compile) button
- Save once as File format text (dictation.applescript) - don't hide the extension, or check any of the checkboxes.
- Option+Save As… File format Application to your Desktop. Hide the extension, and check no other checkboxes.
The first time that you run this application, you will receive a dialog box just like the one below (I changed the name back to dictation):
Click Open System Preferences. Click on the gold lock button in the lower left corner. The Accessibility category will be selected, but the dictation application in the list of apps will be unchecked. Check it, and then click the gold lock again. Quit out of the dictation application on your Desktop, and run it again. If you happen to get another dialog indicating that it still does not have permission, revisit the System Preferences > Security & Privacy panel, and under the Privacy tab > Accessibility, uncheck the dictation application, and then recheck it again. Quit System Preferences. This happened to me, and following this second action allowed it to work properly.
Future releases of OS X may impact this application if Apple changes the order of the UI elements.
I modified this AppleScript from an Apple StackExchange post by qegal in 2012.
Copy/Paste the following AppleScript into your Yosemite Script Editor per the above instructions.
property defaultLang : "English (United States)"
property altLang : "German (Germany)"
-- property altLang : "French (France)"
tell application "System Events" to set p to (path to frontmost application) as string
tell application "System Preferences"
activate
reveal anchor "Dictation" of pane "com.apple.preference.speech"
end tell
tell application "System Events"
tell process "System Preferences"
tell pop up button 1 of tab group 1 of window "Dictation & Speech"
click
try
if (get value of attribute "AXValue") contains defaultLang then
click menu item altLang of menu 1
say "Dictation set to " & altLang
else if (get value of attribute "AXValue") contains altLang then
click menu item defaultLang of menu 1
say "Dictation set to " & defaultLang
end if
on error errmsg number errnbr
tell process "System Preferences" to if it is running then quit
display alert altLang & "not configured in Dictation Languages, please add." as critical giving up after 10
end try
end tell
end tell
end tell
quit application "System Preferences"
activate application p
Posted on Apr 7, 2015 8:38 AM
