feat: add OpenRouter dictation and speech recognition settings

This commit is contained in:
2026-10-26 23:42:44 +03:00
parent 168cad7470
commit ecbd2b0bb9
24 changed files with 867 additions and 72 deletions
+10
View File
@@ -27,6 +27,16 @@ class PcmCaptureProcessor extends AudioWorkletProcessor {
super();
this.frame = new Int16Array(2048);
this.count = 0;
// Whole-recording STT must include the final, partially filled frame.
this.port.onmessage = (event) => {
if (event.data?.type !== "flush") return;
if (this.count > 0) {
const tail = this.frame.slice(0, this.count);
this.port.postMessage({ type: "audio", buffer: tail }, [tail.buffer]);
this.count = 0;
}
this.port.postMessage({ type: "flushed" });
};
}
process(inputs) {