Skip to content

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

License

Notifications You must be signed in to change notification settings

SaneBow/tflite-kws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages