Skip to content

useSpeechRecognition

反应式 SpeechRecognition

¥Reactive SpeechRecognition.

我可以用吗?

¥Can I use?

示例

Your browser does not support SpeechRecognition API, more details

用法

¥Usage

ts
import { useSpeechRecognition } from '@vueuse/core'

const {
  isSupported,
  isListening,
  isFinal,
  result,
  start,
  stop,
} = useSpeechRecognition()

选项

¥Options

下面显示了选项的默认值,它们将直接传递给 语音识别 API

¥The following shows the default values of the options, they will be directly passed to SpeechRecognition API.

ts
useSpeechRecognition({
  lang: 'en-US',
  interimResults: true,
  continuous: true,
})