-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add speech recognition to chat interface #1541
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the idea of this PR, thanks for the contrib! I tried it a bit and I think it could be a great addition.
Couple points:
- We should check if the browser supports webgpu, I tried it on firefox and it failed silently initially because it's not supported by default. If that's the case maybe we should hide the icon?
- Would be nice to have some kind of download indicator for the transcription model, maybe a small download bar below the mic icon when you press it? Otherwise you get no feedback until it's done.
- We already have a few loading animations, do you think we could be using these instead? (
src/lib/components/icons/IconLoading.svelte
andimport EosIconsLoading from "~icons/eos-icons/loading";
) - Sometimes I stop recording and record again and it seems to transcribe the previous recording only. Overall this is super cool but maybe the audio chunks should be cleared when you start a new recording ?
} | ||
|
||
onMount(() => { | ||
const microphoneButton = document.querySelector("#microphone-button"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With svelte, it's usually best to bind to the element instead of using a query selector if possible using bind:this https://svelte.dev/docs/svelte/bind#bind:this
You should also just be able to use on:click directly no?
No description provided.