AIServiceSpeechClient¶
- class oci.ai_speech.AIServiceSpeechClient(config, **kwargs)¶
The OCI Speech Service harnesses the power of spoken language by allowing developers to easily convert file-based data containing human speech into highly accurate text transcriptions.
Methods:
__init__(config, **kwargs)Creates a new service client
Canceling the job cancels all the tasks under it.
Cancel Transcription Task
Moves a Customization resource into a different compartment.
Moves a transcription Job resource into a different compartment.
create_customization(...)Creates a new Customization.
Returns an authentication token to the user.
Creates a new Transcription Job.
delete_customization(customization_id, **kwargs)Delete Customization and its metadata from tenancy.
Delete API cleans job, tasks and the related metadata.
get_customization(customization_id, **kwargs)Gets a Customization by identifier
get_transcription_job(transcription_job_id, ...)Gets a Transcription Job by identifier
get_transcription_task(transcription_job_id, ...)Gets a Transcription Task by identifier
list_customizations(**kwargs)Returns a list of Customizations.
list_transcription_jobs(**kwargs)Returns a list of Transcription Jobs.
Returns a list of Transcription Tasks.
list_voices(**kwargs)Returns a list of speakers available to the user to choose from based on language code and voice type provided.
synthesize_speech(synthesize_speech_details, ...)Creates an audio for the given input text based on other input parameters like language, voice type, etc.
update_customization(customization_id, ...)Updates a Customization by identifier
Updates the Transcription Job
- __init__(config, **kwargs)¶
Creates a new service client
- Parameters
config (dict) – Configuration keys and values as per SDK and Tool Configuration. The
from_file()method can be used to load configuration from a file. Alternatively, adictcan be passed. You can validate_config the dict usingvalidate_config()service_endpoint (str) – (optional) The endpoint of the service to call using this client. For example
https://iaas.us-ashburn-1.oraclecloud.com. If this keyword argument is not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit need to specify a service endpoint.timeout (float or tuple(float, float)) – (optional) The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
signer (
AbstractBaseSigner) –(optional) The signer to use when signing requests made by the service client. The default is to use a
Signerbased on the values provided in the config parameter.One use case for this parameter is for Instance Principals authentication by passing an instance of
InstancePrincipalsSecurityTokenSigneras the value for this keyword argumentretry_strategy (obj) –
(optional) A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. Retry strategies can also be applied at the operation level by passing a
retry_strategykeyword argument as part of calling the operation. Any value provided at the operation level will override whatever is specified at the client level.This should be one of the strategies available in the
retrymodule. A convenienceDEFAULT_RETRY_STRATEGYis also available. The specifics of the default retry strategy are described here.circuit_breaker_strategy (obj) – (optional) A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). This client uses
DEFAULT_CIRCUIT_BREAKER_STRATEGYas default if no circuit breaker strategy is provided. The specifics of circuit breaker strategy are described here.circuit_breaker_callback (function) – (optional) Callback function to receive any exceptions triggerred by the circuit breaker.
client_level_realm_specific_endpoint_template_enabled (bool) – (optional) A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None.
allow_control_chars – (optional) allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not allow control characters to be in the response object.
enable_strict_url_encoding – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this client should enable strict url encoding in path params of a request. By default, the client will not enable strict url encoding
- cancel_transcription_job(transcription_job_id, **kwargs)¶
Canceling the job cancels all the tasks under it.
- Parameters
transcription_job_id (str) – (required) Unique Transcription Job identifier.
if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
opc_request_id (str) – (optional) The client request ID for tracing.
opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of type None- Return type
- Example
Click here to see an example of how to use cancel_transcription_job API.
- cancel_transcription_task(transcription_job_id, transcription_task_id, **kwargs)¶
Cancel Transcription Task
- Parameters
transcription_job_id (str) – (required) Unique Transcription Job identifier.
transcription_task_id (str) – (required) Unique Transcription Task identifier.
if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
opc_request_id (str) – (optional) The client request ID for tracing.
opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of type None- Return type
- Example
Click here to see an example of how to use cancel_transcription_task API.
- change_customization_compartment(customization_id, change_customization_compartment_details, **kwargs)¶
Moves a Customization resource into a different compartment.
- Parameters
customization_id (str) – (required) Unique Customization training Job identifier.
change_customization_compartment_details (oci.ai_speech.models.ChangeCustomizationCompartmentDetails) – (required) Details for changing the compartment of a Customization.
if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
opc_request_id (str) – (optional) The client request ID for tracing.
opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of type None- Return type
- Example
Click here to see an example of how to use change_customization_compartment API.
- change_transcription_job_compartment(transcription_job_id, change_transcription_job_compartment_details, **kwargs)¶
Moves a transcription Job resource into a different compartment.
- Parameters
transcription_job_id (str) – (required) Unique Transcription Job identifier.
change_transcription_job_compartment_details (oci.ai_speech.models.ChangeTranscriptionJobCompartmentDetails) – (required) Details for changing the compartment of a transcription Job.
if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
opc_request_id (str) – (optional) The client request ID for tracing.
opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of type None- Return type
- Example
Click here to see an example of how to use change_transcription_job_compartment API.
- create_customization(create_customization_details, **kwargs)¶
Creates a new Customization.
- Parameters
create_customization_details (oci.ai_speech.models.CreateCustomizationDetails) – (required) Details for the new Customization.
opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of typeCustomization- Return type
- Example
Click here to see an example of how to use create_customization API.
- create_realtime_session_token(create_realtime_session_token_details, **kwargs)¶
Returns an authentication token to the user.
- Parameters
create_realtime_session_token_details (oci.ai_speech.models.CreateRealtimeSessionTokenDetails) – (required) An object containing the compartment ID for authorization purposes.
opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of typeRealtimeSessionToken- Return type
- Example
Click here to see an example of how to use create_realtime_session_token API.
- create_transcription_job(create_transcription_job_details, **kwargs)¶
Creates a new Transcription Job.
- Parameters
create_transcription_job_details (oci.ai_speech.models.CreateTranscriptionJobDetails) – (required) Details for the new Transcription Job.
opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of typeTranscriptionJob- Return type
- Example
Click here to see an example of how to use create_transcription_job API.
- delete_customization(customization_id, **kwargs)¶
Delete Customization and its metadata from tenancy.
- Parameters
customization_id (str) – (required) Unique Customization training Job identifier.
if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
opc_request_id (str) – (optional) The client request ID for tracing.
opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of type None- Return type
- Example
Click here to see an example of how to use delete_customization API.
- delete_transcription_job(transcription_job_id, **kwargs)¶
Delete API cleans job, tasks and the related metadata. However the generated transcriptions in customer tenancy will not be deleted.
- Parameters
transcription_job_id (str) – (required) Unique Transcription Job identifier.
if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
opc_request_id (str) – (optional) The client request ID for tracing.
opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of type None- Return type
- Example
Click here to see an example of how to use delete_transcription_job API.
- get_customization(customization_id, **kwargs)¶
Gets a Customization by identifier
- Parameters
customization_id (str) – (required) Unique Customization training Job identifier.
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of typeCustomization- Return type
- Example
Click here to see an example of how to use get_customization API.
- get_transcription_job(transcription_job_id, **kwargs)¶
Gets a Transcription Job by identifier
- Parameters
transcription_job_id (str) – (required) Unique Transcription Job identifier.
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of typeTranscriptionJob- Return type
- Example
Click here to see an example of how to use get_transcription_job API.
- get_transcription_task(transcription_job_id, transcription_task_id, **kwargs)¶
Gets a Transcription Task by identifier
- Parameters
transcription_job_id (str) – (required) Unique Transcription Job identifier.
transcription_task_id (str) – (required) Unique Transcription Task identifier.
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of typeTranscriptionTask- Return type
- Example
Click here to see an example of how to use get_transcription_task API.
- list_customizations(**kwargs)¶
Returns a list of Customizations.
- Parameters
compartment_id (str) – (optional) The ID of the compartment in which to list resources.
lifecycle_state (str) –
(optional) A filter to return only resources whose lifecycleState matches the given lifecycleState.
Allowed values are: “DELETING”, “DELETED”, “FAILED”, “UPDATING”, “ACTIVE”, “CREATING”
display_name (str) – (optional) A filter to return only resources that match the entire display name given.
id (str) – (optional) Unique identifier(OCID).
limit (int) – (optional) The maximum number of items to return.
page (str) – (optional) A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.
sort_order (str) –
(optional) The sort order to use, either ‘ASC’ or ‘DESC’.
Allowed values are: “ASC”, “DESC”
sort_by (str) –
(optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending.
Allowed values are: “timeCreated”, “displayName”
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of typeCustomizationCollection- Return type
- Example
Click here to see an example of how to use list_customizations API.
- list_transcription_jobs(**kwargs)¶
Returns a list of Transcription Jobs.
- Parameters
compartment_id (str) – (optional) The ID of the compartment in which to list resources.
lifecycle_state (str) –
(optional) A filter to return only resources whose lifecycleState matches the given lifecycleState.
Allowed values are: “ACCEPTED”, “IN_PROGRESS”, “SUCCEEDED”, “FAILED”, “CANCELING”, “CANCELED”
display_name (str) – (optional) A filter to return only resources that match the entire display name given.
id (str) – (optional) Unique identifier(OCID).
limit (int) – (optional) The maximum number of items to return.
page (str) – (optional) A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.
sort_order (str) –
(optional) The sort order to use, either ‘ASC’ or ‘DESC’.
Allowed values are: “ASC”, “DESC”
sort_by (str) –
(optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending.
Allowed values are: “timeCreated”, “displayName”
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of typeTranscriptionJobCollection- Return type
- Example
Click here to see an example of how to use list_transcription_jobs API.
- list_transcription_tasks(transcription_job_id, **kwargs)¶
Returns a list of Transcription Tasks.
- Parameters
transcription_job_id (str) – (required) Unique Transcription Job identifier.
lifecycle_state (str) –
(optional) A filter to return only resources whose lifecycleState matches the given lifecycleState.
Allowed values are: “ACCEPTED”, “IN_PROGRESS”, “SUCCEEDED”, “FAILED”, “CANCELED”
display_name (str) – (optional) A filter to return only resources that match the entire display name given.
id (str) – (optional) Unique identifier(OCID).
limit (int) – (optional) The maximum number of items to return.
page (str) – (optional) A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.
sort_order (str) –
(optional) The sort order to use, either ‘ASC’ or ‘DESC’.
Allowed values are: “ASC”, “DESC”
sort_by (str) –
(optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending.
Allowed values are: “timeCreated”, “displayName”
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of typeTranscriptionTaskCollection- Return type
- Example
Click here to see an example of how to use list_transcription_tasks API.
- list_voices(**kwargs)¶
Returns a list of speakers available to the user to choose from based on language code and voice type provided.
- Parameters
compartment_id (str) – (optional) The ID of the compartment in which to list resources.
model_name (str) –
(optional) The model name to filter voices for given model name.
Allowed values are: “TTS_1_STANDARD”, “TTS_2_NATURAL”
language_code (str) – (optional) The Code or Id of the language to filter voices for given language code.
display_name (str) – (optional) The name of the speaker voice in which the user wants tts inference to be.
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of typeVoiceCollection- Return type
- Example
Click here to see an example of how to use list_voices API.
- synthesize_speech(synthesize_speech_details, **kwargs)¶
Creates an audio for the given input text based on other input parameters like language, voice type, etc.
- Parameters
synthesize_speech_details (oci.ai_speech.models.SynthesizeSpeechDetails) – (required) The request to be sent to the TTS service to get required inference audio.
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of type stream- Return type
- Example
Click here to see an example of how to use synthesize_speech API.
- update_customization(customization_id, update_customization_details, **kwargs)¶
Updates a Customization by identifier
- Parameters
customization_id (str) – (required) Unique Customization training Job identifier.
update_customization_details (oci.ai_speech.models.UpdateCustomizationDetails) – (required) The information to be updated.
if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of typeCustomization- Return type
- Example
Click here to see an example of how to use update_customization API.
- update_transcription_job(transcription_job_id, update_transcription_job_details, **kwargs)¶
Updates the Transcription Job
- Parameters
transcription_job_id (str) – (required) Unique Transcription Job identifier.
update_transcription_job_details (oci.ai_speech.models.UpdateTranscriptionJobDetails) – (required) The information to be updated.
if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
opc_request_id (str) – (optional) The client request ID for tracing.
retry_strategy (obj) –
(optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the
retrymodule. This operation will not retry by default, users can also use the convenientDEFAULT_RETRY_STRATEGYprovided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.To have this operation explicitly not perform any retries, pass an instance of
NoneRetryStrategy.allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
enable_strict_url_encoding (bool) – (optional) enable_strict_url_encoding is a boolean to indicate whether or not this request should enable strict url encoding for path params. By default, strict url encoding for path params is disabled
- Returns
A
Responseobject with data of typeTranscriptionJob- Return type
- Example
Click here to see an example of how to use update_transcription_job API.