Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data CreateVocabulary = CreateVocabulary' {
- phrases :: Maybe [Text]
- tags :: Maybe (NonEmpty Tag)
- vocabularyFileUri :: Maybe Text
- vocabularyName :: Text
- languageCode :: LanguageCode
- newCreateVocabulary :: Text -> LanguageCode -> CreateVocabulary
- createVocabulary_phrases :: Lens' CreateVocabulary (Maybe [Text])
- createVocabulary_tags :: Lens' CreateVocabulary (Maybe (NonEmpty Tag))
- createVocabulary_vocabularyFileUri :: Lens' CreateVocabulary (Maybe Text)
- createVocabulary_vocabularyName :: Lens' CreateVocabulary Text
- createVocabulary_languageCode :: Lens' CreateVocabulary LanguageCode
- data CreateVocabularyResponse = CreateVocabularyResponse' {}
- newCreateVocabularyResponse :: Int -> CreateVocabularyResponse
- createVocabularyResponse_failureReason :: Lens' CreateVocabularyResponse (Maybe Text)
- createVocabularyResponse_languageCode :: Lens' CreateVocabularyResponse (Maybe LanguageCode)
- createVocabularyResponse_lastModifiedTime :: Lens' CreateVocabularyResponse (Maybe UTCTime)
- createVocabularyResponse_vocabularyName :: Lens' CreateVocabularyResponse (Maybe Text)
- createVocabularyResponse_vocabularyState :: Lens' CreateVocabularyResponse (Maybe VocabularyState)
- createVocabularyResponse_httpStatus :: Lens' CreateVocabularyResponse Int
Creating a Request
data CreateVocabulary Source #
See: newCreateVocabulary
smart constructor.
CreateVocabulary' | |
|
Instances
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.
CreateVocabularyResponse' | |
|
Instances
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.
createVocabularyResponse_httpStatus :: Lens' CreateVocabularyResponse Int Source #
The response's http status code.