1212 */
1313package com .ibm .watson .developer_cloud .speech_to_text .v1 .model ;
1414
15- import com .ibm .watson .developer_cloud .service .model .GenericModel ;
16- import com .ibm .watson .developer_cloud .util .Validator ;
17-
1815import java .io .File ;
1916import java .io .FileInputStream ;
2017import java .io .FileNotFoundException ;
2118import java .io .InputStream ;
2219import java .util .ArrayList ;
2320import java .util .List ;
2421
22+ import com .ibm .watson .developer_cloud .service .model .GenericModel ;
23+ import com .ibm .watson .developer_cloud .util .Validator ;
24+
2525/**
2626 * The createJob options.
2727 */
@@ -62,17 +62,7 @@ public interface ContentType {
6262 }
6363
6464 /**
65- * Set to `chunked` to send the audio in streaming mode. The data does not need to exist fully before being streamed
66- * to the service.
67- */
68- public interface TransferEncoding {
69- /** chunked. */
70- String CHUNKED = "chunked" ;
71- }
72-
73- /**
74- * The identifier of the model to be used for the recognition request. (Use `GET /v1/models` for a list of available
75- * models.).
65+ * The identifier of the model that is to be used for the recognition request.
7666 */
7767 public interface Model {
7868 /** ar-AR_BroadbandModel. */
@@ -95,6 +85,10 @@ public interface Model {
9585 String JA_JP_BROADBANDMODEL = "ja-JP_BroadbandModel" ;
9686 /** ja-JP_NarrowbandModel. */
9787 String JA_JP_NARROWBANDMODEL = "ja-JP_NarrowbandModel" ;
88+ /** ko-KR_BroadbandModel. */
89+ String KO_KR_BROADBANDMODEL = "ko-KR_BroadbandModel" ;
90+ /** ko-KR_NarrowbandModel. */
91+ String KO_KR_NARROWBANDMODEL = "ko-KR_NarrowbandModel" ;
9892 /** pt-BR_BroadbandModel. */
9993 String PT_BR_BROADBANDMODEL = "pt-BR_BroadbandModel" ;
10094 /** pt-BR_NarrowbandModel. */
@@ -108,14 +102,14 @@ public interface Model {
108102 /**
109103 * If the job includes a callback URL, a comma-separated list of notification events to which to subscribe. Valid
110104 * events are: `recognitions.started` generates a callback notification when the service begins to process the job.
111- * `recognitions.completed` generates a callback notification when the job is complete; you must use the `GET
112- * /v1/recognitions/{id}` method to retrieve the results before they time out or are deleted.
113- * `recognitions.completed_with_results` generates a callback notification when the job is complete; the notification
114- * includes the results of the request. `recognitions.failed` generates a callback notification if the service
115- * experiences an error while processing the job. Omit the parameter to subscribe to the default events:
116- * `recognitions.started`, `recognitions.completed`, and `recognitions.failed`. The `recognitions.completed` and
117- * `recognitions.completed_with_results` events are incompatible; you can specify only of the two events. If the job
118- * does not include a callback URL, omit the parameter.
105+ * `recognitions.completed` generates a callback notification when the job is complete; you must use the **Check a
106+ * job** method to retrieve the results before they time out or are deleted. `recognitions.completed_with_results`
107+ * generates a callback notification when the job is complete; the notification includes the results of the request.
108+ * `recognitions.failed` generates a callback notification if the service experiences an error while processing the
109+ * job. Omit the parameter to subscribe to the default events: `recognitions.started`, `recognitions.completed`, and
110+ * `recognitions.failed`. The `recognitions.completed` and `recognitions.completed_with_results` events are
111+ * incompatible; you can specify only of the two events. If the job does not include a callback URL, omit the
112+ * parameter.
119113 */
120114 public interface Events {
121115 /** recognitions.started. */
@@ -137,8 +131,8 @@ public interface Events {
137131 private Long resultsTtl ;
138132 private String customizationId ;
139133 private String acousticCustomizationId ;
140- private Double customizationWeight ;
141134 private String version ;
135+ private Double customizationWeight ;
142136 private Long inactivityTimeout ;
143137 private List <String > keywords ;
144138 private Float keywordsThreshold ;
@@ -163,8 +157,8 @@ public static class Builder {
163157 private Long resultsTtl ;
164158 private String customizationId ;
165159 private String acousticCustomizationId ;
166- private Double customizationWeight ;
167160 private String version ;
161+ private Double customizationWeight ;
168162 private Long inactivityTimeout ;
169163 private List <String > keywords ;
170164 private Float keywordsThreshold ;
@@ -186,8 +180,8 @@ private Builder(CreateJobOptions createJobOptions) {
186180 resultsTtl = createJobOptions .resultsTtl ;
187181 customizationId = createJobOptions .customizationId ;
188182 acousticCustomizationId = createJobOptions .acousticCustomizationId ;
189- customizationWeight = createJobOptions .customizationWeight ;
190183 version = createJobOptions .version ;
184+ customizationWeight = createJobOptions .customizationWeight ;
191185 inactivityTimeout = createJobOptions .inactivityTimeout ;
192186 keywords = createJobOptions .keywords ;
193187 keywordsThreshold = createJobOptions .keywordsThreshold ;
@@ -330,24 +324,24 @@ public Builder acousticCustomizationId(String acousticCustomizationId) {
330324 }
331325
332326 /**
333- * Set the customizationWeight .
327+ * Set the version .
334328 *
335- * @param customizationWeight the customizationWeight
329+ * @param version the version
336330 * @return the CreateJobOptions builder
337331 */
338- public Builder customizationWeight ( Double customizationWeight ) {
339- this .customizationWeight = customizationWeight ;
332+ public Builder version ( String version ) {
333+ this .version = version ;
340334 return this ;
341335 }
342336
343337 /**
344- * Set the version .
338+ * Set the customizationWeight .
345339 *
346- * @param version the version
340+ * @param customizationWeight the customizationWeight
347341 * @return the CreateJobOptions builder
348342 */
349- public Builder version ( String version ) {
350- this .version = version ;
343+ public Builder customizationWeight ( Double customizationWeight ) {
344+ this .customizationWeight = customizationWeight ;
351345 return this ;
352346 }
353347
@@ -487,8 +481,8 @@ private CreateJobOptions(Builder builder) {
487481 resultsTtl = builder .resultsTtl ;
488482 customizationId = builder .customizationId ;
489483 acousticCustomizationId = builder .acousticCustomizationId ;
490- customizationWeight = builder .customizationWeight ;
491484 version = builder .version ;
485+ customizationWeight = builder .customizationWeight ;
492486 inactivityTimeout = builder .inactivityTimeout ;
493487 keywords = builder .keywords ;
494488 keywordsThreshold = builder .keywordsThreshold ;
@@ -535,8 +529,7 @@ public String contentType() {
535529 /**
536530 * Gets the model.
537531 *
538- * The identifier of the model to be used for the recognition request. (Use `GET /v1/models` for a list of available
539- * models.).
532+ * The identifier of the model that is to be used for the recognition request.
540533 *
541534 * @return the model
542535 */
@@ -548,9 +541,9 @@ public String model() {
548541 * Gets the callbackUrl.
549542 *
550543 * A URL to which callback notifications are to be sent. The URL must already be successfully white-listed by using
551- * the `POST /v1/register_callback` method. Omit the parameter to poll the service for job completion and results. You
552- * can include the same callback URL with any number of job creation requests. Use the `user_token` query parameter to
553- * specify a unique user-specified string with each job to differentiate the callback notifications for the jobs.
544+ * the **Register a callback** method. Omit the parameter to poll the service for job completion and results. You can
545+ * include the same callback URL with any number of job creation requests. Use the `user_token` parameter to specify a
546+ * unique user-specified string with each job to differentiate the callback notifications for the jobs.
554547 *
555548 * @return the callbackUrl
556549 */
@@ -563,14 +556,14 @@ public String callbackUrl() {
563556 *
564557 * If the job includes a callback URL, a comma-separated list of notification events to which to subscribe. Valid
565558 * events are: `recognitions.started` generates a callback notification when the service begins to process the job.
566- * `recognitions.completed` generates a callback notification when the job is complete; you must use the `GET
567- * /v1/recognitions/{id}` method to retrieve the results before they time out or are deleted.
568- * `recognitions.completed_with_results` generates a callback notification when the job is complete; the notification
569- * includes the results of the request. `recognitions.failed` generates a callback notification if the service
570- * experiences an error while processing the job. Omit the parameter to subscribe to the default events:
571- * `recognitions.started`, `recognitions.completed`, and `recognitions.failed`. The `recognitions.completed` and
572- * `recognitions.completed_with_results` events are incompatible; you can specify only of the two events. If the job
573- * does not include a callback URL, omit the parameter.
559+ * `recognitions.completed` generates a callback notification when the job is complete; you must use the **Check a
560+ * job** method to retrieve the results before they time out or are deleted. `recognitions.completed_with_results`
561+ * generates a callback notification when the job is complete; the notification includes the results of the request.
562+ * `recognitions.failed` generates a callback notification if the service experiences an error while processing the
563+ * job. Omit the parameter to subscribe to the default events: `recognitions.started`, `recognitions.completed`, and
564+ * `recognitions.failed`. The `recognitions.completed` and `recognitions.completed_with_results` events are
565+ * incompatible; you can specify only of the two events. If the job does not include a callback URL, omit the
566+ * parameter.
574567 *
575568 * @return the events
576569 */
@@ -632,13 +625,28 @@ public String acousticCustomizationId() {
632625 return acousticCustomizationId ;
633626 }
634627
628+ /**
629+ * Gets the version.
630+ *
631+ * The version of the specified base model that is to be used with the request. Multiple versions of a base model can
632+ * exist when a model is updated for internal improvements. The parameter is intended primarily for use with custom
633+ * models that have been upgraded for a new base model. The default value depends on whether the parameter is used
634+ * with or without a custom model. For more information, see [Base model
635+ * version](https://console.bluemix.net/docs/services/speech-to-text/input.html#version).
636+ *
637+ * @return the version
638+ */
639+ public String version () {
640+ return version ;
641+ }
642+
635643 /**
636644 * Gets the customizationWeight.
637645 *
638- * If you specify a `customization_id` with the request, you can use the `customization_weight` parameter to tell the
639- * service how much weight to give to words from the custom language model compared to those from the base model for
640- * speech recognition. Specify a value between 0.0 and 1.0. Unless a different customization weight was specified for
641- * the custom model when it was trained, the default value is 0.3. A customization weight that you specify overrides a
646+ * If you specify a customization ID with the request, you can use the customization weight to tell the service how
647+ * much weight to give to words from the custom language model compared to those from the base model for speech
648+ * recognition. Specify a value between 0.0 and 1.0. Unless a different customization weight was specified for the
649+ * custom model when it was trained, the default value is 0.3. A customization weight that you specify overrides a
642650 * weight that was specified when the custom model was trained. The default value yields the best performance in
643651 * general. Assign a higher value if your audio makes frequent use of OOV words from the custom model. Use caution
644652 * when setting the weight: a higher value can improve the accuracy of phrases from the custom model's domain, but it
@@ -650,21 +658,6 @@ public Double customizationWeight() {
650658 return customizationWeight ;
651659 }
652660
653- /**
654- * Gets the version.
655- *
656- * The version of the specified base `model` that is to be used with the request. Multiple versions of a base model
657- * can exist when a model is updated for internal improvements. The parameter is intended primarily for use with
658- * custom models that have been upgraded for a new base model. The default value depends on whether the parameter is
659- * used with or without a custom model. For more information, see [Base model
660- * version](https://console.bluemix.net/docs/services/speech-to-text/input.html#version).
661- *
662- * @return the version
663- */
664- public String version () {
665- return version ;
666- }
667-
668661 /**
669662 * Gets the inactivityTimeout.
670663 *
@@ -683,7 +676,8 @@ public Long inactivityTimeout() {
683676 *
684677 * Array of keyword strings to spot in the audio. Each keyword string can include one or more tokens. Keywords are
685678 * spotted only in the final hypothesis, not in interim results. If you specify any keywords, you must also specify a
686- * keywords threshold. Omit the parameter or specify an empty array if you do not need to spot keywords.
679+ * keywords threshold. You can spot a maximum of 1000 keywords. Omit the parameter or specify an empty array if you do
680+ * not need to spot keywords.
687681 *
688682 * @return the keywords
689683 */
@@ -784,7 +778,7 @@ public Boolean smartFormatting() {
784778 * Indicates whether labels that identify which words were spoken by which participants in a multi-person exchange are
785779 * to be included in the response. The default is `false`; no speaker labels are returned. Setting `speaker_labels` to
786780 * `true` forces the `timestamps` parameter to be `true`, regardless of whether you specify `false` for the parameter.
787- * To determine whether a language model supports speaker labels, use the `GET /v1/ models` method and check that the
781+ * To determine whether a language model supports speaker labels, use the **Get models** method and check that the
788782 * attribute `speaker_labels` is set to `true`. You can also refer to [Speaker
789783 * labels](https://console.bluemix.net/docs/services/speech-to-text/output.html#speaker_labels).
790784 *
0 commit comments