fromKeywordPaths static method

Future<Porcupine> fromKeywordPaths(
  1. List<String?>? keywordPaths, {
  2. String? modelPath,
  3. List<double>? sensitivities,
})

Static creator for initializing Porcupine from a list of paths to custom keyword files

keywordPaths A List of absolute paths to keyword model files.

modelPath is a path to the file containing model parameters. If not set it will be set to the default location.

sensitivities sensitivities for each keywords model. A higher sensitivity reduces miss rate at the cost of potentially higher false alarm rate. Sensitivity should be a floating-point number within 0 and 1.

Thows a PvError if not initialized correctly

returns an instance of the wake word engine

Implementation

static Future<Porcupine> fromKeywordPaths(List<String?>? keywordPaths,
        {String? modelPath, List<double>? sensitivities}) =>
    Porcupine._create(
        keywordPaths: keywordPaths,
        modelPath: modelPath,
        sensitivities: sensitivities);