我喜欢 Mac OS X 的文本到语音功能。由于我的母语不是英语,我很高兴自 Lion 出现以来添加的所有其他语言。但是,我确实使用英语以及我的母语(德语)。改变声音有点痛苦。它只是需要太多的步骤才能舒适。
有什么方法可以使这变得容易吗?我正在寻找快捷方式,也许在右上角的某个地方有一个下拉菜单,任何事情都可以。
由于我的搜索没有成功,我希望在 SuperUser 上找到一些建议。非常感谢!
古罗马
我已经使用 FastScripts 为这个脚本分配了一个快捷方式:
try
set old to the clipboard as record
end try
try
tell application "System Events" to keystroke "c" using command down
delay 0.05
say (the clipboard) using "Kyoko"
end try
try
set the clipboard to old
end try
Run Code Online (Sandbox Code Playgroud)
您还可以在 Automator 中创建服务:
10.7 和 10.8 中存在一个错误,其中 Automator 服务的快捷方式并不总是有效,直到您将鼠标悬停在菜单栏中的服务菜单上。WorkflowServiceRunner 还可以在朗读文本时使用超过 100% 的 CPU。
另一种选择是使用 UI 脚本在两种声音之间切换:
tell application "System Preferences"
reveal anchor "TTS" of pane "com.apple.preference.speech"
end tell
tell application "System Events" to tell process "System Preferences"
tell pop up button 1 of tab group 1 of window 1
click
delay 0.1
if value is "Alex" then
click menu item "Victoria" of menu 1
else
click menu item "Alex" of menu 1
end if
end tell
end tell
quit application "System Preferences"
Run Code Online (Sandbox Code Playgroud)
更改 com.apple.speech.voice.prefs.plist 中的 SelectedVoiceID 键也有效,但我不知道如何立即应用更改。
归档时间: |
|
查看次数: |
7717 次 |
最近记录: |