RealtimeParameters

class oci.ai_speech.models.RealtimeParameters(**kwargs)

Bases: object

Parameters to be sent to the realtime speech service over a websocket connection.

Attributes:

MODEL_DOMAIN_GENERIC

A constant which can be used with the model_domain property of a RealtimeParameters.

MODEL_DOMAIN_MEDICAL

A constant which can be used with the model_domain property of a RealtimeParameters.

PUNCTUATION_AUTO

A constant which can be used with the punctuation property of a RealtimeParameters.

PUNCTUATION_NONE

A constant which can be used with the punctuation property of a RealtimeParameters.

PUNCTUATION_SPOKEN

A constant which can be used with the punctuation property of a RealtimeParameters.

STABILIZE_PARTIAL_RESULTS_HIGH

A constant which can be used with the stabilize_partial_results property of a RealtimeParameters.

STABILIZE_PARTIAL_RESULTS_LOW

A constant which can be used with the stabilize_partial_results property of a RealtimeParameters.

STABILIZE_PARTIAL_RESULTS_MEDIUM

A constant which can be used with the stabilize_partial_results property of a RealtimeParameters.

STABILIZE_PARTIAL_RESULTS_NONE

A constant which can be used with the stabilize_partial_results property of a RealtimeParameters.

customizations

Gets the customizations of this RealtimeParameters.

encoding

Gets the encoding of this RealtimeParameters.

final_silence_threshold_in_ms

Gets the final_silence_threshold_in_ms of this RealtimeParameters.

is_ack_enabled

Gets the is_ack_enabled of this RealtimeParameters.

language_code

Gets the language_code of this RealtimeParameters.

model_domain

Gets the model_domain of this RealtimeParameters.

model_type

Gets the model_type of this RealtimeParameters.

partial_silence_threshold_in_ms

Gets the partial_silence_threshold_in_ms of this RealtimeParameters.

punctuation

Gets the punctuation of this RealtimeParameters.

should_ignore_invalid_customizations

Gets the should_ignore_invalid_customizations of this RealtimeParameters.

stabilize_partial_results

Gets the stabilize_partial_results of this RealtimeParameters.

Methods:

__init__(**kwargs)

Initializes a new RealtimeParameters object with values from keyword arguments.

MODEL_DOMAIN_GENERIC = 'GENERIC'

A constant which can be used with the model_domain property of a RealtimeParameters. This constant has a value of “GENERIC”

MODEL_DOMAIN_MEDICAL = 'MEDICAL'

A constant which can be used with the model_domain property of a RealtimeParameters. This constant has a value of “MEDICAL”

PUNCTUATION_AUTO = 'AUTO'

A constant which can be used with the punctuation property of a RealtimeParameters. This constant has a value of “AUTO”

PUNCTUATION_NONE = 'NONE'

A constant which can be used with the punctuation property of a RealtimeParameters. This constant has a value of “NONE”

PUNCTUATION_SPOKEN = 'SPOKEN'

A constant which can be used with the punctuation property of a RealtimeParameters. This constant has a value of “SPOKEN”

STABILIZE_PARTIAL_RESULTS_HIGH = 'HIGH'

A constant which can be used with the stabilize_partial_results property of a RealtimeParameters. This constant has a value of “HIGH”

STABILIZE_PARTIAL_RESULTS_LOW = 'LOW'

A constant which can be used with the stabilize_partial_results property of a RealtimeParameters. This constant has a value of “LOW”

STABILIZE_PARTIAL_RESULTS_MEDIUM = 'MEDIUM'

A constant which can be used with the stabilize_partial_results property of a RealtimeParameters. This constant has a value of “MEDIUM”

STABILIZE_PARTIAL_RESULTS_NONE = 'NONE'

A constant which can be used with the stabilize_partial_results property of a RealtimeParameters. This constant has a value of “NONE”

__init__(**kwargs)

Initializes a new RealtimeParameters object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • encoding (str) – The value to assign to the encoding property of this RealtimeParameters.

  • is_ack_enabled (bool) – The value to assign to the is_ack_enabled property of this RealtimeParameters.

  • partial_silence_threshold_in_ms (int) – The value to assign to the partial_silence_threshold_in_ms property of this RealtimeParameters.

  • final_silence_threshold_in_ms (int) – The value to assign to the final_silence_threshold_in_ms property of this RealtimeParameters.

  • stabilize_partial_results (str) – The value to assign to the stabilize_partial_results property of this RealtimeParameters. Allowed values for this property are: “NONE”, “LOW”, “MEDIUM”, “HIGH”

  • model_type (str) – The value to assign to the model_type property of this RealtimeParameters.

  • model_domain (str) – The value to assign to the model_domain property of this RealtimeParameters. Allowed values for this property are: “GENERIC”, “MEDICAL”

  • language_code (str) – The value to assign to the language_code property of this RealtimeParameters.

  • should_ignore_invalid_customizations (bool) – The value to assign to the should_ignore_invalid_customizations property of this RealtimeParameters.

  • customizations (list[oci.ai_speech.models.CustomizationInference]) – The value to assign to the customizations property of this RealtimeParameters.

  • punctuation (str) – The value to assign to the punctuation property of this RealtimeParameters. Allowed values for this property are: “NONE”, “SPOKEN”, “AUTO”

property customizations

Gets the customizations of this RealtimeParameters. Array of customization objects. Currently supported only for Oracle model.

Returns

The customizations of this RealtimeParameters.

Return type

list[oci.ai_speech.models.CustomizationInference]

property encoding

Gets the encoding of this RealtimeParameters. 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 encoding of this RealtimeParameters.

Return type

str

property final_silence_threshold_in_ms

Gets the final_silence_threshold_in_ms of this RealtimeParameters. Silence threshold for Realtime Speech final results in milliseconds. Currently supported only for Oracle model.

Returns

The final_silence_threshold_in_ms of this RealtimeParameters.

Return type

int

property is_ack_enabled

Gets the is_ack_enabled of this RealtimeParameters. Toggle for ack messages.

Returns

The is_ack_enabled of this RealtimeParameters.

Return type

bool

property language_code

Gets the language_code of this RealtimeParameters. 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 language_code of this RealtimeParameters.

Return type

str

property model_domain

Gets the model_domain of this RealtimeParameters. Model Domain.

Allowed values for this property are: “GENERIC”, “MEDICAL”

Returns

The model_domain of this RealtimeParameters.

Return type

str

property model_type

Gets the model_type of this RealtimeParameters. Select a model to use for generating transcriptions. Currently supported models are: - ORACLE - WHISPER

Returns

The model_type of this RealtimeParameters.

Return type

str

property partial_silence_threshold_in_ms

Gets the partial_silence_threshold_in_ms of this RealtimeParameters. Silence threshold for Realtime Speech partial results in milliseconds. Currently supported only for Oracle model.

Returns

The partial_silence_threshold_in_ms of this RealtimeParameters.

Return type

int

property punctuation

Gets the punctuation of this RealtimeParameters. 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.

Allowed values for this property are: “NONE”, “SPOKEN”, “AUTO”

Returns

The punctuation of this RealtimeParameters.

Return type

str

property should_ignore_invalid_customizations

Gets the should_ignore_invalid_customizations of this RealtimeParameters. 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 should_ignore_invalid_customizations of this RealtimeParameters.

Return type

bool

property stabilize_partial_results

Gets the stabilize_partial_results of this RealtimeParameters. 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.

Allowed values for this property are: “NONE”, “LOW”, “MEDIUM”, “HIGH”

Returns

The stabilize_partial_results of this RealtimeParameters.

Return type

str