]> git.basschouten.com Git - openhab-addons.git/blob
df6b02f9f203504253af024338dc47e934b97629
[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.voskstt.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * The {@link VoskSTTConfiguration} class contains Vosk STT Service configuration.
19  *
20  * @author Miguel Álvarez - Initial contribution
21  */
22 @NonNullByDefault
23 public class VoskSTTConfiguration {
24     /**
25      * Single phrase mode.
26      */
27     public boolean singleUtteranceMode = true;
28     /**
29      * Max seconds to wait to force stop the transcription.
30      */
31     public int maxTranscriptionSeconds = 60;
32     /**
33      * Only works when singleUtteranceMode is disabled, max seconds without getting new transcriptions to stop
34      * listening.
35      */
36     public int maxSilenceSeconds = 3;
37     /**
38      * Message to be told when no results.
39      */
40     public String noResultsMessage = "Sorry, I didn't understand you";
41     /**
42      * Message to be told when an error has happened.
43      */
44     public String errorMessage = "Sorry, something went wrong";
45     /**
46      * Keep language model loaded
47      */
48     public boolean preloadModel = true;
49 }