@@ -237,6 +237,7 @@ public interface Model {
237237 protected Double endOfPhraseSilenceTime ;
238238 protected Boolean splitTranscriptAtPhraseEnd ;
239239 protected Float speechDetectorSensitivity ;
240+ protected Long sadModule ;
240241 protected Float backgroundAudioSuppression ;
241242 protected Boolean lowLatency ;
242243 protected Float characterInsertionBias ;
@@ -268,6 +269,7 @@ public static class Builder {
268269 private Double endOfPhraseSilenceTime ;
269270 private Boolean splitTranscriptAtPhraseEnd ;
270271 private Float speechDetectorSensitivity ;
272+ private Long sadModule ;
271273 private Float backgroundAudioSuppression ;
272274 private Boolean lowLatency ;
273275 private Float characterInsertionBias ;
@@ -303,6 +305,7 @@ private Builder(RecognizeOptions recognizeOptions) {
303305 this .endOfPhraseSilenceTime = recognizeOptions .endOfPhraseSilenceTime ;
304306 this .splitTranscriptAtPhraseEnd = recognizeOptions .splitTranscriptAtPhraseEnd ;
305307 this .speechDetectorSensitivity = recognizeOptions .speechDetectorSensitivity ;
308+ this .sadModule = recognizeOptions .sadModule ;
306309 this .backgroundAudioSuppression = recognizeOptions .backgroundAudioSuppression ;
307310 this .lowLatency = recognizeOptions .lowLatency ;
308311 this .characterInsertionBias = recognizeOptions .characterInsertionBias ;
@@ -619,6 +622,17 @@ public Builder speechDetectorSensitivity(Float speechDetectorSensitivity) {
619622 return this ;
620623 }
621624
625+ /**
626+ * Set the sadModule.
627+ *
628+ * @param sadModule the sadModule
629+ * @return the RecognizeOptions builder
630+ */
631+ public Builder sadModule (long sadModule ) {
632+ this .sadModule = sadModule ;
633+ return this ;
634+ }
635+
622636 /**
623637 * Set the backgroundAudioSuppression.
624638 *
@@ -694,6 +708,7 @@ protected RecognizeOptions(Builder builder) {
694708 endOfPhraseSilenceTime = builder .endOfPhraseSilenceTime ;
695709 splitTranscriptAtPhraseEnd = builder .splitTranscriptAtPhraseEnd ;
696710 speechDetectorSensitivity = builder .speechDetectorSensitivity ;
711+ sadModule = builder .sadModule ;
697712 backgroundAudioSuppression = builder .backgroundAudioSuppression ;
698713 lowLatency = builder .lowLatency ;
699714 characterInsertionBias = builder .characterInsertionBias ;
@@ -759,7 +774,8 @@ public String model() {
759774 * when a speech activity is detected in the stream. This can be used both in standard and low
760775 * latency mode. This feature enables client applications to know that some words/speech has been
761776 * detected and the service is in the process of decoding. This can be used in lieu of interim
762- * results in standard mode. See [Using speech recognition
777+ * results in standard mode. Use `sad_module: 2` to increase accuracy and performance in detecting
778+ * speech boundaries within the audio stream. See [Using speech recognition
763779 * parameters](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-service-features#features-parameters).
764780 *
765781 * @return the speechBeginEvent
@@ -1154,6 +1170,23 @@ public Float speechDetectorSensitivity() {
11541170 return speechDetectorSensitivity ;
11551171 }
11561172
1173+ /**
1174+ * Gets the sadModule.
1175+ *
1176+ * <p>Detects speech boundaries within the audio stream with better performance, improved noise
1177+ * suppression, faster responsiveness, and increased accuracy.
1178+ *
1179+ * <p>Specify `sad_module: 2`
1180+ *
1181+ * <p>See [Speech Activity Detection
1182+ * (SAD)](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#sad).
1183+ *
1184+ * @return the sadModule
1185+ */
1186+ public Long sadModule () {
1187+ return sadModule ;
1188+ }
1189+
11571190 /**
11581191 * Gets the backgroundAudioSuppression.
11591192 *
0 commit comments