Microsoft Azure speech to text doesn't recognize .wav audio when generated by PC microphone
I am trying to use Azure speech to text as part of a larger app. When I input a .wav audio file generated by Azure text to speech, or I input a .wav file downloaded from the internet, my Azure speech to text script works. However, when I use a .wav file recorded from my PC microphone the script never returns. The files are all in the same folder and I never get an invalid path error, except when I deliberately use a nonexistent file.
When I call transcribe_speech("./uploads/downloaded_from_azure_synthesis.wav")
I get the correct output printed to the terminal. However when I call transcribe_speech("./uploads/recorded_from_pc.wav")
I get no output. Furthermore the last statement printed is "in promise". "In speech recognizer" is never printed, indicating the script never gets past speechRecognizer.recognized...
and stalls forever.
My PC is a Lenovo Yoga running Windows 11
Script posted to paste bin because interface here isn't working.