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.
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.
partial_silence_threshold_in_ms Gets the partial_silence_threshold_in_ms 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”

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_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.
customizations

Gets the customizations of this RealtimeParameters. Array of customization objects.

Returns:The customizations of this RealtimeParameters.
Return type:list[oci.ai_speech.models.CustomizationInference]
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
final_silence_threshold_in_ms

Gets the final_silence_threshold_in_ms of this RealtimeParameters. Silence threshold for Realtime Speech final results in milliseconds.

Returns:The final_silence_threshold_in_ms of this RealtimeParameters.
Return type:int
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
language_code

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

Returns:The language_code of this RealtimeParameters.
Return type:str
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
partial_silence_threshold_in_ms

Gets the partial_silence_threshold_in_ms of this RealtimeParameters. Silence threshold for Realtime Speech partial results in milliseconds.

Returns:The partial_silence_threshold_in_ms of this RealtimeParameters.
Return type:int
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.

Returns:The should_ignore_invalid_customizations of this RealtimeParameters.
Return type:bool
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

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

Returns:The stabilize_partial_results of this RealtimeParameters.
Return type:str