@@ -31,24 +31,50 @@ public class RecognizeWithWebsocketsOptions extends GenericModel {
31
31
public interface Model {
32
32
/** ar-AR_BroadbandModel. */
33
33
String AR_AR_BROADBANDMODEL = "ar-AR_BroadbandModel" ;
34
+ /** ar-MS_BroadbandModel. */
35
+ String AR_MS_BROADBANDMODEL = "ar-MS_BroadbandModel" ;
36
+ /** ar-MS_Telephony. */
37
+ String AR_MS_TELEPHONY = "ar-MS_Telephony" ;
38
+ /** cs-CZ_Telephony. */
39
+ String CS_CZ_TELEPHONY = "cs-CZ_Telephony" ;
34
40
/** de-DE_BroadbandModel. */
35
41
String DE_DE_BROADBANDMODEL = "de-DE_BroadbandModel" ;
42
+ /** de-DE_Multimedia. */
43
+ String DE_DE_MULTIMEDIA = "de-DE_Multimedia" ;
36
44
/** de-DE_NarrowbandModel. */
37
45
String DE_DE_NARROWBANDMODEL = "de-DE_NarrowbandModel" ;
46
+ /** de-DE_Telephony. */
47
+ String DE_DE_TELEPHONY = "de-DE_Telephony" ;
38
48
/** en-AU_BroadbandModel. */
39
49
String EN_AU_BROADBANDMODEL = "en-AU_BroadbandModel" ;
50
+ /** en-AU_Multimedia. */
51
+ String EN_AU_MULTIMEDIA = "en-AU_Multimedia" ;
40
52
/** en-AU_NarrowbandModel. */
41
53
String EN_AU_NARROWBANDMODEL = "en-AU_NarrowbandModel" ;
54
+ /** en-AU_Telephony. */
55
+ String EN_AU_TELEPHONY = "en-AU_Telephony" ;
56
+ /** en-IN_Telephony. */
57
+ String EN_IN_TELEPHONY = "en-IN_Telephony" ;
42
58
/** en-GB_BroadbandModel. */
43
59
String EN_GB_BROADBANDMODEL = "en-GB_BroadbandModel" ;
60
+ /** en-GB_Multimedia. */
61
+ String EN_GB_MULTIMEDIA = "en-GB_Multimedia" ;
44
62
/** en-GB_NarrowbandModel. */
45
63
String EN_GB_NARROWBANDMODEL = "en-GB_NarrowbandModel" ;
64
+ /** en-GB_Telephony. */
65
+ String EN_GB_TELEPHONY = "en-GB_Telephony" ;
46
66
/** en-US_BroadbandModel. */
47
67
String EN_US_BROADBANDMODEL = "en-US_BroadbandModel" ;
68
+ /** en-US_Multimedia. */
69
+ String EN_US_MULTIMEDIA = "en-US_Multimedia" ;
48
70
/** en-US_NarrowbandModel. */
49
71
String EN_US_NARROWBANDMODEL = "en-US_NarrowbandModel" ;
50
72
/** en-US_ShortForm_NarrowbandModel. */
51
73
String EN_US_SHORTFORM_NARROWBANDMODEL = "en-US_ShortForm_NarrowbandModel" ;
74
+ /** en-US_Telephony. */
75
+ String EN_US_TELEPHONY = "en-US_Telephony" ;
76
+ /** en-WW_Medical_Telephony. */
77
+ String EN_WW_MEDICAL_TELEPHONY = "en-WW_Medical_Telephony" ;
52
78
/** es-AR_BroadbandModel. */
53
79
String ES_AR_BROADBANDMODEL = "es-AR_BroadbandModel" ;
54
80
/** es-AR_NarrowbandModel. */
@@ -65,6 +91,12 @@ public interface Model {
65
91
String ES_ES_BROADBANDMODEL = "es-ES_BroadbandModel" ;
66
92
/** es-ES_NarrowbandModel. */
67
93
String ES_ES_NARROWBANDMODEL = "es-ES_NarrowbandModel" ;
94
+ /** es-ES_Multimedia. */
95
+ String ES_ES_MULTIMEDIA = "es-ES_Multimedia" ;
96
+ /** es-ES_Telephony. */
97
+ String ES_ES_TELEPHONY = "es-ES_Telephony" ;
98
+ /** es-LA_Telephony. */
99
+ String ES_LA_TELEPHONY = "es-LA_Telephony" ;
68
100
/** es-MX_BroadbandModel. */
69
101
String ES_MX_BROADBANDMODEL = "es-MX_BroadbandModel" ;
70
102
/** es-MX_NarrowbandModel. */
@@ -77,34 +109,62 @@ public interface Model {
77
109
String FR_CA_BROADBANDMODEL = "fr-CA_BroadbandModel" ;
78
110
/** fr-CA_NarrowbandModel. */
79
111
String FR_CA_NARROWBANDMODEL = "fr-CA_NarrowbandModel" ;
112
+ /** fr-CA_Telephony. */
113
+ String FR_CA_TELEPHONY = "fr-CA_Telephony" ;
80
114
/** fr-FR_BroadbandModel. */
81
115
String FR_FR_BROADBANDMODEL = "fr-FR_BroadbandModel" ;
116
+ /** fr-FR_Multimedia. */
117
+ String FR_FR_MULTIMEDIA = "fr-FR_Multimedia" ;
82
118
/** fr-FR_NarrowbandModel. */
83
119
String FR_FR_NARROWBANDMODEL = "fr-FR_NarrowbandModel" ;
120
+ /** fr-FR_Telephony. */
121
+ String FR_FR_TELEPHONY = "fr-FR_Telephony" ;
122
+ /** hi-IN_Telephony. */
123
+ String HI_IN_TELEPHONY = "hi-IN_Telephony" ;
84
124
/** it-IT_BroadbandModel. */
85
125
String IT_IT_BROADBANDMODEL = "it-IT_BroadbandModel" ;
86
126
/** it-IT_NarrowbandModel. */
87
127
String IT_IT_NARROWBANDMODEL = "it-IT_NarrowbandModel" ;
128
+ /** it-IT_Multimedia. */
129
+ String IT_IT_MULTIMEDIA = "it-IT_Multimedia" ;
130
+ /** it-IT_Telephony. */
131
+ String IT_IT_TELEPHONY = "it-IT_Telephony" ;
88
132
/** ja-JP_BroadbandModel. */
89
133
String JA_JP_BROADBANDMODEL = "ja-JP_BroadbandModel" ;
134
+ /** ja-JP_Multimedia. */
135
+ String JA_JP_MULTIMEDIA = "ja-JP_Multimedia" ;
90
136
/** ja-JP_NarrowbandModel. */
91
137
String JA_JP_NARROWBANDMODEL = "ja-JP_NarrowbandModel" ;
92
138
/** ko-KR_BroadbandModel. */
93
139
String KO_KR_BROADBANDMODEL = "ko-KR_BroadbandModel" ;
140
+ /** ko-KR_Multimedia. */
141
+ String KO_KR_MULTIMEDIA = "ko-KR_Multimedia" ;
94
142
/** ko-KR_NarrowbandModel. */
95
143
String KO_KR_NARROWBANDMODEL = "ko-KR_NarrowbandModel" ;
144
+ /** ko-KR_Telephony. */
145
+ String KO_KR_TELEPHONY = "ko-KR_Telephony" ;
146
+ /** nl-BE_Telephony. */
147
+ String NL_BE_TELEPHONY = "nl-BE_Telephony" ;
96
148
/** nl-NL_BroadbandModel. */
97
149
String NL_NL_BROADBANDMODEL = "nl-NL_BroadbandModel" ;
98
150
/** nl-NL_NarrowbandModel. */
99
151
String NL_NL_NARROWBANDMODEL = "nl-NL_NarrowbandModel" ;
152
+ /** nl-NL_Telephony. */
153
+ String NL_NL_TELEPHONY = "nl-NL_Telephony" ;
100
154
/** pt-BR_BroadbandModel. */
101
155
String PT_BR_BROADBANDMODEL = "pt-BR_BroadbandModel" ;
156
+ /** pt-BR_Multimedia. */
157
+ String PT_BR_MULTIMEDIA = "pt-BR_Multimedia" ;
102
158
/** pt-BR_NarrowbandModel. */
103
159
String PT_BR_NARROWBANDMODEL = "pt-BR_NarrowbandModel" ;
160
+ /** pt-BR_Telephony. */
161
+ String PT_BR_TELEPHONY = "pt-BR_Telephony" ;
104
162
/** zh-CN_BroadbandModel. */
105
163
String ZH_CN_BROADBANDMODEL = "zh-CN_BroadbandModel" ;
106
164
/** zh-CN_NarrowbandModel. */
107
165
String ZH_CN_NARROWBANDMODEL = "zh-CN_NarrowbandModel" ;
166
+ /** zh-CN_Telephony. */
167
+ String ZH_CN_TELEPHONY = "zh-CN_Telephony" ;
108
168
}
109
169
110
170
protected transient InputStream audio ;
@@ -127,14 +187,15 @@ public interface Model {
127
187
protected Boolean profanityFilter ;
128
188
protected Boolean smartFormatting ;
129
189
protected Boolean speakerLabels ;
130
- protected String customizationId ;
131
190
protected String grammarName ;
132
191
protected Boolean redaction ;
133
192
protected Boolean audioMetrics ;
134
193
protected Double endOfPhraseSilenceTime ;
135
194
protected Boolean splitTranscriptAtPhraseEnd ;
136
195
protected Float speechDetectorSensitivity ;
137
196
protected Float backgroundAudioSuppression ;
197
+ protected Boolean lowLatency ;
198
+ protected Float characterInsertionBias ;
138
199
private Boolean interimResults ;
139
200
private Boolean processingMetrics ;
140
201
private Float processingMetricsInterval ;
@@ -158,14 +219,15 @@ public static class Builder {
158
219
private Boolean profanityFilter ;
159
220
private Boolean smartFormatting ;
160
221
private Boolean speakerLabels ;
161
- private String customizationId ;
162
222
private String grammarName ;
163
223
private Boolean redaction ;
164
224
private Boolean audioMetrics ;
165
225
private Double endOfPhraseSilenceTime ;
166
226
private Boolean splitTranscriptAtPhraseEnd ;
167
227
private Float speechDetectorSensitivity ;
168
228
private Float backgroundAudioSuppression ;
229
+ private Boolean lowLatency ;
230
+ private Float characterInsertionBias ;
169
231
private Boolean interimResults ;
170
232
private Boolean processingMetrics ;
171
233
private Float processingMetricsInterval ;
@@ -188,14 +250,15 @@ private Builder(RecognizeWithWebsocketsOptions recognizeWithWebsocketsOptions) {
188
250
this .profanityFilter = recognizeWithWebsocketsOptions .profanityFilter ;
189
251
this .smartFormatting = recognizeWithWebsocketsOptions .smartFormatting ;
190
252
this .speakerLabels = recognizeWithWebsocketsOptions .speakerLabels ;
191
- this .customizationId = recognizeWithWebsocketsOptions .customizationId ;
192
253
this .grammarName = recognizeWithWebsocketsOptions .grammarName ;
193
254
this .redaction = recognizeWithWebsocketsOptions .redaction ;
194
255
this .audioMetrics = recognizeWithWebsocketsOptions .audioMetrics ;
195
256
this .endOfPhraseSilenceTime = recognizeWithWebsocketsOptions .endOfPhraseSilenceTime ;
196
257
this .splitTranscriptAtPhraseEnd = recognizeWithWebsocketsOptions .splitTranscriptAtPhraseEnd ;
197
258
this .speechDetectorSensitivity = recognizeWithWebsocketsOptions .speechDetectorSensitivity ;
198
259
this .backgroundAudioSuppression = recognizeWithWebsocketsOptions .backgroundAudioSuppression ;
260
+ this .lowLatency = recognizeWithWebsocketsOptions .lowLatency ;
261
+ this .characterInsertionBias = recognizeWithWebsocketsOptions .characterInsertionBias ;
199
262
this .interimResults = recognizeWithWebsocketsOptions .interimResults ;
200
263
this .processingMetrics = recognizeWithWebsocketsOptions .processingMetrics ;
201
264
this .processingMetricsInterval = recognizeWithWebsocketsOptions .processingMetricsInterval ;
@@ -424,17 +487,6 @@ public Builder speakerLabels(Boolean speakerLabels) {
424
487
return this ;
425
488
}
426
489
427
- /**
428
- * Set the customizationId.
429
- *
430
- * @param customizationId the customizationId
431
- * @return the RecognizeOptions builder
432
- */
433
- public Builder customizationId (String customizationId ) {
434
- this .customizationId = customizationId ;
435
- return this ;
436
- }
437
-
438
490
/**
439
491
* Set the grammarName.
440
492
*
@@ -512,6 +564,28 @@ public Builder backgroundAudioSuppression(Float backgroundAudioSuppression) {
512
564
return this ;
513
565
}
514
566
567
+ /**
568
+ * Set the lowLatency.
569
+ *
570
+ * @param lowLatency the lowLatency
571
+ * @return the RecognizeOptions builder
572
+ */
573
+ public Builder lowLatency (Boolean lowLatency ) {
574
+ this .lowLatency = lowLatency ;
575
+ return this ;
576
+ }
577
+
578
+ /**
579
+ * Set the characterInsertionBias.
580
+ *
581
+ * @param characterInsertionBias the characterInsertionBias
582
+ * @return the RecognizeOptions builder
583
+ */
584
+ public Builder characterInsertionBias (Float characterInsertionBias ) {
585
+ this .characterInsertionBias = characterInsertionBias ;
586
+ return this ;
587
+ }
588
+
515
589
/**
516
590
* Set the audio.
517
591
*
@@ -583,14 +657,15 @@ protected RecognizeWithWebsocketsOptions(Builder builder) {
583
657
profanityFilter = builder .profanityFilter ;
584
658
smartFormatting = builder .smartFormatting ;
585
659
speakerLabels = builder .speakerLabels ;
586
- customizationId = builder .customizationId ;
587
660
grammarName = builder .grammarName ;
588
661
redaction = builder .redaction ;
589
662
audioMetrics = builder .audioMetrics ;
590
663
endOfPhraseSilenceTime = builder .endOfPhraseSilenceTime ;
591
664
splitTranscriptAtPhraseEnd = builder .splitTranscriptAtPhraseEnd ;
592
665
speechDetectorSensitivity = builder .speechDetectorSensitivity ;
593
666
backgroundAudioSuppression = builder .backgroundAudioSuppression ;
667
+ lowLatency = builder .lowLatency ;
668
+ characterInsertionBias = builder .characterInsertionBias ;
594
669
interimResults = builder .interimResults ;
595
670
processingMetrics = builder .processingMetrics ;
596
671
processingMetricsInterval = builder .processingMetricsInterval ;
@@ -874,19 +949,6 @@ public Boolean speakerLabels() {
874
949
return speakerLabels ;
875
950
}
876
951
877
- /**
878
- * Gets the customizationId.
879
- *
880
- * <p>**Deprecated.** Use the `language_customization_id` parameter to specify the customization
881
- * ID (GUID) of a custom language model that is to be used with the recognition request. Do not
882
- * specify both parameters with a request.
883
- *
884
- * @return the customizationId
885
- */
886
- public String customizationId () {
887
- return customizationId ;
888
- }
889
-
890
952
/**
891
953
* Gets the grammarName.
892
954
*
@@ -1028,6 +1090,59 @@ public Float backgroundAudioSuppression() {
1028
1090
return backgroundAudioSuppression ;
1029
1091
}
1030
1092
1093
+ /**
1094
+ * Gets the lowLatency.
1095
+ *
1096
+ * <p>If `true` for next-generation `Multimedia` and `Telephony` models that support low latency,
1097
+ * directs the service to produce results even more quickly than it usually does. Next-generation
1098
+ * models produce transcription results faster than previous-generation models. The `low_latency`
1099
+ * parameter causes the models to produce results even more quickly, though the results might be
1100
+ * less accurate when the parameter is used.
1101
+ *
1102
+ * <p>The parameter is not available for previous-generation `Broadband` and `Narrowband` models.
1103
+ * It is available for most next-generation models. * For a list of next-generation models that
1104
+ * support low latency, see [Supported next-generation language
1105
+ * models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-supported).
1106
+ * * For more information about the `low_latency` parameter, see [Low
1107
+ * latency](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-interim#low-latency).
1108
+ *
1109
+ * @return the lowLatency
1110
+ */
1111
+ public Boolean lowLatency () {
1112
+ return lowLatency ;
1113
+ }
1114
+
1115
+ /**
1116
+ * Gets the characterInsertionBias.
1117
+ *
1118
+ * <p>For next-generation `Multimedia` and `Telephony` models, an indication of whether the
1119
+ * service is biased to recognize shorter or longer strings of characters when developing
1120
+ * transcription hypotheses. By default, the service is optimized for each individual model to
1121
+ * balance its recognition of strings of different lengths. The model-specific bias is equivalent
1122
+ * to 0.0.
1123
+ *
1124
+ * <p>The value that you specify represents a change from a model's default bias. The allowable
1125
+ * range of values is -1.0 to 1.0. * Negative values bias the service to favor hypotheses with
1126
+ * shorter strings of characters. * Positive values bias the service to favor hypotheses with
1127
+ * longer strings of characters.
1128
+ *
1129
+ * <p>As the value approaches -1.0 or 1.0, the impact of the parameter becomes more pronounced. To
1130
+ * determine the most effective value for your scenario, start by setting the value of the
1131
+ * parameter to a small increment, such as -0.1, -0.05, 0.05, or 0.1, and assess how the value
1132
+ * impacts the transcription results. Then experiment with different values as necessary,
1133
+ * adjusting the value by small increments.
1134
+ *
1135
+ * <p>The parameter is not available for previous-generation `Broadband` and `Narrowband` models.
1136
+ *
1137
+ * <p>See [Character insertion
1138
+ * bias](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-parsing#insertion-bias).
1139
+ *
1140
+ * @return the characterInsertionBias
1141
+ */
1142
+ public Float characterInsertionBias () {
1143
+ return characterInsertionBias ;
1144
+ }
1145
+
1031
1146
/**
1032
1147
* Gets the interimResults.
1033
1148
*
0 commit comments