Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 1.02 KB

README.md

File metadata and controls

25 lines (17 loc) · 1.02 KB

TFLiteKWS

Keyword Spotting (KWS) API wrapper for TFLite streaming models.

Model

This project is only a API wrapper to assist audio processing with tflite models. Models are not provided here. You need to find a pretrained model or train your own. One open source streaming KWS model in tensorflow is the kws_streaming by Google Research. You can refer to g-kws as a nice setup guide, and use Dataset-builder to prepare your own dataset.

Testing

Simply run python3 mic_streaming.py -m /path/to/your/model.tflite, then speak to your mic to test.

API

Simple example with two keywords:

gkws = TFLiteKWS(args.model, [SILENCE, NOT_KW, 'keyword1', 'keyword2'])
while True:
    keyword = gkws.process(get_next_audio_frame())
    if keyword:
        # following up actions

Please refer to kws.py for detailed API usage and tunning parameters.