I'm building a script that is using voice recognition. It works, but the recognizing part often gives me bad results. So I thought I record the quality and check if a bad quality could be the result of my results.
i installed using
sudo pip3 install SpeechRecognition
sudo pip3 install PyAudio
the script:
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print("Ich höre zu....")
audio = r.listen(source)
print(r.recognize_google(audio, language="de_DE"))
How can I change the script to save audio to a wav/mp3-file?