Class RealtimeParameters.Builder
- java.lang.Object
-
- com.oracle.bmc.aispeech.model.RealtimeParameters.Builder
-
- Enclosing class:
- RealtimeParameters
public static class RealtimeParameters.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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=alawRealtimeParameters.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)
Oracle model supported language codes are locale specific.RealtimeParameters.Builder
modelDomain(RealtimeParameters.ModelDomain modelDomain)
Model Domain.RealtimeParameters.Builder
modelType(String modelType)
Select a model to use for generating transcriptions.RealtimeParameters.Builder
partialSilenceThresholdInMs(Integer partialSilenceThresholdInMs)
Silence threshold for Realtime Speech partial results in milliseconds.RealtimeParameters.Builder
punctuation(RealtimeParameters.Punctuation punctuation)
Configure punctuations in the generated transcriptions.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 Currently supported only for Oracle model.
-
-
-
Method Detail
-
encoding
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- Parameters:
encoding
- the value to set- Returns:
- this builder
-
isAckEnabled
public RealtimeParameters.Builder isAckEnabled(Boolean isAckEnabled)
Toggle for ack messages.- Parameters:
isAckEnabled
- the value to set- Returns:
- this builder
-
partialSilenceThresholdInMs
public RealtimeParameters.Builder partialSilenceThresholdInMs(Integer partialSilenceThresholdInMs)
Silence threshold for Realtime Speech partial results in milliseconds.Currently supported only for Oracle model.
- Parameters:
partialSilenceThresholdInMs
- the value to set- Returns:
- this builder
-
finalSilenceThresholdInMs
public RealtimeParameters.Builder finalSilenceThresholdInMs(Integer finalSilenceThresholdInMs)
Silence threshold for Realtime Speech final results in milliseconds.Currently supported only for Oracle model.
- Parameters:
finalSilenceThresholdInMs
- the value to set- Returns:
- this builder
-
stabilizePartialResults
public 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 Currently supported only for Oracle model.- Parameters:
stabilizePartialResults
- the value to set- Returns:
- this builder
-
modelType
public RealtimeParameters.Builder modelType(String modelType)
Select a model to use for generating transcriptions.Currently supported models are: - ORACLE - WHISPER
- Parameters:
modelType
- the value to set- Returns:
- this builder
-
modelDomain
public RealtimeParameters.Builder modelDomain(RealtimeParameters.ModelDomain modelDomain)
Model Domain.- Parameters:
modelDomain
- the value to set- Returns:
- this builder
-
languageCode
public RealtimeParameters.Builder languageCode(String languageCode)
Oracle model supported language codes are locale specific.Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646] - en-US: English - United States (default) - 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 Whisper model supported language codes are locale agnostic - auto: Auto-detect language - af: Afrikaans
- am: Amharic - ar: Arabic - as: Assamese - az: Azerbaijani - ba: Bashkir - be: Belarusian - bg: Bulgarian - bn: Bengali - bo: Tibetan - br: Breton - bs: Bosnian - ca: Catalan - cs: Czech - cy: Welsh - da: Danish - de: German - el: Greek - en: English (default) - es: Spanish - et: Estonian - eu: Basque - fa: Persian - fi: Finnish - fo: Faroese - fr: French - gl: Galician - gu: Gujarati - ha: Hausa - haw: Hawaiian - he: Hebrew - hi: Hindi - hr: Croatian - ht: Haitian Creole - hu: Hungarian - hy: Armenian - id: Indonesian - is: Icelandic - it: Italian - ja: Japanese - jv: Javanese - ka: Georgian
- kk: Kazakh - km: Khmer - kn: Kannada - ko: Korean - la: Latin - lb: Luxembourgish - ln: Lingala - lo: Lao - lt: Lithuanian - lv: Latvian - mg: Malagasy - mi: Maori - mk: Macedonian - ml: Malayalam - mn: Mongolian - mr: Marathi - ms: Malay - mt: Maltese - my: Burmese - ne: Nepali - nl: Dutch - nn: Norwegian Nynorsk - no: Norwegian - oc: Occitan - pa: Punjabi - pl: Polish - ps: Pashto - pt: Portuguese - ro: Romanian - ru: Russian - sa: Sanskrit - sd: Sindhi - si: Sinhala - sk: Slovak - sl: Slovenian - sn: Shona - so: Somali
- sq: Albanian - sr: Serbian - su: Sundanese - sv: Swedish - sw: Swahili - ta: Tamil - te: Telugu - tg: Tajik - th: Thai - tk: Turkmen - tl: Tagalog - tr: Turkish - tt: Tatar - uk: Ukrainian - ur: Urdu - uz: Uzbek - vi: Vietnamese - yi: Yiddish - yo: Yoruba - zh: Chinese
- Parameters:
languageCode
- the value to set- Returns:
- this builder
-
shouldIgnoreInvalidCustomizations
public 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. Currently supported only for Oracle model.
- Parameters:
shouldIgnoreInvalidCustomizations
- the value to set- Returns:
- this builder
-
customizations
public RealtimeParameters.Builder customizations(List<CustomizationInference> customizations)
Array of customization objects.Currently supported only for Oracle model.
- Parameters:
customizations
- the value to set- Returns:
- this builder
-
punctuation
public RealtimeParameters.Builder punctuation(RealtimeParameters.Punctuation punctuation)
Configure punctuations in the generated transcriptions.Disabled by default. - NONE: No punctuation in the transcription response - SPOKEN: Punctuations in response only when verbally spoken - AUTO: Automatic punctuation in the response, spoken punctuations are disabled Spoken punctuation is currently supported only for the Oracle model in the Medical domain.
- Parameters:
punctuation
- the value to set- Returns:
- this builder
-
build
public RealtimeParameters build()
-
copy
public RealtimeParameters.Builder copy(RealtimeParameters model)
-
-