2 * Copyright (c) 2010-2024 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.binding.mycroft.internal.api.dto;
15 import java.util.ArrayList;
16 import java.util.List;
18 import org.openhab.binding.mycroft.internal.api.MessageType;
20 import com.google.gson.annotations.SerializedName;
23 * This message is sent to the Mycroft audio module
24 * to trigger a TTS action.
26 * @author Gwendal Roulleau - Initial contribution
28 public class MessageSpeak extends BaseMessage {
30 public Data data = new Data();
32 public Context context = new Context();
34 public MessageSpeak() {
35 this.type = MessageType.speak;
38 public MessageSpeak(String textToSay) {
40 this.data = new Data();
41 this.data.utterance = textToSay;
44 public static class Data {
45 public String utterance = "";
46 @SerializedName("expect_response")
47 public String expectResponse = "";
50 public static class Context {
51 @SerializedName("client_name")
52 public String clientName = "";
53 public List<String> source = new ArrayList<>();
54 public String destination = "";