CreateLanguageModel - Amazon Transcribe

CreateLanguageModel

Creates a new custom language model. Use Amazon S3 prefixes to provide the location of your input files. The time it takes to create your model depends on the size of your training data.

Request Syntax

{ "BaseModelName": "string", "InputDataConfig": { "DataAccessRoleArn": "string", "S3Uri": "string", "TuningDataS3Uri": "string" }, "LanguageCode": "string", "ModelName": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

BaseModelName

The Amazon Transcribe standard language model, or base model used to create your custom language model.

If you want to use your custom language model to transcribe audio with a sample rate of 16 kHz or greater, choose Wideband.

If you want to use your custom language model to transcribe audio with a sample rate that is less than 16 kHz, choose Narrowband.

Type: String

Valid Values: NarrowBand | WideBand

Required: Yes

InputDataConfig

Contains the data access role and the Amazon S3 prefixes to read the required input files to create a custom language model.

Type: InputDataConfig object

Required: Yes

LanguageCode

The language of the input text you're using to train your custom language model.

Type: String

Valid Values: en-US

Required: Yes

ModelName

The name you choose for your custom language model when you create it.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 200.

Pattern: ^[0-9a-zA-Z._-]+

Required: Yes

Response Syntax

{ "BaseModelName": "string", "InputDataConfig": { "DataAccessRoleArn": "string", "S3Uri": "string", "TuningDataS3Uri": "string" }, "LanguageCode": "string", "ModelName": "string", "ModelStatus": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

BaseModelName

The Amazon Transcribe standard language model, or base model you've used to create a custom language model.

Type: String

Valid Values: NarrowBand | WideBand

InputDataConfig

The data access role and Amazon S3 prefixes you've chosen to create your custom language model.

Type: InputDataConfig object

LanguageCode

The language code of the text you've used to create a custom language model.

Type: String

Valid Values: en-US

ModelName

The name you've chosen for your custom language model.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 200.

Pattern: ^[0-9a-zA-Z._-]+

ModelStatus

The status of the custom language model. When the status is COMPLETED the model is ready to use.

Type: String

Valid Values: IN_PROGRESS | FAILED | COMPLETED

Errors

For information about the errors that are common to all actions, see Common Errors.

BadRequestException

Your request didn't pass one or more validation tests. For example, if the entity that you're trying to delete doesn't exist or if it is in a non-terminal state (for example, it's "in progress"). See the exception Message field for more information.

HTTP Status Code: 400

ConflictException

There is already a resource with that name.

HTTP Status Code: 400

InternalFailureException

There was an internal error. Check the error message and try your request again.

HTTP Status Code: 500

LimitExceededException

Either you have sent too many requests or your input file is too long. Wait before you resend your request, or use a smaller file and resend the request.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: