- npm install svelte-speech
- in your script add:
import SvelteSpeech from "svelte-speech";
- In your HTML add:
<SvelteSpeech text={"Hello World"} bind:play />
- volume: range: 0 - 1
- Pitch: range 0 - 2
- Rate (speed): 0.2 - 2
- bind:voices: bind all available voices to a variable
voice=voices[indexOfSelectedVoice]
: select one of the available voices