0.0.2 • Published 11 months ago

use-speech-vue3 v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

安装

npm i use-speech-vue3
yarn add use-speech-vue3
pnpm i use-speech-vue3
import {useSpeechRecognition} from "use-speech-vue3";

const onSTTResult = (result?: string) => {
    console.log(result)
}

/**
 * autoRestart: 识别意外中断后是否自动重新开始识别
 */
const {results, speeching, speechTimer, start, stop} = useSpeechRecognition({ onresult: onSTTResult, autoRestart: true })

// 开始识别
await start()
// 停止识别
const content = await stop()
0.0.2

11 months ago

0.0.1

11 months ago