Skip to main content

language_models

Creates, updates, deletes, gets or lists a language_models resource.

Overview

Namelanguage_models
TypeResource
Idaws.transcribe.language_models

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
base_model_namestringThe Amazon Transcribe standard language model, or base model, used to create your custom language model. (NarrowBand, WideBand)
create_timestring (date-time)The date and time the specified custom language model was created. Timestamps are in the format YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC. For example, 2022-05-04T12:32:58.761000-07:00 represents 12:32 PM UTC-7 on May 4, 2022.
failure_reasonstringIf ModelStatus is FAILED, FailureReason contains information about why the custom language model request failed. See also: Common Errors.
input_data_configobjectThe Amazon S3 location of the input files used to train and tune your custom language model, in addition to the data access role ARN (Amazon Resource Name) that has permissions to access these data.
language_codestringThe language code used to create your custom language model. Each custom language model must contain terms in only one language, and the language you select for your custom language model must match the language of your training and tuning data. For a list of supported languages and their associated language codes, refer to the Supported languages table. Note that US English (en-US) is the only language supported with Amazon Transcribe Medical. (en-US, hi-IN, es-US, en-GB, en-AU, de-DE, ja-JP)
last_modified_timestring (date-time)The date and time the specified custom language model was last modified. Timestamps are in the format YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC. For example, 2022-05-04T12:32:58.761000-07:00 represents 12:32 PM UTC-7 on May 4, 2022.
model_namestringA unique name, chosen by you, for your custom language model. This name is case sensitive, cannot contain spaces, and must be unique within an Amazon Web Services account. (pattern: <code>^[0-9a-zA-Z._-]+</code>)
model_statusstringThe status of the specified custom language model. When the status displays as COMPLETED the model is ready for use. (IN_PROGRESS, FAILED, COMPLETED)
upgrade_availabilitybooleanShows if a more current base model is available for use with the specified custom language model. If false, your custom language model is using the most up-to-date base model. If true, there is a newer base model available than the one your language model is using. Note that to update a base model, you must recreate the custom language model using the new base model. Base model upgrades for existing custom language models are not supported.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_language_modelselectregionProvides information about the specified custom language model. This operation also shows if the base language model that you used to create your custom language model has been updated. If Amazon Transcribe has updated the base model, you can create a new custom language model using the updated base model. If you tried to create a new custom language model and the request wasn't successful, you can use DescribeLanguageModel to help identify the reason for this failure.
list_language_modelsselectregionProvides a list of custom language models that match the specified criteria. If no criteria are specified, all custom language models are returned. To get detailed information about a specific custom language model, use the operation.
create_language_modelinsertregion, LanguageCode, BaseModelName, ModelName, InputDataConfigCreates a new custom language model. When creating a new custom language model, you must specify: If you want a Wideband (audio sample rates over 16,000 Hz) or Narrowband (audio sample rates under 16,000 Hz) base model The location of your training and tuning files (this must be an Amazon S3 URI) The language of your model A unique name for your model
delete_language_modeldeleteregionDeletes a custom language model. To use this operation, specify the name of the language model you want to delete using ModelName. custom language model names are case sensitive.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Provides information about the specified custom language model. This operation also shows if the base language model that you used to create your custom language model has been updated. If Amazon Transcribe has updated the base model, you can create a new custom language model using the updated base model. If you tried to create a new custom language model and the request wasn't successful, you can use DescribeLanguageModel to help identify the reason for this failure.

SELECT
base_model_name,
create_time,
failure_reason,
input_data_config,
language_code,
last_modified_time,
model_name,
model_status,
upgrade_availability
FROM aws.transcribe.language_models
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new custom language model. When creating a new custom language model, you must specify: If you want a Wideband (audio sample rates over 16,000 Hz) or Narrowband (audio sample rates under 16,000 Hz) base model The location of your training and tuning files (this must be an Amazon S3 URI) The language of your model A unique name for your model

INSERT INTO aws.transcribe.language_models (
LanguageCode,
BaseModelName,
ModelName,
InputDataConfig,
Tags,
region
)
SELECT
'{{ LanguageCode }}' /* required */,
'{{ BaseModelName }}' /* required */,
'{{ ModelName }}' /* required */,
'{{ InputDataConfig }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
base_model_name,
input_data_config,
language_code,
model_name,
model_status
;

DELETE examples

Deletes a custom language model. To use this operation, specify the name of the language model you want to delete using ModelName. custom language model names are case sensitive.

DELETE FROM aws.transcribe.language_models
WHERE region = '{{ region }}' --required
;