主题
useSpeechSynthesis
响应式 SpeechSynthesis。
🌐 Reactive SpeechSynthesis.
示例
用法
🌐 Usage
ts
import { useSpeechSynthesis } from '@vueuse/core'
const {
isSupported,
isPlaying,
status,
voiceInfo,
utterance,
error,
stop,
toggle,
speak,
} = useSpeechSynthesis()选项
🌐 Options
以下显示了选项的默认值,它们将直接传递给 SpeechSynthesis 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,
})