# tflite-kws **Repository Path**: lanzehua/tflite-kws ## Basic Information - **Project Name**: tflite-kws - **Description**: Keyword Spotting (KWS) API wrapper for TFLite streaming models. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-11-09 - **Last Updated**: 2021-12-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 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](https://github.com/google-research/google-research/tree/master/kws_streaming) by Google Research. You can refer to [g-kws](https://github.com/StuartIanNaylor/g-kws) as a nice setup guide, and use [Dataset-builder](https://github.com/StuartIanNaylor/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: ```python 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.