benji.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:B.E.N.J.I. 作者: the-ethan-hunt 项目源码 文件源码
def OnClicked(self):
        r = sr.Recognizer()
        with sr.Microphone() as source:
            speak.say('Hey I am Listening ')
            speak.runAndWait()
            audio = r.listen(source)
        try:
            put=r.recognize_google(audio)
            self.displayText(put)
            self.textBox.insert('1.2',put)
            self.textBox.delete('1.2',tk.END)
            events(self,put)
        except sr.UnknownValueError:
            self.displayText("Could not understand audio")
        except sr.RequestError as e:
            self.displayText("Could not request results; {0}".format(e))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号