You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...
final directory =awaitgetApplicationDocumentsDirectory();
final modelPath ="${directory.path}/yoyo.pmdl";
final commonResPath ="${directory.path}/common.res";
final bytes =await rootBundle.load("assets/yoyo.pmdl");
final modelData = bytes.buffer.asUint8List();
awaitFile(modelPath).writeAsBytes(modelData);
debugPrint('>>> modelPath: $modelPath');
final commonResBytes =await rootBundle.load("assets/common.res");
final commonResData = commonResBytes.buffer.asUint8List();
awaitFile(commonResPath).writeAsBytes(commonResData);
debugPrint('>>> commonResPath: $commonResPath');
detector =Snowboy();
await detector.prepare(modelPath); // working, otherwise, it will show the model missing
detector.hotwordHandler = hotwordHandler;
awaitconfigureAudioSession();
...
Hi there,
Thanks for making this package, but I haven't get it working till now, always got 'common.res' missing problem. I downloaded the file from https://github.com/Kitt-AI/snowboy/blob/master/resources/common.res and load it in runtime as well.
What I did:
pmdl
file ,common.res
,ding.wav
in the root's assets folder and declared in pubspec.ymlThe code is learned from the example in https://pub.dev/packages/flutter_snowboy
The console display:
I found the similar discussion here: Kitt-AI/snowboy#309
But I don't find a way to pass the common.res path in this lib.
The text was updated successfully, but these errors were encountered: