Rhetorician is a svelte wrapper around the experimental Web Speech API. It provides UI components for speech recognition and text to speech.
Install rhetorician from NPM
yarn add rhetorician
Import the CSS into your project
import "rhetorician/bundle.css"
Import the components into your project.
<script>
import { SpeechRecognition, TextToSpeech } from "rhetorician"
let transcript
</script>
<SpeechRecognition bind:transcript />
<textarea bind:value={transcript} />
<TextToSpeech {transcript} />
To develop rhetorician locally:
Install the dependencies...
cd rhetorician
yarn
...then start Rollup
npm run dev
Navigate to localhost:5000. You will see the example application and can play around with it by recording speech and playing it back using the 2 components rhetorician provides.