]> git.basschouten.com Git - openhab-addons.git/blob
b2ceb9bcfe9e0242b64337ca85c884f20d5a913c
[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.binding.mycroft.internal.api.dto;
14
15 import java.util.ArrayList;
16 import java.util.List;
17
18 import org.openhab.binding.mycroft.internal.api.MessageType;
19
20 /**
21  * This message is sent to the Mycroft audio module
22  * to trigger a TTS action.
23  *
24  * @author Gwendal Roulleau - Initial contribution
25  */
26 public class MessageSpeak extends BaseMessage {
27
28     public Data data = new Data();
29
30     public Context context = new Context();
31
32     public MessageSpeak() {
33         this.type = MessageType.speak;
34     }
35
36     public MessageSpeak(String textToSay) {
37         this();
38         this.data = new Data();
39         this.data.utterance = textToSay;
40     }
41
42     public static class Data {
43         public String utterance = "";
44         public String expect_response = "";
45     };
46
47     public static class Context {
48         public String client_name = "";
49         public List<String> source = new ArrayList<>();
50         public String destination = "";
51     }
52 }