Skip to content

useSpeechRecognition

类别
导出大小
721 B
最近修改
2 days ago

响应式 语音识别

🌐 Reactive SpeechRecognition.

我可以使用吗?

示例

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

以下显示了选项的默认值,它们将被直接传递给 SpeechRecognition 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,
})