Class RealtimeParameters
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.aispeech.model.RealtimeParameters
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20220101") public final class RealtimeParameters extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModelParameters to be sent to the realtime speech service over a websocket connection.
Note: Objects should always be created or deserialized using theRealtimeParameters.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of theRealtimeParameters.Builder, which maintain a set of all explicitly set fields calledRealtimeParameters.Builder.__explicitlySet__. ThehashCode()andequals(Object)methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRealtimeParameters.Builderstatic classRealtimeParameters.ModelDomainModel Domain.static classRealtimeParameters.PunctuationConfigure punctuations in the generated transcriptions.static classRealtimeParameters.StabilizePartialResultsWhen 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.
-
Constructor Summary
Constructors Constructor Description RealtimeParameters(String encoding, Boolean isAckEnabled, Integer partialSilenceThresholdInMs, Integer finalSilenceThresholdInMs, RealtimeParameters.StabilizePartialResults stabilizePartialResults, String modelType, RealtimeParameters.ModelDomain modelDomain, String languageCode, Boolean shouldIgnoreInvalidCustomizations, List<CustomizationInference> customizations, RealtimeParameters.Punctuation punctuation)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RealtimeParameters.Builderbuilder()Create a new builder.booleanequals(Object o)List<CustomizationInference>getCustomizations()Array of customization objects.StringgetEncoding()Audio encoding to use - audio/raw;rate=16000 - audio/raw;rate=8000 - audio/raw;rate=8000;codec=mulaw - audio/raw;rate=8000;codec=alawIntegergetFinalSilenceThresholdInMs()Silence threshold for Realtime Speech final results in milliseconds.BooleangetIsAckEnabled()Toggle for ack messages.StringgetLanguageCode()Oracle model supported language codes are locale specific.RealtimeParameters.ModelDomaingetModelDomain()Model Domain.StringgetModelType()Select a model to use for generating transcriptions.IntegergetPartialSilenceThresholdInMs()Silence threshold for Realtime Speech partial results in milliseconds.RealtimeParameters.PunctuationgetPunctuation()Configure punctuations in the generated transcriptions.BooleangetShouldIgnoreInvalidCustomizations()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.StabilizePartialResultsgetStabilizePartialResults()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.inthashCode()RealtimeParameters.BuildertoBuilder()StringtoString()StringtoString(boolean includeByteArrayContents)Return a string representation of the object.
-
-
-
Constructor Detail
-
RealtimeParameters
@Deprecated @ConstructorProperties({"encoding","isAckEnabled","partialSilenceThresholdInMs","finalSilenceThresholdInMs","stabilizePartialResults","modelType","modelDomain","languageCode","shouldIgnoreInvalidCustomizations","customizations","punctuation"}) public RealtimeParameters(String encoding, Boolean isAckEnabled, Integer partialSilenceThresholdInMs, Integer finalSilenceThresholdInMs, RealtimeParameters.StabilizePartialResults stabilizePartialResults, String modelType, RealtimeParameters.ModelDomain modelDomain, String languageCode, Boolean shouldIgnoreInvalidCustomizations, List<CustomizationInference> customizations, RealtimeParameters.Punctuation punctuation)
Deprecated.
-
-
Method Detail
-
builder
public static RealtimeParameters.Builder builder()
Create a new builder.
-
toBuilder
public RealtimeParameters.Builder toBuilder()
-
getEncoding
public String getEncoding()
Audio encoding to use - audio/raw;rate=16000 - audio/raw;rate=8000 - audio/raw;rate=8000;codec=mulaw - audio/raw;rate=8000;codec=alaw- Returns:
- the value
-
getIsAckEnabled
public Boolean getIsAckEnabled()
Toggle for ack messages.- Returns:
- the value
-
getPartialSilenceThresholdInMs
public Integer getPartialSilenceThresholdInMs()
Silence threshold for Realtime Speech partial results in milliseconds.Currently supported only for Oracle model.
- Returns:
- the value
-
getFinalSilenceThresholdInMs
public Integer getFinalSilenceThresholdInMs()
Silence threshold for Realtime Speech final results in milliseconds.Currently supported only for Oracle model.
- Returns:
- the value
-
getStabilizePartialResults
public RealtimeParameters.StabilizePartialResults getStabilizePartialResults()
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.- Returns:
- the value
-
getModelType
public String getModelType()
Select a model to use for generating transcriptions.Currently supported models are: - ORACLE
- WHISPER
- Returns:
- the value
-
getModelDomain
public RealtimeParameters.ModelDomain getModelDomain()
Model Domain.- Returns:
- the value
-
getLanguageCode
public String getLanguageCode()
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
- Returns:
- the value
-
getShouldIgnoreInvalidCustomizations
public Boolean getShouldIgnoreInvalidCustomizations()
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.
- Returns:
- the value
-
getCustomizations
public List<CustomizationInference> getCustomizations()
Array of customization objects.Currently supported only for Oracle model.
- Returns:
- the value
-
getPunctuation
public RealtimeParameters.Punctuation getPunctuation()
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.
- Returns:
- the value
-
toString
public String toString()
- Overrides:
toStringin classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.- Parameters:
includeByteArrayContents- true to include the full contents of byte arrays- Returns:
- string representation
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
hashCode
public int hashCode()
- Overrides:
hashCodein classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
-