2 * Copyright (c) 2010-2023 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.voice.googletts.internal.dto;
16 * Contains text input to be synthesized. Either text or ssml must be supplied. Supplying both or neither returns
17 * google.rpc.Code.INVALID_ARGUMENT. The input size is limited to 5000 characters.
19 * @author Wouter Born - Initial contribution
21 public class SynthesisInput {
24 * The SSML document to be synthesized. The SSML document must be valid and well-formed. Otherwise the RPC will fail
25 * and return google.rpc.Code.INVALID_ARGUMENT.
30 * The raw text to be synthesized.
34 public SynthesisInput() {
37 public SynthesisInput(String text) {
38 if (text.startsWith("<speak>")) {
45 public String getSsml() {
49 public String getText() {
53 public void setSsml(String ssml) {
57 public void setText(String text) {