Skip to content
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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

flozi00
Copy link
Contributor

@flozi00 flozi00 commented Oct 24, 2024

No description provided.

@flozi00 flozi00 marked this pull request as ready for review October 24, 2024 15:12
@nsarrazin nsarrazin self-requested a review October 25, 2024 11:37
@nsarrazin nsarrazin self-assigned this Oct 25, 2024
Copy link
Collaborator

@nsarrazin nsarrazin left a 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 and import 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");
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants