IMAGE VOICENOTE OPENER

Please if you like my content Please do not forget to support this channel on PayPal now for $1 only! Or less 

 from PIL import Image

import speech_recognition as sr
import pyttsx3


while True:


direc = input("Enter the directory to the image ")

direrr = len(direc)

quest = '.png'

r = sr.Recognizer()



try:


with sr.Microphone() as source2:

r.adjust_for_ambient_noise(source2, duration=0.2)


audio2 = r.listen(source2)


MyText = r.recognize_google(audio2)
MyText = MyText.lower()





voice = MyText
talk = len(MyText)

opening = direc[:direrr] + MyText [:talk] + quest



rr = Image.open(opening)

rr.show()
except sr.RequestError as e:
print("Could not request results; {0}".format(e))

except sr.UnknownValueError:
print("unknown error occured")

No comments:

Post a Comment

Drawing App For Kivy

  Below here is the source code for Drawing Application for kivy. Please if you like this content.  Don't forget to Subscribe to my YouT...