public static class RealtimeParameters.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
RealtimeParameters |
build() |
RealtimeParameters.Builder |
copy(RealtimeParameters model) |
RealtimeParameters.Builder |
customizations(List<CustomizationInference> customizations)
Array of customization objects.
|
RealtimeParameters.Builder |
encoding(String encoding)
Audio encoding to use - audio/raw;rate=16000 - audio/raw;rate=8000 -
audio/raw;rate=8000;codec=mulaw - audio/raw;rate=8000;codec=alaw
|
RealtimeParameters.Builder |
finalSilenceThresholdInMs(Integer finalSilenceThresholdInMs)
Silence threshold for Realtime Speech final results in milliseconds.
|
RealtimeParameters.Builder |
isAckEnabled(Boolean isAckEnabled)
Toggle for ack messages.
|
RealtimeParameters.Builder |
languageCode(String languageCode)
Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646].
|
RealtimeParameters.Builder |
modelDomain(RealtimeParameters.ModelDomain modelDomain)
Model Domain.
|
RealtimeParameters.Builder |
partialSilenceThresholdInMs(Integer partialSilenceThresholdInMs)
Silence threshold for Realtime Speech partial results in milliseconds.
|
RealtimeParameters.Builder |
shouldIgnoreInvalidCustomizations(Boolean shouldIgnoreInvalidCustomizations)
If set to true, the service will not fail connection attempt if it encounters any issues
that prevent the loading of all specified user customizations.
|
RealtimeParameters.Builder |
stabilizePartialResults(RealtimeParameters.StabilizePartialResults stabilizePartialResults)
When enabled sets the amount of confidence required for latest tokens before returning
them as part of a new partial result
|
public RealtimeParameters.Builder encoding(String encoding)
Audio encoding to use - audio/raw;rate=16000 - audio/raw;rate=8000 - audio/raw;rate=8000;codec=mulaw - audio/raw;rate=8000;codec=alaw
encoding
- the value to setpublic RealtimeParameters.Builder isAckEnabled(Boolean isAckEnabled)
Toggle for ack messages.
isAckEnabled
- the value to setpublic RealtimeParameters.Builder partialSilenceThresholdInMs(Integer partialSilenceThresholdInMs)
Silence threshold for Realtime Speech partial results in milliseconds.
partialSilenceThresholdInMs
- the value to setpublic RealtimeParameters.Builder finalSilenceThresholdInMs(Integer finalSilenceThresholdInMs)
Silence threshold for Realtime Speech final results in milliseconds.
finalSilenceThresholdInMs
- the value to setpublic RealtimeParameters.Builder stabilizePartialResults(RealtimeParameters.StabilizePartialResults stabilizePartialResults)
When enabled sets the amount of confidence required for latest tokens before returning them as part of a new partial result
stabilizePartialResults
- the value to setpublic RealtimeParameters.Builder modelDomain(RealtimeParameters.ModelDomain modelDomain)
Model Domain.
modelDomain
- the value to setpublic RealtimeParameters.Builder languageCode(String languageCode)
Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. - en-US: English - United States - es-ES: Spanish - Spain - pt-BR: Portuguese - Brazil - en-GB: English - Great Britain - en-AU: English - Australia - en-IN: English - India - hi-IN: Hindi - India - fr-FR: French - France - de-DE: German - Germany - it-IT: Italian - Italy
languageCode
- the value to setpublic RealtimeParameters.Builder shouldIgnoreInvalidCustomizations(Boolean shouldIgnoreInvalidCustomizations)
If set to true, the service will not fail connection attempt if it encounters any issues that prevent the loading of all specified user customizations. Any invalid customizations will simply be ignored and connection will continue being established with the default base model and any remaining valid customizations. If set to false, if the service is unable to load any of the specified customizations, an error detailing why will be returned and the session will end.
shouldIgnoreInvalidCustomizations
- the value to setpublic RealtimeParameters.Builder customizations(List<CustomizationInference> customizations)
Array of customization objects.
customizations
- the value to setpublic RealtimeParameters build()
public RealtimeParameters.Builder copy(RealtimeParameters model)
Copyright © 2016–2024. All rights reserved.