Skip to content

Commit 62259ca

Browse files
committed
feat(Text to Speech): Add Argentinean, Dutch, and Chinese voices
1 parent 42f6ec6 commit 62259ca

File tree

1 file changed

+18
-39
lines changed

1 file changed

+18
-39
lines changed

text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/SynthesizeOptions.java

+18-39
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -14,8 +14,6 @@
1414

1515
import com.ibm.cloud.sdk.core.service.model.GenericModel;
1616

17-
import java.util.List;
18-
1917
/**
2018
* The synthesize options.
2119
*/
@@ -25,6 +23,8 @@ public class SynthesizeOptions extends GenericModel {
2523
* The voice to use for synthesis.
2624
*/
2725
public interface Voice {
26+
/** ar-AR_OmarVoice. */
27+
String AR_AR_OMARVOICE = "ar-AR_OmarVoice";
2828
/** de-DE_BirgitVoice. */
2929
String DE_DE_BIRGITVOICE = "de-DE_BirgitVoice";
3030
/** de-DE_BirgitV3Voice. */
@@ -77,17 +77,26 @@ public interface Voice {
7777
String JA_JP_EMIVOICE = "ja-JP_EmiVoice";
7878
/** ja-JP_EmiV3Voice. */
7979
String JA_JP_EMIV3VOICE = "ja-JP_EmiV3Voice";
80+
/** nl-NL_EmmaVoice. */
81+
String NL_NL_EMMAVOICE = "nl-NL_EmmaVoice";
82+
/** nl-NL_LiamVoice. */
83+
String NL_NL_LIAMVOICE = "nl-NL_LiamVoice";
8084
/** pt-BR_IsabelaVoice. */
8185
String PT_BR_ISABELAVOICE = "pt-BR_IsabelaVoice";
8286
/** pt-BR_IsabelaV3Voice. */
8387
String PT_BR_ISABELAV3VOICE = "pt-BR_IsabelaV3Voice";
88+
/** zh-CN_LiNaVoice. */
89+
String ZH_CN_LINAVOICE = "zh-CN_LiNaVoice";
90+
/** zh-CN_WangWeiVoice. */
91+
String ZH_CN_WANGWEIVOICE = "zh-CN_WangWeiVoice";
92+
/** zh-CN_ZhangJingVoice. */
93+
String ZH_CN_ZHANGJINGVOICE = "zh-CN_ZhangJingVoice";
8494
}
8595

86-
private String text;
87-
private String accept;
88-
private String voice;
89-
private String customizationId;
90-
private List<String> timings;
96+
protected String text;
97+
protected String accept;
98+
protected String voice;
99+
protected String customizationId;
91100

92101
/**
93102
* Builder.
@@ -97,14 +106,12 @@ public static class Builder {
97106
private String accept;
98107
private String voice;
99108
private String customizationId;
100-
private List<String> timings;
101109

102110
private Builder(SynthesizeOptions synthesizeOptions) {
103111
this.text = synthesizeOptions.text;
104112
this.accept = synthesizeOptions.accept;
105113
this.voice = synthesizeOptions.voice;
106114
this.customizationId = synthesizeOptions.customizationId;
107-
this.timings = synthesizeOptions.timings;
108115
}
109116

110117
/**
@@ -174,27 +181,15 @@ public Builder customizationId(String customizationId) {
174181
this.customizationId = customizationId;
175182
return this;
176183
}
177-
178-
/**
179-
* Set the timings.
180-
*
181-
* @param timings the timings
182-
* @return the SynthesizeOptions builder
183-
*/
184-
public Builder timings(List<String> timings) {
185-
this.timings = timings;
186-
return this;
187-
}
188184
}
189185

190-
private SynthesizeOptions(Builder builder) {
186+
protected SynthesizeOptions(Builder builder) {
191187
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.text,
192188
"text cannot be null");
193189
text = builder.text;
194190
accept = builder.accept;
195191
voice = builder.voice;
196192
customizationId = builder.customizationId;
197-
timings = builder.timings;
198193
}
199194

200195
/**
@@ -254,20 +249,4 @@ public String voice() {
254249
public String customizationId() {
255250
return customizationId;
256251
}
257-
258-
/**
259-
* Gets the timings.
260-
*
261-
* An array that specifies whether the service is to return word timing information for all strings of the input
262-
* text. Specify `words` as the element of the array to request word timing information. The service returns the
263-
* start and end time of each word of the input. Specify an empty array or omit the parameter to receive no word
264-
* timing information. Not supported for Japanese input text.
265-
*
266-
* NOTE: This parameter only works for the `synthesizeUsingWebSocket` method.
267-
*
268-
* @return the timings
269-
*/
270-
public List<String> getTimings() {
271-
return timings;
272-
}
273252
}

0 commit comments

Comments
 (0)