useSpeechSynthesis
反应式 SpeechSynthesis。
¥Reactive SpeechSynthesis.
示例
用法
¥Usage
ts
import { useSpeechSynthesis } from '@vueuse/core'
const {
isSupported,
isPlaying,
status,
voiceInfo,
utterance,
error,
stop,
toggle,
speak,
} = useSpeechSynthesis()
选项
¥Options
下面显示了选项的默认值,它们将直接传递给 语音合成 API。
¥The following shows the default values of the options, they will be directly passed to SpeechSynthesis API.
ts
useSpeechSynthesis({
lang: 'en-US',
pitch: 1,
rate: 1,
volume: 1,
})