]> git.basschouten.com Git - openhab-addons.git/blob
de6adf2878a82e601945032b67bde7cd243f19f9
[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.googletts.internal.dto;
14
15 /**
16  * Synthesizes speech synchronously: receive results after all text input has been processed.
17  *
18  * @author Wouter Born - Initial contribution
19  */
20 public class SynthesizeSpeechRequest {
21
22     /**
23      * Required. The configuration of the synthesized audio.
24      */
25     private AudioConfig audioConfig = new AudioConfig();
26
27     /**
28      * Required. The Synthesizer requires either plain text or SSML as input.
29      */
30     private SynthesisInput input = new SynthesisInput();
31
32     /**
33      * Required. The desired voice of the synthesized audio.
34      */
35     private VoiceSelectionParams voice = new VoiceSelectionParams();
36
37     public SynthesizeSpeechRequest() {
38     }
39
40     public SynthesizeSpeechRequest(AudioConfig audioConfig, SynthesisInput input, VoiceSelectionParams voice) {
41         this.audioConfig = audioConfig;
42         this.input = input;
43         this.voice = voice;
44     }
45
46     public AudioConfig getAudioConfig() {
47         return audioConfig;
48     }
49
50     public SynthesisInput getInput() {
51         return input;
52     }
53
54     public VoiceSelectionParams getVoice() {
55         return voice;
56     }
57
58     public void setAudioConfig(AudioConfig audioConfig) {
59         this.audioConfig = audioConfig;
60     }
61
62     public void setInput(SynthesisInput input) {
63         this.input = input;
64     }
65
66     public void setVoice(VoiceSelectionParams voice) {
67         this.voice = voice;
68     }
69 }