respeaker / respeaker_python_library

To build voice enabled objects/applications with Python and ReSpeaker
Apache License 2.0
149 stars 74 forks source link

Can now specify custom decoder when instantiating Microphone #9

Closed edouardpoitras closed 7 years ago

edouardpoitras commented 7 years ago

This is also useful if you want to use the Microphone's listen() method without setting up a pocketpshinx decoder, by specifying a dummy decoder:

class DummyDecoder(object):
    def start_utt(): pass

mic = Microphone(decoder=DummyDecoder())
data = mic.listen(duration=5, timeout=1)
# Do stuff with data, like UDP stream to server.

Signed-off-by: Edouard Poitras edouardpoitras@gmail.com

xiongyihui commented 7 years ago

looks fine, thanks