-
-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[voice] Support managed dialogs (#3264)
* [voice] introduce methods for dialog persistency Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
- Loading branch information
Showing
12 changed files
with
395 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/DialogRegistration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/** | ||
* Copyright (c) 2010-2023 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.core.voice; | ||
|
||
import java.util.List; | ||
import java.util.Locale; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.eclipse.jdt.annotation.Nullable; | ||
|
||
/** | ||
* Describes dialog desired services and options. | ||
* | ||
* @author Miguel Álvarez - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class DialogRegistration { | ||
/** | ||
* Dialog audio source id | ||
*/ | ||
public String sourceId; | ||
/** | ||
* Dialog audio sink id | ||
*/ | ||
public String sinkId; | ||
/** | ||
* Preferred keyword-spotting service | ||
*/ | ||
public @Nullable String ksId; | ||
/** | ||
* Selected keyword for spotting | ||
*/ | ||
public @Nullable String keyword; | ||
/** | ||
* Preferred speech-to-text service id | ||
*/ | ||
public @Nullable String sttId; | ||
/** | ||
* Preferred text-to-speech service id | ||
*/ | ||
public @Nullable String ttsId; | ||
/** | ||
* Preferred voice id | ||
*/ | ||
public @Nullable String voiceId; | ||
/** | ||
* List of interpreters | ||
*/ | ||
public List<String> hliIds = List.of(); | ||
/** | ||
* Dialog locale | ||
*/ | ||
public @Nullable Locale locale; | ||
/** | ||
* Linked listening item | ||
*/ | ||
public @Nullable String listeningItem; | ||
/** | ||
* Custom listening melody | ||
*/ | ||
public @Nullable String listeningMelody; | ||
/** | ||
* True if an associated dialog is running | ||
*/ | ||
public boolean running = false; | ||
|
||
public DialogRegistration(String sourceId, String sinkId) { | ||
this.sourceId = sourceId; | ||
this.sinkId = sinkId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.