amazonka-transcribe-2.0: Amazon Transcribe Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Transcribe.CreateVocabulary

Description

Creates a new custom vocabulary.

When creating a new custom vocabulary, you can either upload a text file that contains your new entries, phrases, and terms into an Amazon S3 bucket and include the URI in your request. Or you can include a list of terms directly in your request using the Phrases flag.

Each language has a character set that contains all allowed characters for that specific language. If you use unsupported characters, your custom vocabulary request fails. Refer to Character Sets for Custom Vocabularies to get the character set for your language.

For more information, see Custom vocabularies.

Synopsis

Creating a Request

data CreateVocabulary Source #

See: newCreateVocabulary smart constructor.

Constructors

CreateVocabulary' 

Fields

  • phrases :: Maybe [Text]

    Use this parameter if you want to create your custom vocabulary by including all desired terms, as comma-separated values, within your request. The other option for creating your custom vocabulary is to save your entries in a text file and upload them to an Amazon S3 bucket, then specify the location of your file using the VocabularyFileUri parameter.

    Note that if you include Phrases in your request, you cannot use VocabularyFileUri; you must choose one or the other.

    Each language has a character set that contains all allowed characters for that specific language. If you use unsupported characters, your custom vocabulary filter request fails. Refer to Character Sets for Custom Vocabularies to get the character set for your language.

  • tags :: Maybe (NonEmpty Tag)

    Adds one or more custom tags, each in the form of a key:value pair, to a new custom vocabulary at the time you create this new custom vocabulary.

    To learn more about using tags with Amazon Transcribe, refer to Tagging resources.

  • vocabularyFileUri :: Maybe Text

    The Amazon S3 location of the text file that contains your custom vocabulary. The URI must be located in the same Amazon Web Services Region as the resource you're calling.

    Here's an example URI path: s3://DOC-EXAMPLE-BUCKET/my-vocab-file.txt

    Note that if you include VocabularyFileUri in your request, you cannot use the Phrases flag; you must choose one or the other.

  • vocabularyName :: Text

    A unique name, chosen by you, for your new custom vocabulary.

    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 vocabulary with the same name as an existing custom vocabulary, you get a ConflictException error.

  • languageCode :: LanguageCode

    The language code that represents the language of the entries in your custom vocabulary. Each custom vocabulary must contain terms in only one language.

    A custom vocabulary can only be used to transcribe files in the same language as the custom vocabulary. For example, if you create a custom vocabulary using US English (en-US), you can only apply this custom vocabulary to files that contain English audio.

    For a list of supported languages and their associated language codes, refer to the Supported languages table.

Instances

Instances details
ToJSON CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

ToHeaders CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

ToPath CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

ToQuery CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

AWSRequest CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

Associated Types

type AWSResponse CreateVocabulary #

Generic CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

Associated Types

type Rep CreateVocabulary :: Type -> Type #

Read CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

Show CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

NFData CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

Methods

rnf :: CreateVocabulary -> () #

Eq CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

Hashable CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

type AWSResponse CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

type Rep CreateVocabulary Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

type Rep CreateVocabulary = D1 ('MetaData "CreateVocabulary" "Amazonka.Transcribe.CreateVocabulary" "amazonka-transcribe-2.0-4BjJqzwmm0K94bsEMe1tnF" 'False) (C1 ('MetaCons "CreateVocabulary'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "phrases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty Tag)))) :*: (S1 ('MetaSel ('Just "vocabularyFileUri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "vocabularyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "languageCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LanguageCode)))))

newCreateVocabulary Source #

Create a value of CreateVocabulary with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:phrases:CreateVocabulary', createVocabulary_phrases - Use this parameter if you want to create your custom vocabulary by including all desired terms, as comma-separated values, within your request. The other option for creating your custom vocabulary is to save your entries in a text file and upload them to an Amazon S3 bucket, then specify the location of your file using the VocabularyFileUri parameter.

Note that if you include Phrases in your request, you cannot use VocabularyFileUri; you must choose one or the other.

Each language has a character set that contains all allowed characters for that specific language. If you use unsupported characters, your custom vocabulary filter request fails. Refer to Character Sets for Custom Vocabularies to get the character set for your language.

CreateVocabulary, createVocabulary_tags - Adds one or more custom tags, each in the form of a key:value pair, to a new custom vocabulary at the time you create this new custom vocabulary.

To learn more about using tags with Amazon Transcribe, refer to Tagging resources.

$sel:vocabularyFileUri:CreateVocabulary', createVocabulary_vocabularyFileUri - The Amazon S3 location of the text file that contains your custom vocabulary. The URI must be located in the same Amazon Web Services Region as the resource you're calling.

Here's an example URI path: s3://DOC-EXAMPLE-BUCKET/my-vocab-file.txt

Note that if you include VocabularyFileUri in your request, you cannot use the Phrases flag; you must choose one or the other.

CreateVocabulary, createVocabulary_vocabularyName - A unique name, chosen by you, for your new custom vocabulary.

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 vocabulary with the same name as an existing custom vocabulary, you get a ConflictException error.

CreateVocabulary, createVocabulary_languageCode - The language code that represents the language of the entries in your custom vocabulary. Each custom vocabulary must contain terms in only one language.

