将Mac OSX听写与语音API结合使用 [英] Using Mac OSX Dictation with Speech API

查看:178
本文介绍了将Mac OSX听写与语音API结合使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

In OSX Mavericks, speech dictation is now included, and is very useful. I am trying to use the dictation capability to create my own digital life assistant, but I can't find how to use the recognition functionality to get the speech in an application rather than a text box.

我研究了NSSpeechRecognizer,但这似乎是针对使用预定义的语法而不是听写命令来编写可口的命令.我使用哪种编程语言都没关系,但是Python或Java会很好...

I have looked into NSSpeechRecognizer, but that seems to be geared toward programming speakable commands with a pre-defined grammar rather than dictation. It doesn't matter what programming language I use, but Python or Java would be nice...

感谢您的帮助!

推荐答案

您可以使用 SFSpeechRecognizer (镜像)(需要 macOS 10.15 +):用于语音识别.

You can use SFSpeechRecognizer (mirror) (requires macOS 10.15+): this is made for speech recognition.

对现场或预先录制的音频执行语音识别,接收转录,替代解释以及结果的置信度.

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

正如您在问题 NSSpeechRecognizer (

Whereas as you have noted in the question NSSpeechRecognizer (mirror) indeed provides a "command and control" style of voice recognition system (the command phrases must be defined prior to listening, in contrast to a dictation system where the recognized text is unconstrained).

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

另一种方法是直接使用Mac Dictation,但据我所知,唯一的方法是重新定向音频源,这不是很整齐,例如参见 http://www.showcasemarketing.com/ideablog/transcribe-mp3-audio-to-text-mac-os/(

Another way is to directly use Mac Dictation, but as far as I know the only way is to rerdirect audio feeds, which isn't very neat, e.g. see http://www.showcasemarketing.com/ideablog/transcribe-mp3-audio-to-text-mac-os/ (mirror).

这篇关于将Mac OSX听写与语音API结合使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