1515import com .ibm .watson .developer_cloud .service .model .GenericModel ;
1616import com .ibm .watson .developer_cloud .util .Validator ;
1717
18+ import java .util .List ;
19+
1820/**
1921 * The synthesize options.
2022 */
@@ -94,6 +96,7 @@ public interface Voice {
9496 private String accept ;
9597 private String voice ;
9698 private String customizationId ;
99+ private List <String > timings ;
97100
98101 /**
99102 * Builder.
@@ -103,12 +106,14 @@ public static class Builder {
103106 private String accept ;
104107 private String voice ;
105108 private String customizationId ;
109+ private List <String > timings ;
106110
107111 private Builder (SynthesizeOptions synthesizeOptions ) {
108112 text = synthesizeOptions .text ;
109113 accept = synthesizeOptions .accept ;
110114 voice = synthesizeOptions .voice ;
111115 customizationId = synthesizeOptions .customizationId ;
116+ timings = synthesizeOptions .timings ;
112117 }
113118
114119 /**
@@ -178,6 +183,17 @@ public Builder customizationId(String customizationId) {
178183 this .customizationId = customizationId ;
179184 return this ;
180185 }
186+
187+ /**
188+ * Set the timings.
189+ *
190+ * @param timings the timings
191+ * @return the SynthesizeOptions builder
192+ */
193+ public Builder timings (List <String > timings ) {
194+ this .timings = timings ;
195+ return this ;
196+ }
181197 }
182198
183199 private SynthesizeOptions (Builder builder ) {
@@ -186,6 +202,7 @@ private SynthesizeOptions(Builder builder) {
186202 accept = builder .accept ;
187203 voice = builder .voice ;
188204 customizationId = builder .customizationId ;
205+ timings = builder .timings ;
189206 }
190207
191208 /**
@@ -247,4 +264,20 @@ public String voice() {
247264 public String customizationId () {
248265 return customizationId ;
249266 }
267+
268+ /**
269+ * Gets the timings.
270+ *
271+ * An array that specifies whether the service is to return word timing information for all strings of the input
272+ * text. Specify `words` as the element of the array to request word timing information. The service returns the
273+ * start and end time of each word of the input. Specify an empty array or omit the parameter to receive no word
274+ * timing information. Not supported for Japanese input text.
275+ *
276+ * NOTE: This parameter only works for the `synthesizeUsingWebSocket` method.
277+ *
278+ * @return the timings
279+ */
280+ public List <String > timings () {
281+ return timings ;
282+ }
250283}
0 commit comments