tflite-speech-recognition
tflite-speech-recognition copied to clipboard
Help with Using the model on Computer
Firstly I want to compliment on excellent tutorial.
How can I use PC itself instead of raspberry pi to use the "h5" model to detect stop word in real time I am looking to convert "04-rpi-tflite-audio-stream.py" for computer version
Glad you found it helpful!
The .h5 model is a Keras model, so once you load it into your program, you can use model.predict() (https://www.tensorflow.org/api_docs/python/tf/keras/Model#predict) to make predictions. From my experience, it's a bit slow, but it's the only way I know how to do it at the moment. I'm sure there's a way to get TensorFlow to make predictions more quickly without using Keras.
Thanks for reply. Actually I wanted to do live speech recognition of PC and not on Pi. But your code for Pi is not running correctly on PC even after modification and using model.predict(). Can you please modify the code for PC
I'll keep it in mind as a to-do, but I don't know if I'll have time for it right now. Please note that I'm working on a newer/better version of this speech recognition tool here: https://github.com/ShawnHymel/custom_wake_word