davidohne / ha_whisper-api_stt

Home Assistant Whisper API SST integration
13 stars 6 forks source link

webm/mp3 format support #3

Open rmeissn opened 4 months ago

rmeissn commented 4 months ago

I got a pretty slow internet connection. Transcoding the wav recordings to webm (opus or vorbis) or mp3 before sending it to the openAI API might speed up the whole process of STT. Conversion of small audio snippets should not take too long on a recent Raspi and can be done with pydub or ffmpeg itself pretty easily - https://www.geeksforgeeks.org/convert-mp3-to-wav-using-python/.