vocabulary_filters
Creates, updates, deletes, gets or lists a vocabulary_filters resource.
Overview
| Name | vocabulary_filters |
| Type | Resource |
| Id | aws.transcribe.vocabulary_filters |
Fields
The following fields are returned by SELECT queries:
- get_vocabulary_filter
- list_vocabulary_filters
| Name | Datatype | Description |
|---|---|---|
download_uri | string | The Amazon S3 location where the custom vocabulary filter is stored; use this URI to view or download the custom vocabulary filter. (pattern: <code>(s3://|http(s*)://).+</code>) |
language_code | string | The language code you selected for your custom vocabulary filter. (af-ZA, ar-AE, ar-SA, am-ET, cy-GB, da-DK, de-CH, de-DE, en-AB, en-AU, en-GB, en-IE, en-IN, en-US, en-WL, es-ES, es-MX, es-US, fa-AF, fa-IR, fr-CA, fr-FR, ga-IE, gd-GB, he-IL, hi-IN, ht-HT, id-ID, it-IT, ja-JP, jv-ID, km-KH, ko-KR, my-MM, ms-MY, nl-NL, pt-BR, pt-PT, ru-RU, ta-IN, te-IN, tr-TR, zh-CN, zh-TW, th-TH, en-ZA, en-NZ, vi-VN, sv-SE, ab-GE, ast-ES, az-AZ, ba-RU, be-BY, bg-BG, bn-IN, bs-BA, ca-ES, ckb-IQ, ckb-IR, cs-CZ, cy-WL, el-GR, et-EE, et-ET, eu-ES, fi-FI, gl-ES, gu-IN, ha-NG, hr-HR, hu-HU, hy-AM, is-IS, ka-GE, kab-DZ, kk-KZ, kn-IN, ky-KG, lg-IN, lt-LT, lv-LV, mhr-RU, mi-NZ, mk-MK, ml-IN, mn-MN, mr-IN, mt-MT, no-NO, ne-NP, or-IN, pa-IN, pl-PL, ps-AF, ro-RO, rw-RW, si-LK, sk-SK, sl-SI, so-SO, sq-AL, sr-RS, su-ID, sw-BI, sw-KE, sw-RW, sw-TZ, sw-UG, tl-PH, tt-RU, ug-CN, uk-UA, uz-UZ, wo-SN, zh-HK, zu-ZA) |
last_modified_time | string (date-time) | The date and time the specified custom vocabulary filter 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. |
vocabulary_filter_name | string | The name of the custom vocabulary filter you requested information about. (pattern: <code>^[0-9a-zA-Z._-]+</code>) |
| Name | Datatype | Description |
|---|---|---|
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>) |
vocabulary_filters | array | Provides information about the custom vocabulary filters that match the criteria specified in your request. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_vocabulary_filter | select | region | Provides information about the specified custom vocabulary filter. To get a list of your custom vocabulary filters, use the operation. | |
list_vocabulary_filters | select | region | Provides a list of custom vocabulary filters that match the specified criteria. If no criteria are specified, all custom vocabularies are returned. To get detailed information about a specific custom vocabulary filter, use the operation. | |
create_vocabulary_filter | insert | region, VocabularyFilterName, LanguageCode | Creates a new custom vocabulary filter. You can use custom vocabulary filters to mask, delete, or flag specific words from your transcript. Custom vocabulary filters are commonly used to mask profanity in transcripts. 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. For more information, see Vocabulary filtering. | |
update_vocabulary_filter | update | region, VocabularyFilterName | Updates an existing custom vocabulary filter with a new list of words. The new list you provide overwrites all previous entries; you cannot append new terms onto an existing custom vocabulary filter. | |
delete_vocabulary_filter | delete | region | Deletes a custom vocabulary filter. To use this operation, specify the name of the custom vocabulary filter you want to delete using VocabularyFilterName. Custom vocabulary filter 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
- get_vocabulary_filter
- list_vocabulary_filters
Provides information about the specified custom vocabulary filter. To get a list of your custom vocabulary filters, use the operation.
SELECT
download_uri,
language_code,
last_modified_time,
vocabulary_filter_name
FROM aws.transcribe.vocabulary_filters
WHERE region = '{{ region }}' -- required
;
Provides a list of custom vocabulary filters that match the specified criteria. If no criteria are specified, all custom vocabularies are returned. To get detailed information about a specific custom vocabulary filter, use the operation.
SELECT
next_token,
vocabulary_filters
FROM aws.transcribe.vocabulary_filters
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_vocabulary_filter
- Manifest
Creates a new custom vocabulary filter. You can use custom vocabulary filters to mask, delete, or flag specific words from your transcript. Custom vocabulary filters are commonly used to mask profanity in transcripts. 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. For more information, see Vocabulary filtering.
INSERT INTO aws.transcribe.vocabulary_filters (
VocabularyFilterName,
LanguageCode,
Words,
VocabularyFilterFileUri,
Tags,
DataAccessRoleArn,
region
)
SELECT
'{{ VocabularyFilterName }}' /* required */,
'{{ LanguageCode }}' /* required */,
'{{ Words }}',
'{{ VocabularyFilterFileUri }}',
'{{ Tags }}',
'{{ DataAccessRoleArn }}',
'{{ region }}'
RETURNING
language_code,
last_modified_time,
vocabulary_filter_name
;
# Description fields are for documentation purposes
- name: vocabulary_filters
props:
- name: region
value: "{{ region }}"
description: Required parameter for the vocabulary_filters resource.
- name: VocabularyFilterName
value: "{{ VocabularyFilterName }}"
description: |
A unique name, chosen by you, for your new custom vocabulary filter. 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 filter with the same name as an existing custom vocabulary filter, you get a ConflictException error.
- name: LanguageCode
value: "{{ LanguageCode }}"
description: |
The language code that represents the language of the entries in your vocabulary filter. Each custom vocabulary filter must contain terms in only one language. A custom vocabulary filter can only be used to transcribe files in the same language as the filter. For example, if you create a custom vocabulary filter using US English (en-US), you can only apply this filter to files that contain English audio. For a list of supported languages and their associated language codes, refer to the Supported languages table.
valid_values: ['af-ZA', 'ar-AE', 'ar-SA', 'am-ET', 'cy-GB', 'da-DK', 'de-CH', 'de-DE', 'en-AB', 'en-AU', 'en-GB', 'en-IE', 'en-IN', 'en-US', 'en-WL', 'es-ES', 'es-MX', 'es-US', 'fa-AF', 'fa-IR', 'fr-CA', 'fr-FR', 'ga-IE', 'gd-GB', 'he-IL', 'hi-IN', 'ht-HT', 'id-ID', 'it-IT', 'ja-JP', 'jv-ID', 'km-KH', 'ko-KR', 'my-MM', 'ms-MY', 'nl-NL', 'pt-BR', 'pt-PT', 'ru-RU', 'ta-IN', 'te-IN', 'tr-TR', 'zh-CN', 'zh-TW', 'th-TH', 'en-ZA', 'en-NZ', 'vi-VN', 'sv-SE', 'ab-GE', 'ast-ES', 'az-AZ', 'ba-RU', 'be-BY', 'bg-BG', 'bn-IN', 'bs-BA', 'ca-ES', 'ckb-IQ', 'ckb-IR', 'cs-CZ', 'cy-WL', 'el-GR', 'et-EE', 'et-ET', 'eu-ES', 'fi-FI', 'gl-ES', 'gu-IN', 'ha-NG', 'hr-HR', 'hu-HU', 'hy-AM', 'is-IS', 'ka-GE', 'kab-DZ', 'kk-KZ', 'kn-IN', 'ky-KG', 'lg-IN', 'lt-LT', 'lv-LV', 'mhr-RU', 'mi-NZ', 'mk-MK', 'ml-IN', 'mn-MN', 'mr-IN', 'mt-MT', 'no-NO', 'ne-NP', 'or-IN', 'pa-IN', 'pl-PL', 'ps-AF', 'ro-RO', 'rw-RW', 'si-LK', 'sk-SK', 'sl-SI', 'so-SO', 'sq-AL', 'sr-RS', 'su-ID', 'sw-BI', 'sw-KE', 'sw-RW', 'sw-TZ', 'sw-UG', 'tl-PH', 'tt-RU', 'ug-CN', 'uk-UA', 'uz-UZ', 'wo-SN', 'zh-HK', 'zu-ZA']
- name: Words
value:
- "{{ Words }}"
description: |
Use this parameter if you want to create your custom vocabulary filter by including all desired terms, as comma-separated values, within your request. The other option for creating your vocabulary filter 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 VocabularyFilterFileUri parameter. Note that if you include Words in your request, you cannot use VocabularyFilterFileUri; 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.
- name: VocabularyFilterFileUri
value: "{{ VocabularyFilterFileUri }}"
description: |
The Amazon S3 location of the text file that contains your custom vocabulary filter terms. 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-filter-file.txt Note that if you include VocabularyFilterFileUri in your request, you cannot use Words; you must choose one or the other.
- name: Tags
description: |
Adds one or more custom tags, each in the form of a key:value pair, to a new custom vocabulary filter at the time you create this new vocabulary filter. To learn more about using tags with Amazon Transcribe, refer to Tagging resources.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: DataAccessRoleArn
value: "{{ DataAccessRoleArn }}"
description: |
The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that contains your input files (in this case, your custom vocabulary filter). If the role that you specify doesn’t have the appropriate permissions to access the specified Amazon S3 location, your request fails. IAM role ARNs have the format arn:partition:iam::account:role/role-name-with-path. For example: arn:aws:iam::111122223333:role/Admin. For more information, see IAM ARNs.
UPDATE examples
- update_vocabulary_filter
Updates an existing custom vocabulary filter with a new list of words. The new list you provide overwrites all previous entries; you cannot append new terms onto an existing custom vocabulary filter.
UPDATE aws.transcribe.vocabulary_filters
SET
VocabularyFilterName = '{{ VocabularyFilterName }}',
Words = '{{ Words }}',
VocabularyFilterFileUri = '{{ VocabularyFilterFileUri }}',
DataAccessRoleArn = '{{ DataAccessRoleArn }}'
WHERE
region = '{{ region }}' --required
AND VocabularyFilterName = '{{ VocabularyFilterName }}' --required
RETURNING
language_code,
last_modified_time,
vocabulary_filter_name;
DELETE examples
- delete_vocabulary_filter
Deletes a custom vocabulary filter. To use this operation, specify the name of the custom vocabulary filter you want to delete using VocabularyFilterName. Custom vocabulary filter names are case sensitive.
DELETE FROM aws.transcribe.vocabulary_filters
WHERE region = '{{ region }}' --required
;