You are on page 1of 1

Foundations of AI Applications Lab

Prepared By: MADHUR SHARMA


UID- 20BCS9529
SECTION- 20BCS44A
BRANCH- BE-C.S.E
SUBJECT CODE- 20ECP-118

Worksheet
EXPERIMENT – 4
Aim:
Perform Speech-to-text conversion using pre trained machine learning API models for short-
form or long-form audio.
Requirements:
PC with internet connectivity, Python 3.7
Expected Outcome:
• List down all the commands used
• Paste step by step screenshots
CODE:
import speech_recognition as s

sr = s.Recognizer()
print ('I am listening to you..................')
with s.Microphone() as M:
audio=sr.listen(M)
query=sr.recognize_google(audio,language='eng-in')
print(query)

OUTPUT:

You might also like