def callback(recognizer, audio):
try:
recognized = recognizer.recognize_google(audio)
if recognized:
logging.info("clipped"+recognized+"\n")
copy_to_clipboard(recognized)
logging.info("copied text to clipboard.")
beep()
process_recognized_string(recognized)
return recognized
except sr.UnknownValueError:
print("..")
except sr.RequestError as e:
print("Could not request results from Google Speech Recognition service; {0}".format(e))
评论列表
文章目录