#why does the streaming endpoint never respect my output_format request? i ask it for pcm_16000 and
1 messages · Page 1 of 1 (latest)
The issue you're experiencing with the output_format=pcm_16000 might be due to the fact that PCM data does not include a wave header, making it unreadable by most audio players. This could lead to the output being defaulted to a more universally compatible format like MP3.
To resolve this, you can add the necessary wave header to the PCM data or convert the PCM data to WAV format. Here's a Python code example using the ffmpeg library to convert PCM to WAV:
import ffmpeg
input_file = 'input.pcm'
output_file = 'output.wav'
ffmpeg.input(input_file, format='s16le', ar='16000').output(output_file).run()
This code will help you convert the PCM data to a WAV file, making it easier to handle with standard audio players. If you have further questions or need additional assistance, feel free to reach out.
i AM adding a wav header. the problem is, you are returning me mp3 data, that HAS an mp3 header