-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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-to-text-in-chat #182
add-speech-to-text-in-chat #182
Conversation
Someone is attempting to deploy a commit to a Personal Account owned by @StanGirard on Vercel. @StanGirard first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thanks for the PR ! This is so cool. Can you please fix the issues that raised in the CI. To find out you can run |
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.
Fantastic job on the PR, @YifeiShi99!
This is a really cool feature. Well done!
frontend/app/chat/page.tsx
Outdated
const SpeechRecognition = | ||
(window as any).SpeechRecognition || | ||
(window as any).webkitSpeechRecognition; | ||
const mic = new SpeechRecognition(); |
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.
Just discovered @types/dom-speech-recognition
, which can be a solution to the CI error
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.
have implement using @types/dom-speech-recognition, it seems like it did fix the CI error, thanks for the suggestion!
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.
*in the latest commit
frontend/app/chat/page.tsx
Outdated
mic.onerror = (event: any) => { | ||
console.log(event.error); | ||
setIsListening(false); | ||
}; | ||
|
||
mic.onresult = (event: any) => { | ||
const interimTranscript = | ||
event.results[event.results.length - 1][0].transcript; | ||
setQuestion((prevQuestion) => prevQuestion + interimTranscript); | ||
}; | ||
|
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 the @types/dom-speech-recognition
, we'll no longer need to manually type these events
frontend/app/chat/page.tsx
Outdated
const mic = new SpeechRecognition(); | ||
|
||
mic.continuous = true; | ||
mic.interim = true; |
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.
It seems to be interimResults
instead of interim
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.
has been fixed in the commit
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.
Great PR.
Please implement the changes requested by @mamadoudicko and the fix the CI errors and this will be merged!
thanks guys! have implement the changes requested by @mamadoudicko and fixed CI errors in new commit |
Well done @YifeiShi99! Thank you |
* add-speech-to-text-in-chat * implement change request and fix CI error
add speech to text in chat page use Web Speech API, from issue #81