add voice input to agent chat#564
Conversation
- Voice dialog with live Web Speech API transcription and fluid orb visual - MicrophoneIcon added to nucleo icon set - Allow same-origin microphone in Permissions-Policy Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@swamimalode07 is attempting to deploy a commit to the Databuddy OSS Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds browser-based voice input to agent chat. The main changes are:
Confidence Score: 4/5The speech-recognition restart path can leave an old session active after a rapid dialog reopen.
apps/dashboard/components/agent/hooks/use-speech-transcription.ts Important Files Changed
Reviews (1): Last reviewed commit: "added brand colors for the orb" | Re-trigger Greptile |
| recognition.onend = () => { | ||
| if (!shouldListenRef.current) { | ||
| return; | ||
| } | ||
|
|
||
| try { | ||
| recognition.start(); | ||
| } catch { | ||
| shouldListenRef.current = false; | ||
| setError("Voice input stopped unexpectedly. Please try again."); | ||
| setStatus("error"); | ||
| } | ||
| }; |
There was a problem hiding this comment.
When the dialog is closed and immediately reopened, the old recognizer can deliver its queued onend after start() has set the shared listen flag back to true for the new recognizer. The old callback then starts a second session, which can produce microphone-in-use errors or transcript events from the closed dialog.
| recognition.onend = () => { | |
| if (!shouldListenRef.current) { | |
| return; | |
| } | |
| try { | |
| recognition.start(); | |
| } catch { | |
| shouldListenRef.current = false; | |
| setError("Voice input stopped unexpectedly. Please try again."); | |
| setStatus("error"); | |
| } | |
| }; | |
| recognition.onend = () => { | |
| if ( | |
| !shouldListenRef.current || | |
| recognitionRef.current !== recognition | |
| ) { | |
| return; | |
| } | |
| try { | |
| recognition.start(); | |
| } catch { | |
| shouldListenRef.current = false; | |
| setError("Voice input stopped unexpectedly. Please try again."); | |
| setStatus("error"); | |
| } | |
| }; |
Description
Permissions-Policyheader to allow same-origin microphone and added aMicrophoneIconto the shared icon setChecklist
Summary by cubic
Adds voice input to agent chat via a mic button and dialog that transcribes speech live on-device using the Web Speech API. Improves the typing flow with quick confirm and a responsive visual without adding dependencies or sending audio to servers.
New Features
Bug Fixes
Written for commit e77915b. Summary will update on new commits.