繁体   English   中英

Apple SpeechRecognition 和 Dictation 占用超过 50% CPU

[英]Apple SpeechRecognition and Dictation take more than 50% CPU

我有以下配置的mac

MacBook Pro (Retina, 15-inch, Mid 2015)
OS: macOS Catalina
CPU: 2.5 GHz Quad-Core Intel Core i7
Memory: 16 GB 1600 MHz DDR3
Graphics: Intel Iris Pro 1536 MB

将我的操作系统从Siera更新为 Catalina 后 苹果听写应用程序和语音识别进程( com.apple.SpeechRecognitionCore.speechrecognitiond )在笔记本电脑启动期间启动,我无法终止或停止这些应用程序和进程。 我杀死了那些进程,但这些进程一次又一次地自动启动。

我也从偏好中取消听写并重新启动笔记本电脑,这对我也不起作用。 :(

最危险的是,这些进程占用了我 50% 以上的 CPU,并给我带来了使用 mac 的糟糕体验。

我累死。 我现在该怎么办?

com.apple.SpeechRecognitionCore.speechrecognitiond 是一个守护进程,它将人类语音转换为计算机可以使用的东西,然后将语音与最适合的单词匹配。 据我所知,它启动并持续运行以支持三种不同的 OS X 功能:语音控制、听写和 Siri。

语音控制本身就是一个资源猪,但如果您实际上没有使用听写或积极使用语音控制或 Siri,那么该过程不应该使用那么多的 CPU,当然也不应该减慢您的 MBP 到你对表演不满意的点。 通常,这种资源占用会在存在实际代码错误时发生,但如果系统没有足够频繁地重新启动,就会发生这种情况。 当守护进程长时间运行时,错误可能会蔓延,这不是代码缺陷的结果。 相反,它们通常是读/写错误或存储损坏的结果,因为代码和数据在内存/磁盘和 CPU 本身之间来回分页。 最终,错误累积起来,要么导致进程失控,要么进程崩溃。

我建议大多数人通过-重新启动...或-关闭每周至少启动一次系统循环。 这会触发清理所有容易引起问题的系统缓存的内务例程。

可以通过以下过程在不实际重新启动的情况下清除此特定问题:

  1. 禁用语音控制:->系统偏好设置->辅助功能->语音控制,取消勾选“启用语音控制”。
  2. 禁用听写:->系统偏好设置->键盘->听写->听写:->关闭
  3. 禁用 Siri:->系统偏好设置->Siri,取消选中“启用询问 Siri”。
  4. 强制退出语音识别守护进程:启动活动监视器并选择 com.apple.SpeechRecognitionCore.speechrecognition.d,然后单击“x”按钮并在弹出的对话框中单击“强制退出”按钮。

如果您愿意,现在可以重新启用 Siri 和/或听写,而不会显着影响性能,因为这些功能仅在您使用该功能时加载语音识别守护程序。 不过,语音控制将加载守护进程并使其一直运行。 因此,只有在实际使用时才重新启用语音控制,因为您会损失一些性能。 此外,守护进程应该正常运行,并在您再次关闭语音控制后不久死亡。

希望这能让您按自己的意愿运行,帮助您识别何时出现问题,并让您就使用语音控制和 Catalina 的其他语音识别相关功能做出明智的决定。

干杯!

此脚本禁用 Siri、键盘听写、语音控制,并杀死 com.apple.SpeechRecognitionCore.speechrecognitiond 和 com.apple.SpeechRecognitionCore.brokerd 守护进程

您必须在禁用 Siri 后的 2 秒内单击“关闭”按钮,因为我还没有弄清楚如何让 applescript 自动单击它。

-- TURN OFF SIRI
tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preference.speech"
end tell

delay 0.5
tell application "System Events"
    tell process "System Preferences"
        -- click checkbox "Enable Ask Siri" of window "Siri"

        if value of checkbox "Enable Ask Siri" of window "Siri" is 1 then
            click checkbox "Enable Ask Siri" of window "Siri"
        end if

    end tell
    -- need to click the Enable Button
end tell

delay 5

-- TURN OFF KEYBOARD DICTATION
tell application "System Preferences"
    reveal anchor "Dictation" of pane id "com.apple.preference.keyboard"
    -- activate
end tell
delay 1
tell application "System Events" to tell radio button "Dictation" of tab group 1 of window "Keyboard" of application process "System Preferences" of application "System Events" to if exists then click
tell application "System Events" to tell radio button "Off" of radio group 1 of tab group 1 of window "Keyboard" of application process "System Preferences" of application "System Events" to if exists then click

delay 0.5
tell application "System Preferences"
    reveal anchor "Dictation" of pane id "com.apple.preference.universalaccess"
    -- activate
end tell

delay 3

-- DISABLE VOICE CONTROL
tell application "System Events"
    tell process "System Preferences"
        if value of checkbox "Enable Voice Control" of group 1 of window "Accessibility" is 1 then
            click checkbox "Enable Voice Control" of group 1 of window "Accessibility"
        end if


        --click checkbox "Enable Voice Control" of group 1 of window "Accessibility"
    end tell
end tell

-- KILL SpeechRecognitionCore Deamon
do shell script "killall -9 com.apple.SpeechRecognitionCore.speechrecognitiond"
do shell script "killall -9 com.apple.SpeechRecognitionCore.brokerd"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM