最近chrome实时字幕支持所有语言了,但是开关在设置里每次切换太麻烦,有没有方便的方法?
但它那个翻译质量真的很难顶啊。
我不确定可不可以用您试试使用autohotkey脚本
有二种脚本都试试吧 存档存成utf-8 bom .ahk
第一种
热键 F1 来打开或关闭 Chrome 的实时字幕功能。请注意,这个脚本假设你的 Chrome 浏览器已经打开,并且实时字幕的设置在「设置」页面的「高端」部分。
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
F1::
{
ControlGet, hwnd, hwnd, , Chrome_RenderWidgetHostHWND1, ahk_class Chrome_WidgetWin_1
if (!hwnd)
return
WinActivate, ahk_id %hwnd%
Send, ^+s ; 打开设置页面
Sleep, 1000
Send, {Tab 13} ; 移动到「高端」部分
Send, {Enter}
Sleep, 500
Send, {Tab 6} ; 移动到「实时字幕」开关
Send, {Space} ; 切换开关
Send, ^w ; 关闭设置页面
}
return
第二种
- 当您按下
F1
键时,脚本会检查是否有一个Chrome窗口存在。 - 如果存在,脚本会激活该窗口,并发送快捷键
Ctrl+Shift+L
来切换实时字幕。 - 如果Chrome没有运行,脚本会显示一个消息框告诉您Chrome没有运行。
; Define a hotkey (F1) to toggle live captions in Chrome
F1::
; Activate the Chrome window
IfWinExist, ahk_class Chrome_WidgetWin_1
{
; If Chrome is found, make it the active window
WinActivate
; Send the shortcut key to toggle live captions
Send, ^+l
}
else
{
; If Chrome is not found, display a message
MsgBox, Chrome is not running.
}
return
我一般都关闭状态