1414
1515import com .ibm .cloud .sdk .core .service .model .GenericModel ;
1616
17+ import java .util .List ;
18+
1719/**
1820 * The synthesize options.
1921 */
@@ -119,6 +121,7 @@ public interface Voice {
119121 private String accept ;
120122 private String voice ;
121123 private String customizationId ;
124+ private List <String > timings ;
122125
123126 /**
124127 * Builder.
@@ -128,12 +131,14 @@ public static class Builder {
128131 private String accept ;
129132 private String voice ;
130133 private String customizationId ;
134+ private List <String > timings ;
131135
132136 private Builder (SynthesizeOptions synthesizeOptions ) {
133137 this .text = synthesizeOptions .text ;
134138 this .accept = synthesizeOptions .accept ;
135139 this .voice = synthesizeOptions .voice ;
136140 this .customizationId = synthesizeOptions .customizationId ;
141+ this .timings = synthesizeOptions .timings ;
137142 }
138143
139144 /**
@@ -203,6 +208,17 @@ public Builder customizationId(String customizationId) {
203208 this .customizationId = customizationId ;
204209 return this ;
205210 }
211+
212+ /**
213+ * Set the timings.
214+ *
215+ * @param timings the timings
216+ * @return the SynthesizeOptions builder
217+ */
218+ public Builder timings (List <String > timings ) {
219+ this .timings = timings ;
220+ return this ;
221+ }
206222 }
207223
208224 private SynthesizeOptions (Builder builder ) {
@@ -212,6 +228,7 @@ private SynthesizeOptions(Builder builder) {
212228 accept = builder .accept ;
213229 voice = builder .voice ;
214230 customizationId = builder .customizationId ;
231+ timings = builder .timings ;
215232 }
216233
217234 /**
@@ -271,4 +288,20 @@ public String voice() {
271288 public String customizationId () {
272289 return customizationId ;
273290 }
291+
292+ /**
293+ * Gets the timings.
294+ *
295+ * An array that specifies whether the service is to return word timing information for all strings of the input
296+ * text. Specify `words` as the element of the array to request word timing information. The service returns the
297+ * start and end time of each word of the input. Specify an empty array or omit the parameter to receive no word
298+ * timing information. Not supported for Japanese input text.
299+ *
300+ * NOTE: This parameter only works for the `synthesizeUsingWebSocket` method.
301+ *
302+ * @return the timings
303+ */
304+ public List <String > getTimings () {
305+ return timings ;
306+ }
274307}
0 commit comments