Skip to content

Conversation

lxe
Copy link

@lxe lxe commented Sep 6, 2025

The read_audio_data API was confusingly designed to accept either a filename or raw audio buffer.

The server example was the only one passing audio_file.content (raw buffer) directly, which worked until WHISPER_FFMPEG=yes where ffmpeg_decode_audio would try to treat the raw audio buffer as a filename after ma_decoder_init_file failed.

Now the example server always writes to a temp file first, making the API cleaner and more consistent.

The read_audio_data API was confusingly designed to accept either a filename or
raw audio buffer.

The server example was the only one passing audio_file.content (raw buffer) directly,
which worked until WHISPER_FFMPEG=yes where ffmpeg_decode_audio would try to treat
the raw audio buffer as a filename after ma_decoder_init_file failed. Now we always
write to a temp file first, making the API cleaner and more consistent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant