replaceKeywordDetectionModel method

Future<bool> replaceKeywordDetectionModel(
  1. String modelName,
  2. double threshold,
  3. int bufferCnt
)

Replaces the currently loaded keyword detection model with modelName, threshold, and bufferCnt.

Returns true if the replacement model is successfully loaded.

Implementation

Future<bool> replaceKeywordDetectionModel(
  String modelName,
  double threshold,
  int bufferCnt,
) async {
  await _methodChannel.invokeMethod('replaceKeywordDetectionModel', {
    'instanceId': instanceId,
    'modelName': modelName,
    'threshold': threshold,
    'bufferCnt': bufferCnt,
  });
  return true;
}