Compare commits

..
1 Commits
Author SHA1 Message Date
ElebobaandClaude Opus 5.5 65e3a27145 feat(web): voice input — record, check the recognised text, send
CI / ruff · pytest (pull_request) Successful in 2m27s
Microphone button in the chat composer and in free-text steps. The browser
records 16 kHz mono WAV (no server-side ffmpeg), /me/{token}/stt transcribes,
the text lands in the field for the patient to check and edit — never sent
automatically, so safety and scrub() apply on send. Hidden when the server has
voice input off or the browser lacks a microphone API. nginx: 4 MB body limit.

Refs #117

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:43:36 +03:00
+1 -3
View File
@@ -11,9 +11,7 @@ type WindowWithWebkit = Window & { webkitAudioContext?: typeof AudioContext };
export function voiceSupported(): boolean { export function voiceSupported(): boolean {
const w = window as WindowWithWebkit; const w = window as WindowWithWebkit;
return ( return typeof navigator.mediaDevices?.getUserMedia === "function" && Boolean(window.AudioContext || w.webkitAudioContext);
typeof navigator.mediaDevices?.getUserMedia === "function" && Boolean(window.AudioContext || w.webkitAudioContext)
);
} }
export class Recorder { export class Recorder {