feat(voice): batch STT via Yapper (Phase 1)#105
Merged
Conversation
MediaRecorder wrapper with runtime mimeType negotiation (WebM/Opus preferred, MP4 fallback for Safari), auto-stop timer, cancel support, and FormData helper for Yapper transcription endpoint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Yapper health polling (30s interval), browser mic permission flow, MediaRecorder capture, and POST /v1/transcribe for batch transcription. Graceful degradation when Yapper is unavailable or mic is blocked. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hold-to-record button with pointer events. States: hidden (unavailable), idle, recording (red pulse), transcribing (spinner), mic-blocked. Cancel on pointer leave. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ChatInput accepts optional voice prop, renders MicButton in the input row. Transcript is inserted into the textarea on recording stop. ChatView owns useVoice hook and passes it down. Mic button CSS with recording pulse, transcribing spin, and blocked states. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verifies mic button visibility, recording state, transcript insertion, mic-blocked display, and graceful absence when voice prop is omitted. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs(design): tts playback design doc (phase 2) Covers: useVoice TTS extension, text chunking with pipelining, AudioContext playback, VoiceSettings component, ChatView auto-speak on message_end, interruption rules, voice selection, and error handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs(design): address review feedback on tts design - AudioContext reuse: singleton with lazy creation and cleanup - AbortController on synthesize() for cancellable fetches - Track messageId instead of messages.length for TTS trigger - Simplify to sequential playback for MVP (no pipelining) - Lazy voice list fetch (on first TTS enable, not mount) - Dynamic default voice from /v1/voices response Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
audio.ts): MediaRecorder wrapper with runtime format negotiation (WebM/Opus preferred, MP4 fallback for Safari), auto-stop timer, cancel support, and FormData helper for Yapper's/v1/transcribeendpointuseVoice.ts): Yapper health polling (30s), browser mic permission flow withmicBlockedstate, recording state machine, and batch transcription via POSTvoiceprop on ChatInput, transcript inserted into textarea for user review before sending. Voice is purely opt-in — Mitzo works identically without YapperFrontend-only — server and v2 protocol are untouched. Follows the voice integration design doc.
Test plan
🤖 Generated with Claude Code