[frontend] Add mic button for direct audio input to multimodal models (#825) #829

Closed
sleepy wants to merge 0 commits from fix/mic-button-audio-825 into main
Owner

Implements #825.

  • Mic button in chat bar, shown only when model supports audio_input
  • Records audio via MediaRecorder, converts to 16kHz mono 16-bit PCM WAV
  • Base64-encodes and sends as audio_data + audio_format in chat FormData
  • 30-second max duration with auto-stop and timer display
  • Red pulse animation while recording
  • Audio attachment indicator with remove option before sending
  • Dispatches odysseus:model-changed event from modelPicker
  • MutationObserver fallback for model selection changes
Implements #825. - Mic button in chat bar, shown only when model supports audio_input - Records audio via MediaRecorder, converts to 16kHz mono 16-bit PCM WAV - Base64-encodes and sends as audio_data + audio_format in chat FormData - 30-second max duration with auto-stop and timer display - Red pulse animation while recording - Audio attachment indicator with remove option before sending - Dispatches odysseus:model-changed event from modelPicker - MutationObserver fallback for model selection changes
- Add mic button to chat bar, shown only when model supports audio_input
- Record audio via MediaRecorder, convert to 16kHz mono 16-bit PCM WAV
- Base64-encode and send as audio_data + audio_format in chat FormData
- 30-second max duration with auto-stop and timer display
- Red pulse animation while recording
- Audio attachment indicator with remove option before sending
- Dispatches odysseus:model-changed event from modelPicker for capability sync
- MutationObserver fallback for model selection changes
- Fix critical: remove !important from display CSS, default to display:none
- Show button via inline style 'inline-flex' only when model supports audio
- Remove dead origUpdateModelPicker variable
- Remove redundant MutationObserver (odysseus:model-changed event is sufficient)
- Remove inline display:none from HTML (CSS default handles it)
sleepy closed this pull request 2026-06-04 11:42:13 +02:00

Pull request closed

Sign in to join this conversation.
No description provided.