Skip to content

CreateLanguageModel

Source: src/AWS/Transcribe/CreateLanguageModel.ts

Runtime binding for transcribe:CreateLanguageModel — kick off training of a custom language model from text data in S3 (training runs asynchronously and can take multiple hours; poll with DescribeLanguageModel).

The binding is constructed with the data-access role (the IAM role Amazon Transcribe assumes to read your S3 training data; its trust policy must allow transcribe.amazonaws.com). The role’s ARN is injected as InputDataConfig.DataAccessRoleArn on every runtime request and the host is granted iam:PassRole on it alongside transcribe:CreateLanguageModel (which has no resource-level IAM).

// init — bind the Transcribe data-access role
const createLanguageModel = yield* AWS.Transcribe.CreateLanguageModel(dataAccessRole);
// runtime
yield* createLanguageModel({
ModelName: "my-domain-model",
BaseModelName: "NarrowBand",
LanguageCode: "en-US",
InputDataConfig: { S3Uri: "s3://my-bucket/training-data/" },
});