How it works

This program runs by applying threading. We use the microphone object to obtain speech input. We call wakeup() to activate the ReSpeaker board in order to listen to incoming speech:

    mic = Microphone(quit_event=quit_event) 
    while not quit_event.is_set(): 
        if mic.wakeup('respeaker'): 
            print('Wake up') 

After waking up ReSpeaker, we can listen to speech and perform recognition by calling the recognize() function:

data = mic.listen() 
text = mic.recognize(data)
if text:
print('Recognized %s' % text)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.250.169