Frontend voice input component (microphone capture + transcription) #402

Closed
opened 2026-02-15 07:35:23 +00:00 by jason.woltje · 1 comment
Owner

Description

Create a React component for voice input that captures microphone audio and sends it for transcription.

Design

  • Microphone button with visual feedback (recording indicator)
  • Uses MediaRecorder API for audio capture
  • Sends audio chunks via WebSocket for streaming transcription
  • Falls back to REST upload for non-streaming browsers
  • Shows partial transcription in real-time
  • Integrates with existing chat input

Component Structure

apps/web/src/components/speech/

  • VoiceInput.tsx — Main mic button + recording UI
  • AudioVisualizer.tsx — Waveform/level visualization
  • useVoiceInput.ts — Hook for mic capture + WebSocket
  • tests/VoiceInput.test.tsx

Acceptance Criteria

  • Microphone permission handling
  • Recording start/stop with visual feedback
  • Audio level visualization
  • WebSocket streaming to /speech gateway
  • Partial transcription display
  • Final transcription inserted into chat input
  • Mobile-friendly touch interaction
  • Unit tests
## Description Create a React component for voice input that captures microphone audio and sends it for transcription. ## Design - Microphone button with visual feedback (recording indicator) - Uses MediaRecorder API for audio capture - Sends audio chunks via WebSocket for streaming transcription - Falls back to REST upload for non-streaming browsers - Shows partial transcription in real-time - Integrates with existing chat input ## Component Structure apps/web/src/components/speech/ - VoiceInput.tsx — Main mic button + recording UI - AudioVisualizer.tsx — Waveform/level visualization - useVoiceInput.ts — Hook for mic capture + WebSocket - __tests__/VoiceInput.test.tsx ## Acceptance Criteria - [ ] Microphone permission handling - [ ] Recording start/stop with visual feedback - [ ] Audio level visualization - [ ] WebSocket streaming to /speech gateway - [ ] Partial transcription display - [ ] Final transcription inserted into chat input - [ ] Mobile-friendly touch interaction - [ ] Unit tests
jason.woltje added this to the M13-SpeechServices (0.0.13) milestone 2026-02-15 07:35:23 +00:00
Author
Owner

Completed as part of M13-SpeechServices milestone on branch feature/m13-speech-services. SP-FE-001: Frontend voice input component (commit 74d6c10, 34 tests). All quality gates passed (lint, typecheck, tests, security).

Completed as part of M13-SpeechServices milestone on branch feature/m13-speech-services. SP-FE-001: Frontend voice input component (commit 74d6c10, 34 tests). All quality gates passed (lint, typecheck, tests, security).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#402