#!/usr/bin/env python

import speech_recognition as sr
def main():
    #initalize speech recognition
    r = sr.Recognizer()
    #initialize and
    harvard_audio = sr.AudioFile('harvard.wav') # init audio file

    #read audio file
    with harvard_audio as source:
        audio = r.record(source)
    #convert audio to text
    text = r.recognize_google(audio)
    print('result', text)

if __name__ == '__main__':
    main()

595652b9ba14612aac0c35ab1bbcdfeca12ebf95
<mask token>

<mask token>


def main():
    r = sr.Recognizer()
    harvard_audio = sr.AudioFile('harvard.wav')
    with harvard_audio as source:
        audio = r.record(source)
    text = r.recognize_google(audio)
    print('result', text)


<mask token>

<mask token>


def main():
    r = sr.Recognizer()
    harvard_audio = sr.AudioFile('harvard.wav')
    with harvard_audio as source:
        audio = r.record(source)
    text = r.recognize_google(audio)
    print('result', text)


if __name__ == '__main__':
    main()

import speech_recognition as sr


def main():
    r = sr.Recognizer()
    harvard_audio = sr.AudioFile('harvard.wav')
    with harvard_audio as source:
        audio = r.record(source)
    text = r.recognize_google(audio)
    print('result', text)


if __name__ == '__main__':
    main()

#!/usr/bin/env python

import speech_recognition as sr
def main():
    #initalize speech recognition
    r = sr.Recognizer()
    #initialize and
    harvard_audio = sr.AudioFile('harvard.wav') # init audio file

    #read audio file
    with harvard_audio as source:
        audio = r.record(source)
    #convert audio to text
    text = r.recognize_google(audio)
    print('result', text)

if __name__ == '__main__':
    main()
