2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.voice.rustpotterks.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * The {@link RustpotterKSConfiguration} class contains fields mapping thing configuration parameters.
20 * @author Miguel Álvarez - Initial contribution
23 public class RustpotterKSConfiguration {
25 * Configures the detector threshold, is the min score (in range 0. to 1.) that some wake word template should
26 * obtain to trigger a detection. Defaults to 0.5.
28 public float threshold = 0.5f;
30 * Configures the detector averaged threshold, is the min score (in range 0. to 1.) that the audio should obtain
32 * combination of the wake word templates, the detection will be aborted if this is not the case. This way it can
34 * run the comparison of the current frame against each of the wake word templates which saves cpu.
35 * If set to 0 this functionality is disabled.
37 public float averagedThreshold = 0.2f;
39 * Terminate the detection as son as one result is above the score,
40 * instead of wait to see if the next frame has a higher score.
42 public boolean eagerMode = true;
44 * Use build-in noise detection to reduce computation on absence of noise.
45 * Configures the difficulty to consider a frame as noise (the required noise level).
47 public String noiseDetectionMode = "disabled";
49 * Noise/silence ratio in the last second to consider noise is detected. Defaults to 0.5.
51 public float noiseSensitivity = 0.5f;
53 * Seconds to disable the vad detector after voice is detected. Defaults to 3.
55 public int vadDelay = 3;
57 * Voice/silence ratio in the last second to consider voice is detected.
59 public float vadSensitivity = 0.5f;
61 * Use a voice activity detector to reduce computation in the absence of vocal sound.
63 public String vadMode = "disabled";
65 * Configures the reference for the comparator used to match the samples.
67 public float comparatorRef = 0.22f;
69 * Configures the band-size for the comparator used to match the samples.
71 public int comparatorBandSize = 6;