Hi JW J
I checked the script from yours against .mp3 and .wav files. Issue might be arising due to invalid audio channel configuration. It works against sample .wav files. Please check whether the audios are PCM, 16 bit sampled, mono-channel WAV format. You can convert them to respective format" ffmpeg -i test.mp3 -ac 1 -ar 16000 -sample_fmt s16 test.wav" You can test against sample audios to see the difference
Kindly refer below link: code: 1007. Error details: Invalid audio channel configuration · Issue #2180 · Azure-Samples/cognitive-services-speech-sdk
Speech SDK audio input stream concepts - Azure AI services | Microsoft Learn
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful.
Thank You.