Implements feature request: https://community.gladysassistant.com/t/pouvoir-parl…er-avec-lia-dans-la-page-de-discussion/10282
> ⚠️ This pull request was opened by an automated Claude Code run. It has **not** been tested in a real browser with a real microphone. It needs human review and manual testing (Chrome desktop, Chrome Android, Safari iOS/macOS) before being merged.
### Description
Adds a small microphone button inside the "write your message" input of the Chat / Discussion page, so the user can dictate a message to Gladys' AI instead of typing it.
**Update (following review):** the dictation now uses the **Gladys Plus STT path**, the same path as the dashboard voice assistant widget, instead of the browser's Web Speech API. The audio no longer goes through the browser vendor's speech service (Chrome's Web Speech implementation sends audio to Google): it is recorded locally by the browser and transcribed by Gladys Plus.
How it works:
- Clicking the mic starts recording with the same pipeline as the dashboard voice assistant widget: `recordUntilSilence()` records the microphone through an AudioWorklet, stops automatically when the user stops speaking (or after the max duration), and the audio is normalized to a 16 kHz mono WAV by `normalizeSpeechBlobForStt()`.
- The WAV is posted to the existing **`POST /api/v1/gateway/stt`** endpoint (STT only, no AI call, no TTS), and the transcription is appended to whatever was already typed in the message input.
- While recording, the button turns red and pulses (stop square icon); while the transcription is in flight, it shows a spinner. Clicking the button again cancels the dictation.
- **The message is never sent automatically**: the user reviews the text and presses send, exactly as when typing. Sending a message cancels a running dictation, so a late transcription cannot refill the input that was just emptied.
**Requirements / graceful degradation**
- The mic button is only rendered when **Gladys Plus is configured** (the STT API requires it — the composer already fetches `/api/v1/gateway/status` for the AI model selector) and when microphone recording is available (`isSpeechRecordingSupported()`: getUserMedia + secure context). Otherwise the composer looks exactly as it does today.
- Because recording uses getUserMedia instead of the Web Speech API, **Firefox is now supported** like every other browser.
- Errors are shown as a small message under the composer, translated in en/fr/de: permission denied, no microphone, microphone in use, no speech detected, empty transcription, and a generic fallback. Cancellations are silent.
**Files changed**
- `front/src/routes/chat/ChatVoiceInputButton.jsx`: the mic button component — records with `recordUntilSilence`, posts to `/api/v1/gateway/stt`, appends the transcription to the input.
- `front/src/routes/chat/ChatPage.js`: renders the button when Gladys Plus is configured and recording is supported, holds the error state, cancels dictation on send.
- `front/src/routes/chat/style.css`: styles for the button, its listening/processing states and the error line.
- `front/src/actions/message.js`: `setMessageTextInput` action to set the composer text from a value instead of a DOM event.
- `front/src/config/i18n/{en,fr,de}.json`: `chat.voiceInput` block.
- `front/src/utils/speechRecognition.js`: **deleted** (the Web Speech API wrapper is no longer used).
No server change: the `POST /api/v1/gateway/stt` endpoint and the shared recording utilities (`speechCommandRecorder`, `speechAudioForStt`, `speechMicrophoneAccess`, `recordUntilSilence`) already exist and are used by the dashboard voice assistant widget.
## Forum
Forum: https://community.gladysassistant.com/t/pouvoir-parler-avec-lia-dans-la-page-de-discussion/10282
### Checklist
- [ ] Tests pass: `cd server && npm run coverage` (Codecov requires 100% coverage on changed lines) and Cypress (`npm run cypress:run`) if the UI changed
- [x] Linter and prettier pass on both front and server (`npm run eslint`, `npm run prettier`)
- [x] No undocumented breaking change
Notes on the checklist, filled honestly:
- **Server tests**: not run, this PR contains **no server change at all** (only files under `front/`).
- **Cypress**: not run (needs a running Gladys instance, not available in the automated environment). There is no front unit-test harness in this repo, matching the other front components which are not unit tested.
- **What was actually run and passed in `front/`**: `npm run eslint` (0 errors, no new warnings in the changed files), `npm run prettier-check`, `npm run compare-translations` (en/fr/de complete), and `npm run build`.
- **Not tested**: the actual voice behaviour in a real browser with a real microphone, and the visual result of the button. Please check the layout of the composer (the mic sits just left of the send button) on desktop and mobile.
---
_Generated by [Claude Code](https://claude.ai/code/session_013yxguVaLdJ8ZKmw5x3HePT)_
## Summary by CodeRabbit
- **New Features**
- Added voice input to chat, allowing users to dictate messages through their microphone.
- Displays listening, processing, transcription, and error states with accessible controls.
- Automatically adds transcribed speech to the chat composer.
- **Localization**
- Added voice-input translations in English, French, and German.
- **Style**
- Added responsive microphone controls, status indicators, animations, and reduced-motion support.
## Summary by CodeRabbit
* **New Features**
* Added voice input to chat using the device microphone.
* Transcribed speech is inserted directly into the chat composer.
* Added listening, processing, cancellation, and error states with accessible controls.
* Voice input is available only in supported browsers and eligible configurations.
* **Localization**
* Added English, French, and German translations for voice-input controls and error messages.
* **Style**
* Added responsive microphone controls, status indicators, and reduced-motion support.