useSpeechSynthesis

useSpeechSynthesis

リアクティブなSpeechSynthesis

Can I use?

使用法

import { useSpeechSynthesis } from '@vueuse/core'

const {
  isSupported,
  isPlaying,
  status,
  voiceInfo,
  utterance,
  error,
  stop,
  toggle,
  speak,
} = useSpeechSynthesis()

オプション

以下はオプションのデフォルト値を示しています。これらはSpeechSynthesis APIに直接渡されます。

import { useSpeechSynthesis } from '@vueuse/core'
// ---cut---
useSpeechSynthesis({
  lang: 'en-US',
  pitch: 1,
  rate: 1,
  volume: 1,
})