Skip to content

Commit d4b7347

Browse files
committed
docs(speech-to-text): Add newest generated code docs
1 parent 8303306 commit d4b7347

File tree

11 files changed

+276
-283
lines changed

11 files changed

+276
-283
lines changed

speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/SpeechToText.java

Lines changed: 192 additions & 196 deletions
Large diffs are not rendered by default.

speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/AcousticModel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ public Long getProgress() {
181181
/**
182182
* Gets the warnings.
183183
*
184-
* If the request included unknown query parameters, the following message: `Unexpected query parameter(s)
185-
* ['parameters'] detected`, where `parameters` is a list that includes a quoted string for each unknown parameter.
184+
* If the request included unknown parameters, the following message: `Unexpected query parameter(s) ['parameters']
185+
* detected`, where `parameters` is a list that includes a quoted string for each unknown parameter.
186186
*
187187
* @return the warnings
188188
*/

speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/CreateJobOptions.java

Lines changed: 62 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
*/
1313
package 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-
1815
import java.io.File;
1916
import java.io.FileInputStream;
2017
import java.io.FileNotFoundException;
2118
import java.io.InputStream;
2219
import java.util.ArrayList;
2320
import 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
*

speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/GetModelOptions.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
public class GetModelOptions extends GenericModel {
2222

2323
/**
24-
* The identifier of the desired model in the form of its `name` from the output of `GET /v1/models`.
24+
* The identifier of the desired model in the form of its `name` from the output of **Get models**.
2525
*/
2626
public interface ModelId {
2727
/** ar-AR_BroadbandModel. */
@@ -44,6 +44,10 @@ public interface ModelId {
4444
String JA_JP_BROADBANDMODEL = "ja-JP_BroadbandModel";
4545
/** ja-JP_NarrowbandModel. */
4646
String JA_JP_NARROWBANDMODEL = "ja-JP_NarrowbandModel";
47+
/** ko-KR_BroadbandModel. */
48+
String KO_KR_BROADBANDMODEL = "ko-KR_BroadbandModel";
49+
/** ko-KR_NarrowbandModel. */
50+
String KO_KR_NARROWBANDMODEL = "ko-KR_NarrowbandModel";
4751
/** pt-BR_BroadbandModel. */
4852
String PT_BR_BROADBANDMODEL = "pt-BR_BroadbandModel";
4953
/** pt-BR_NarrowbandModel. */
@@ -119,7 +123,7 @@ public Builder newBuilder() {
119123
/**
120124
* Gets the modelId.
121125
*
122-
* The identifier of the desired model in the form of its `name` from the output of `GET /v1/models`.
126+
* The identifier of the desired model in the form of its `name` from the output of **Get models**.
123127
*
124128
* @return the modelId
125129
*/

speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/LanguageModel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ public Long getProgress() {
196196
/**
197197
* Gets the warnings.
198198
*
199-
* If the request included unknown query parameters, the following message: `Unexpected query parameter(s)
200-
* ['parameters'] detected`, where `parameters` is a list that includes a quoted string for each unknown parameter.
199+
* If the request included unknown parameters, the following message: `Unexpected query parameter(s) ['parameters']
200+
* detected`, where `parameters` is a list that includes a quoted string for each unknown parameter.
201201
*
202202
* @return the warnings
203203
*/

speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/RecognitionJob.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ public String getUpdated() {
106106
/**
107107
* Gets the url.
108108
*
109-
* The URL to use to request information about the job with the `GET /v1/recognitions/{id}` method. **Note:** This
110-
* field is returned only when you create a new job.
109+
* The URL to use to request information about the job with the **Check a job** method. **Note:** This field is
110+
* returned only when you create a new job.
111111
*
112112
* @return the url
113113
*/
@@ -143,7 +143,7 @@ public List<SpeechRecognitionResults> getResults() {
143143
/**
144144
* Gets the warnings.
145145
*
146-
* An array of warning messages about invalid query parameters included with the request. Each warning includes a
146+
* An array of warning messages about invalid parameters included with the request. Each warning includes a
147147
* descriptive message and a list of invalid argument strings, for example, `"unexpected query parameter 'user_token',
148148
* query parameter 'callback_url' was not specified"`. The request succeeds despite the warnings. **Note:** This field
149149
* can be returned only when you create a new job.

speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/SpeechModel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ public String getDescription() {
9898
/**
9999
* Gets the sessions.
100100
*
101-
* The URI for the model for use with the `POST /v1/sessions` method. (Returned only for requests for a single model
102-
* with the `GET /v1/models/{model_id}` method.).
101+
* The URI for the model for use with the **Create a session** method. (Returned only for requests for a single model
102+
* with the **Get a model** method.).
103103
*
104104
* @return the sessions
105105
*/

speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/SpeechRecognitionResult.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public List<SpeechRecognitionAlternative> getAlternatives() {
5959
* Gets the keywordsResult.
6060
*
6161
* A dictionary (or associative array) whose keys are the strings specified for `keywords` if both that parameter and
62-
* `keywords_threshold` are specified. A keyword for which no matches are found is omitted from the array. The array
63-
* is omitted if no keywords are found.
62+
* `keywords_threshold` are specified. A keyword for which no matches are found is omitted from the array. You can
63+
* spot a maximum of 1000 keywords. The array is omitted if no keywords are found.
6464
*
6565
* @return the keywordsResult
6666
*/

speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/SpeechRecognitionResults.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public List<SpeakerLabelsResult> getSpeakerLabels() {
7171
/**
7272
* Gets the warnings.
7373
*
74-
* An array of warning messages associated with the request: * Warnings for invalid query parameters or JSON fields
75-
* can include a descriptive message and a list of invalid argument strings, for example, `"Unknown arguments:"` or
74+
* An array of warning messages associated with the request: * Warnings for invalid parameters or JSON fields can
75+
* include a descriptive message and a list of invalid argument strings, for example, `"Unknown arguments:"` or
7676
* `"Unknown url query arguments:"` followed by a list of the form `"invalid_arg_1, invalid_arg_2."` * The following
7777
* warning is returned if the request passes a custom model that is based on an older version of a base model for
7878
* which an updated version is available: `"Using previous version of base model, because your custom model has been

speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/SupportedFeatures.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public Boolean isCustomLanguageModel() {
4040
/**
4141
* Gets the speakerLabels.
4242
*
43-
* Indicates whether the `speaker_labels` parameter can be used with the language model.
43+
* Indicates whether the **speaker_labels** parameter can be used with the language model.
4444
*
4545
* @return the speakerLabels
4646
*/

0 commit comments

Comments
 (0)