Repository navigation
fix(realtime): write committed-utterance WAV header at the session input sample rate - #12749
nexxtmobile wants to merge 2 commits into
Conversation
|
@mudler Code-review sign-off at |
…put sample rate The client-commit path (commitUtteranceWithTranscript) and writeUtteranceWAV wrote the utterance WAV with a fixed 16 kHz header (laudio.NewWAVHeader), but the input buffer holds audio at the session input sample rate (e.g. 24 kHz for OpenAI-Realtime clients). The file-based transcription backend then decoded 24 kHz data at 16 kHz (1.5x speed/pitch), degrading transcription to garbage or empty output, which failed the follow-up response with input_not_committed (total silence after the greeting). writeUtteranceWAV now takes the sample rate and both call sites pass session.InputSampleRate (laudio.NewWAVHeaderWithRate already existed). Regression test: the committed WAV header carries the requested rate. Signed-off-by: nexxtmobile.de <git@nexxtmobile.de>
7621916 to
78b4443
Compare
Assisted-by: Codex:gpt-6 Signed-off-by: nexxtmobile.de <git@nexxtmobile.de>
|
Update: rebased onto Note on the doc commit: a rebase force-push clobbered the maint-bot's doc commit ( |
Fixes #12747
The client-commit path (
commitUtteranceWithTranscript) andwriteUtteranceWAVwrote the utterance WAV with a fixed 16 kHz header (
laudio.NewWAVHeader),while the input buffer holds audio at the session input sample rate (e.g.
24 kHz for OpenAI-Realtime clients). The file-based transcription backend
decoded 24 kHz data at 16 kHz (1.5x speed/pitch) → garbage/empty transcripts
→
input_not_committed→ total silence after the greeting.writeUtteranceWAVnow takes the sample rate; both call sites passsession.InputSampleRate(via the existinglaudio.NewWAVHeaderWithRate).Includes a regression spec: the committed WAV header carries the requested
rate (24 kHz and 16 kHz).
Tested:
go test -race ./core/http/endpoints/openai/green (Go 1.26).