bred

Generation

generate functionTue, 17 Jan 2023

takes in an audio file and translate it into words

import speech_recognition as sr r = sr.Recognizer() with sr.AudioFile('hello.wav') as source: audio = r.listen(source) try: print('Google thinks you said:\n' + r.recognize_google(audio)) except Exception as e: print(e)

Questions about programming?Chat with your personal AI assistant