Open srewai opened 2 years ago
You need to make sure the window/block size is consistent with what you used during training. By default the wrapper is for training parameters here: https://github.com/StuartIanNaylor/g-kws/blob/main/crrn.sh
--window_size_ms 40.0 \
--window_stride_ms 20.0 \
But I see you use "window_size_ms": 30.0, "window_stride_ms": 10.0
in your training.
It's been sometime and I can't recall the exact meaning of these but you can try setting the --block-len-ms 10
or modifying the script to align with your training input.
Thank you so much! I am going to try your suggestion.
In your example the method get_next_audio_frame()
but i could not find where is it defined in kws.py. Or did I miss something?
Please help.
gkws = TFLiteKWS(args.model, [SILENCE, NOT_KW, 'keyword1', 'keyword2'])
while True:
keyword = gkws.process(get_next_audio_frame())
if keyword:
# following up actions
You need to write that function yourself, or you can refer to the implementation in mic_streaming.py
.
Thank you for the quick response!
Hi ,
Thanks so much for the wrapper API. I was trying to make real-time KWS spotting using your wrapper and my trained .tflite model using the paper google paper. Below is the flag used for training the model.
As suggested in your readme, I ran the model with
python3 mic_streaming.py -m model path
but I get error :Model Training parameter:
index_to_label = {1: 'unknown', 2: 'srewai', 0: 'silence'}
Thanks in advance!