language_models
Creates, updates, deletes, gets or lists a language_models resource.
Overview
| Name | language_models |
| Type | Resource |
| Id | aws.transcribe.language_models |
Fields
The following fields are returned by SELECT queries:
- describe_language_model
- list_language_models
| Name | Datatype | Description |
|---|---|---|
base_model_name | string | The Amazon Transcribe standard language model, or base model, used to create your custom language model. (NarrowBand, WideBand) |
create_time | string (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_reason | string | If ModelStatus is FAILED, FailureReason contains information about why the custom language model request failed. See also: Common Errors. |
input_data_config | object | The 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_code | string | The 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_time | string (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_name | string | A 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_status | string | The status of the specified custom language model. When the status displays as COMPLETED the model is ready for use. (IN_PROGRESS, FAILED, COMPLETED) |
upgrade_availability | boolean | Shows 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. |
| Name | Datatype | Description |
|---|---|---|
models | array | Provides information about the custom language models that match the criteria specified in your request. |
next_token | string | If NextToken is present in your response, it indicates that not all results are displayed. To view the next set of results, copy the string associated with the NextToken parameter in your results output, then run your request again including NextToken with the value of the copied string. Repeat as needed to view all your results. (pattern: <code>.+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_language_model | select | region | 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. | |
list_language_models | select | region | Provides 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_model | insert | region, LanguageCode, BaseModelName, ModelName, InputDataConfig | 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 | |
delete_language_model | delete | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_language_model
- list_language_models
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
;
Provides 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.
SELECT
models,
next_token
FROM aws.transcribe.language_models
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_language_model
- Manifest
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
;
# Description fields are for documentation purposes
- name: language_models
props:
- name: region
value: "{{ region }}"
description: Required parameter for the language_models resource.
- name: LanguageCode
value: "{{ LanguageCode }}"
description: |
The language code that represents the language of your 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. A custom language model can only be used to transcribe files in the same language as the model. For example, if you create a custom language model using US English (en-US), you can only apply this model to files that contain English audio.
valid_values: ['en-US', 'hi-IN', 'es-US', 'en-GB', 'en-AU', 'de-DE', 'ja-JP']
- name: BaseModelName
value: "{{ BaseModelName }}"
description: |
The Amazon Transcribe standard language model, or base model, used to create your custom language model. Amazon Transcribe offers two options for base models: Wideband and Narrowband. If the audio you want to transcribe has a sample rate of 16,000 Hz or greater, choose WideBand. To transcribe audio with a sample rate less than 16,000 Hz, choose NarrowBand.
valid_values: ['NarrowBand', 'WideBand']
- name: ModelName
value: "{{ ModelName }}"
description: |
A 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. If you try to create a new custom language model with the same name as an existing custom language model, you get a ConflictException error.
- name: InputDataConfig
description: |
Contains the Amazon S3 location of the training data you want to use to create a new custom language model, and permissions to access this location. When using InputDataConfig, you must include these sub-parameters: S3Uri, which is the Amazon S3 location of your training data, and DataAccessRoleArn, which is the Amazon Resource Name (ARN) of the role that has permission to access your specified Amazon S3 location. You can optionally include TuningDataS3Uri, which is the Amazon S3 location of your tuning data. If you specify different Amazon S3 locations for training and tuning data, the ARN you use must have permissions to access both locations.
value:
S3Uri: "{{ S3Uri }}"
TuningDataS3Uri: "{{ TuningDataS3Uri }}"
DataAccessRoleArn: "{{ DataAccessRoleArn }}"
- name: Tags
description: |
Adds one or more custom tags, each in the form of a key:value pair, to a new custom language model at the time you create this new model. To learn more about using tags with Amazon Transcribe, refer to Tagging resources.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
DELETE examples
- delete_language_model
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
;