]> git.basschouten.com Git - openhab-addons.git/blob
71e53a5e6fcf80c05f157d61c8897f1eb08bc338
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.voice.rustpotterks.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * The {@link RustpotterKSConfiguration} class contains fields mapping thing configuration parameters.
19  *
20  * @author Miguel Álvarez - Initial contribution
21  */
22 @NonNullByDefault
23 public class RustpotterKSConfiguration {
24     /**
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.
27      */
28     public float threshold = 0.5f;
29     /**
30      * Configures the detector averaged threshold, is the min score (in range 0. to 1.) that the audio should obtain
31      * against a
32      * combination of the wake word templates, the detection will be aborted if this is not the case. This way it can
33      * prevent to
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.
36      */
37     public float averagedThreshold = 0.2f;
38     /**
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.
41      */
42     public boolean eagerMode = true;
43     /**
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).
46      */
47     public String noiseDetectionMode = "disabled";
48     /**
49      * Noise/silence ratio in the last second to consider noise is detected. Defaults to 0.5.
50      */
51     public float noiseSensitivity = 0.5f;
52     /**
53      * Seconds to disable the vad detector after voice is detected. Defaults to 3.
54      */
55     public int vadDelay = 3;
56     /**
57      * Voice/silence ratio in the last second to consider voice is detected.
58      */
59     public float vadSensitivity = 0.5f;
60     /**
61      * Use a voice activity detector to reduce computation in the absence of vocal sound.
62      */
63     public String vadMode = "disabled";
64     /**
65      * Configures the reference for the comparator used to match the samples.
66      */
67     public float comparatorRef = 0.22f;
68     /**
69      * Configures the band-size for the comparator used to match the samples.
70      */
71     public int comparatorBandSize = 6;
72 }