Closed bogdancrisu closed 3 years ago
Thanks for opening an issue. Unfortunately, this isn't a lot of info to go on. That said, I'm going to test a custom wakeword model once I fix the compilation issues with RN 0.64.
In the future, avoid posting your API key on GitHub (or committing that directly to a public repo) in order to keep it secure. I went ahead and edited this issue, but to be completely safe you could rotate the key to a new one.
If you've replaced the files but they have the same names, you could try changing the file names or clearing the react native bundler cache with npx react-native start --reset-cache
Hi, tried both options but with no luck ...
I tried also with the CDN files, same result.
Oh, also try setting refreshModels
to true
in Spokestack.initialize()
. This will clear the model cache.
That should work, and if so, I think perhaps we should set that to true in development by default.
Spokestack.initialize( clientId, clientSecret, { refreshModels: true, vadMode: 'quality', wakeword: { filter: require('./model/filtertwo.tflite'), detect: require('./model/detecttamarintwo.tflite'), encode: require('./model/encodetamarintwo.tflite'), }, nlu: { model: require('./nlu/nlu.tflite'), vocab: require('./nlu/vocab.txt'), metadata: require('./nlu/metadata.sjson'), }, }, )
Same result...
Are you saying that it recognizes when you say "Spokestack" or that you've verified it's using the Spokestack model files included in the example instead of yours? What happens if you uninstall and reinstall the app?
It recognizes Spokestack only, I had a look in react-native-spokestack/src/index.tsx "initialize = (" and it receives my custom models. After I run the app in the simulator with npx react-native run-ios, Spokestack only recognizes the Spokstack wake word.
Good news! I was able to reproduce your issue. I'm working on a fix and will have something for you soon.
This does only seem to affect iOS. Android seems to work fine.
Yep, Android works perfectly.
It's getting late here, but we'll keep working on this tomorrow. Thanks for your patience.
We figured out the issue and will have a release of both spokestack-ios and react-native-spokestack by tomorrow.
A fix has been released! Please try version 6.0.0.
Thanks, works like a charm :D
Spokestack.initialize( clientId, clientSecret, { vadMode: 'quality', wakeword: { filter: require('./model/filter.tflite'), detect: require('./model/detect.tflite'), encode: require('./model/encode.tflite'), }, nlu: { model: require('./nlu/nlu.tflite'), vocab: require('./nlu/vocab.txt'), metadata: require('./nlu/metadata.sjson'), }, }, )