A custom vocabulary can only be used to transcribe files in the same language as the custom vocabulary. For example, if you create a custom vocabulary using US English (en-US), you can only apply this custom vocabulary to files that contain English audio.

For a list of supported languages and their associated language codes, refer to the Supported languages table.

Request Lenses

createVocabulary_phrases :: Lens' CreateVocabulary (Maybe [Text]) Source #

Use this parameter if you want to create your custom vocabulary by including all desired terms, as comma-separated values, within your request. The other option for creating your custom vocabulary is to save your entries in a text file and upload them to an Amazon S3 bucket, then specify the location of your file using the VocabularyFileUri parameter.

Note that if you include Phrases in your request, you cannot use VocabularyFileUri; you must choose one or the other.

Each language has a character set that contains all allowed characters for that specific language. If you use unsupported characters, your custom vocabulary filter request fails. Refer to Character Sets for Custom Vocabularies to get the character set for your language.

createVocabulary_tags :: Lens' CreateVocabulary (Maybe (NonEmpty Tag)) Source #

Adds one or more custom tags, each in the form of a key:value pair, to a new custom vocabulary at the time you create this new custom vocabulary.

To learn more about using tags with Amazon Transcribe, refer to Tagging resources.

createVocabulary_vocabularyFileUri :: Lens' CreateVocabulary (Maybe Text) Source #

The Amazon S3 location of the text file that contains your custom vocabulary. The URI must be located in the same Amazon Web Services Region as the resource you're calling.

Here's an example URI path: s3://DOC-EXAMPLE-BUCKET/my-vocab-file.txt

Note that if you include VocabularyFileUri in your request, you cannot use the Phrases flag; you must choose one or the other.

createVocabulary_vocabularyName :: Lens' CreateVocabulary Text Source #

A unique name, chosen by you, for your new custom vocabulary.

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 vocabulary with the same name as an existing custom vocabulary, you get a ConflictException error.

createVocabulary_languageCode :: Lens' CreateVocabulary LanguageCode Source #

The language code that represents the language of the entries in your custom vocabulary. Each custom vocabulary must contain terms in only one language.

A custom vocabulary can only be used to transcribe files in the same language as the custom vocabulary. For example, if you create a custom vocabulary using US English (en-US), you can only apply this custom vocabulary to files that contain English audio.

For a list of supported languages and their associated language codes, refer to the Supported languages table.

Destructuring the Response

data CreateVocabularyResponse Source #

See: newCreateVocabularyResponse smart constructor.

Constructors

CreateVocabularyResponse' 

Fields

Instances

Instances details
Generic CreateVocabularyResponse Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

Associated Types

type Rep CreateVocabularyResponse :: Type -> Type #

Read CreateVocabularyResponse Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

Show CreateVocabularyResponse Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

NFData CreateVocabularyResponse Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

Eq CreateVocabularyResponse Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

type Rep CreateVocabularyResponse Source # 
Instance details

Defined in Amazonka.Transcribe.CreateVocabulary

type Rep CreateVocabularyResponse = D1 ('MetaData "CreateVocabularyResponse" "Amazonka.Transcribe.CreateVocabulary" "amazonka-transcribe-2.0-4BjJqzwmm0K94bsEMe1tnF" 'False) (C1 ('MetaCons "CreateVocabularyResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "failureReason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "languageCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LanguageCode)) :*: S1 ('MetaSel ('Just "lastModifiedTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)))) :*: (S1 ('MetaSel ('Just "vocabularyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "vocabularyState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe VocabularyState)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

newCreateVocabularyResponse Source #

Create a value of CreateVocabularyResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CreateVocabularyResponse, createVocabularyResponse_failureReason - If VocabularyState is FAILED, FailureReason contains information about why the custom vocabulary request failed. See also: Common Errors.

CreateVocabulary, createVocabularyResponse_languageCode - The language code you selected for your custom vocabulary.

CreateVocabularyResponse, createVocabularyResponse_lastModifiedTime - The date and time you created your custom vocabulary.

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.

CreateVocabulary, createVocabularyResponse_vocabularyName - The name you chose for your custom vocabulary.

CreateVocabularyResponse, createVocabularyResponse_vocabularyState - The processing state of your custom vocabulary. If the state is READY, you can use the custom vocabulary in a StartTranscriptionJob request.

$sel:httpStatus:CreateVocabularyResponse', createVocabularyResponse_httpStatus - The response's http status code.

Response Lenses

createVocabularyResponse_failureReason :: Lens' CreateVocabularyResponse (Maybe Text) Source #

If VocabularyState is FAILED, FailureReason contains information about why the custom vocabulary request failed. See also: Common Errors.

createVocabularyResponse_languageCode :: Lens' CreateVocabularyResponse (Maybe LanguageCode) Source #

The language code you selected for your custom vocabulary.

createVocabularyResponse_lastModifiedTime :: Lens' CreateVocabularyResponse (Maybe UTCTime) Source #

The date and time you created your custom vocabulary.

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.

createVocabularyResponse_vocabularyName :: Lens' CreateVocabularyResponse (Maybe Text) Source #

The name you chose for your custom vocabulary.

createVocabularyResponse_vocabularyState :: Lens' CreateVocabularyResponse (Maybe VocabularyState) Source #

The processing state of your custom vocabulary. If the state is READY, you can use the custom vocabulary in a StartTranscriptionJob request.