0
pls answer python about speech recognition
import pywhatkit as pwk import random as rd import time as tm import speech_recognition as sr import keyboard as kb listener= sr.Recognizer() try: with sr.Microphone() as source: print('say something') voice=listener.listen(source) cmd=listener.recognize_google(voice) print(cmd) except: pass thats my code why doesn't it stop listening it doesn't print the text
2 Antworten
0
Maybe, you have to put the time in (voice=listener.listen(source, 5)) forget if it was milliseconds or seconds, you have to try out
0
Thanks