create static method

Future<RhinoManager> create(
  1. String contextPath,
  2. InferenceCallback inferenceCallback, {
  3. String? modelPath,
  4. double sensitivity = 0.5,
  5. ErrorCallback? errorCallback,
})

Static creator for initializing Rhino

contextPath Absolute path to the Rhino context file (.rhn).

inferenceCallback A callback for when Rhino has made an intent inference

modelPath (Optional) Path to the file containing model parameters. If not set it will be set to the default location.

sensitivity (Optional) Inference sensitivity. A higher sensitivity value results in fewer misses at the cost of (potentially) increasing the erroneous inference rate. Sensitivity should be a floating-point number within 0 and 1.

Thows a PvError if not initialized correctly

returns an instance of the speech-to-intent engine

Implementation

static Future<RhinoManager> create(
    String contextPath, InferenceCallback inferenceCallback,
    {String? modelPath,
    double sensitivity = 0.5,
    ErrorCallback? errorCallback}) async {
  Rhino rhino = await Rhino.create(contextPath,
      modelPath: modelPath, sensitivity: sensitivity);
  return new RhinoManager._(rhino, inferenceCallback, errorCallback);
}