gpt4 book ai didi

macos - 将 Mac OSX 听写与语音 API 结合使用

转载 作者:行者123 更新时间:2023-12-02 10:29:23 26 4
gpt4 key购买 nike

在 OSX Mavericks 中,现在包含语音听写功能,并且非常有用。我正在尝试使用听写功能创建自己的数字生活助手,但我找不到如何使用识别功能在应用程序而不是文本框中获取语音。

我研究过 NSSpeechRecognizer,但这似乎适合使用预定义的语法而不是听写来编程可说出的命令。我使用什么编程语言并不重要,但 Python 或 Java 会更好......

感谢您的帮助!

最佳答案

您可以使用SFSpeechRecognizer ( mirror )(需要 macOS 10.15 +):这是为语音识别而设计的。

Perform speech recognition on live or prerecorded audio, receive transcriptions, alternative interpretations, and confidence levels of the results.

正如您在问题 NSSpeechRecognizer 中指出的那样(mirror)确实提供了一种“命令和控制”风格的语音识别系统(命令短语必须在收听之前定义,这与听写系统相比,其中识别的文本不受限制)。

来自https://developer.apple.com/videos/play/wwdc2019/256/ (mirror):

enter image description here

另一种方法是直接使用Mac听写,但据我所知,唯一的方法是重定向音频源,这不是很简洁,例如请参阅http://www.showcasemarketing.com/ideablog/transcribe-mp3-audio-to-text-mac-os/ (mirror)。

关于macos - 将 Mac OSX 听写与语音 API 结合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20956946/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com