Files
DeepTutor/web/lib
ZQR1101 ac25a5c868 fix(voice): strip MediaRecorder codec params from STT uploads (#948)
* fix(voice): strip MediaRecorder codec params from STT uploads

Chrome sends audio/webm;codecs=opus; OpenAI-compatible transcription APIs reject that as an unknown format.

Fixes #945

* refactor(voice): normalize the STT MIME once, at the wire boundary

The codec-parameter strip was applied at four layers: the recorder hook, the
route, the `transcribe_audio` facade, and `_post_multipart`. Only the last of
those decides what actually goes on the wire, and `openai_compat` is the sole
registered STT adapter, so the two middle copies were pure duplication —
and they made the route's contract ambiguous about who owns the value.

Keep the client-side strip (it sets the Blob type, which is what the browser
puts in the multipart part) and the adapter strip; drop the route and facade
copies along with the now-unused facade re-export. The adapter-level test
already pins the wire contract; the route test now asserts what the route
actually promises — verbatim forwarding.

---------

Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
Co-authored-by: Frank <bingxizhao@novix.science>
2026-08-24 16:51:49 +08:00
..
2026-06-17 10:50:44 +08:00
2026-07-19 16:56:34 +08:00
2026-08-20 14:15:53 +08:00
2026-08-17 11:22:26 +08:00
2026-05-02 20:16:07 +08:00
2026-07-24 03:06:58 +08:00
2026-08-02 13:23:45 +08:00
2026-08-02 13:23:45 +08:00
2026-08-02 13:23:45 +08:00
2026-06-13 21:10:57 +08:00
2026-08-17 11:22:26 +08:00
2026-07-31 00:25:48 +08:00
2026-08-02 13:23:45 +08:00
2026-05-01 01:39:08 +08:00
2026-08-13 18:49:48 +08:00
2026-08-17 11:22:26 +08:00
2026-01-23 01:42:25 +08:00
2026-01-07 10:53:01 +08:00
2026-07-19 16:56:34 +08:00
2026-03-13 01:47:38 +08:00
2026-08-17 11:22:26 +08:00
2026-06-17 00:56:27 +08:00
2026-06-11 20:03:34 +08:00
2026-08-17 11:22:26 +08:00
fix
2026-08-09 22:18:22 +08:00
2026-08-17 11:22:26 +08:00
2026-08-22 01:36:30 +08:00
2026-07-31 00:25:48 +08:00
2026-08-02 13:23:45 +08:00
2026-07-31 00:25:48 +08:00
2026-06-17 00:56:27 +08:00
2026-04-30 23:41:58 +08:00
2026-08-20 14:15:53 +08:00
2026-06-18 00:22:48 +08:00
2026-08-20 14:15:53 +08:00
2026-08-19 17:34:52 +08:00
2026-06-11 20:03:34 +08:00
2026-04-23 19:29:16 +08:00
2026-07-29 01:56:12 +08:00
2026-08-20 14:15:53 +08:00
2026-08-20 14:15:53 +08:00
2026-08-20 14:15:53 +08:00
2026-08-20 14:15:53 +08:00
2026-08-20 14:15:53 +08:00
2026-08-20 14:15:53 +08:00
2026-08-19 17:34:52 +08:00
2026-08-13 18:49:48 +08:00
2026-08-17 11:22:26 +08:00
2026-08-17 11:22:26 +08:00
2026-04-23 19:29:16 +08:00
2026-08-19 17:34:52 +08:00
fix
2026-08-09 22:18:22 +08:00
2026-05-03 16:35:52 +08:00
2026-06-18 00:22:48 +08:00
2026-08-19 17:34:52 +08:00
2026-07-31 00:25:48 +08:00
2026-04-23 19:29:16 +08:00
2026-06-11 20:03:34 +08:00
2026-07-31 00:25:48 +08:00
2026-07-24 18:16:04 +08:00
2026-08-19 17:34:52 +08:00
2026-05-12 02:20:30 +08:00
2026-08-20 14:15:53 +08:00