Repository navigation
Conversation
An input_audio_buffer.append with an odd byte count dropped its last byte without an error. Both realtime paths now decode with pcm_s16_to_f32 and send an error for an odd byte count.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
An
input_audio_buffer.appendwith an odd number of bytes silently drops its last byte. Each append is decoded on its own, so a client that cuts its stream mid-sample gets the following appends decoded one byte off, which gives an empty transcript with Voxtral Realtime.Both realtime sessions now reject an odd append with an
invalid_request_error, so the client is told about the cut instead of getting an empty transcript. The decoding moves to apcm_s16_to_f32helper next topcm_f32_to_s16, which replaces the two copies of the decoding loop and is covered bytest-server-component.With Voxtral Realtime in a transcription session, a 1-byte append followed by 3200-byte appends gave an empty transcript on master; on this branch the 1-byte append gets the error, and whole-sample audio still transcribes. I did not run the conversation path (
server-realtime.cpp); it calls the same helper.Requirements