Skip to content

TranscribeAudioRequest

Source code in docs_src/capo_transcribe/types/transcribe_audio_request.py
class TranscribeAudioRequest(TypedDict, closed=True):
    media: "capo_transcribe.types.sync_media.SyncMedia"
    """<p>The audio to transcribe. Specify exactly one of <code>MediaBytes</code> or <code>MediaFileUri</code>.</p> <p>Audio sent in the request (<code>MediaBytes</code>) can be up to 25 MB. Audio in Amazon S3 (<code>MediaFileUri</code>) can be up to 500 MB.</p>"""
    language: NotRequired["capo_transcribe.types.sync_language.SyncLanguage"]
    """<p>The language spoken in your audio, as a base language code (for example, <code>en</code> or <code>es</code>).</p> <p>Include either <code>Language</code> or <code>LanguageDetectionMode</code> in your request, but not both.</p>"""
    language_detection_mode: NotRequired[
        "capo_transcribe.types.language_detection_mode.LanguageDetectionMode"
    ]
    """<p>Enables automatic language identification. Use <code>IDENTIFY_LANGUAGE</code> if your audio contains a single language that you don't know in advance.</p> <p>You can optionally include <code>LanguageOptions</code> to limit identification to languages you think may be present, which can improve accuracy.</p> <p>Amazon Transcribe returns the identified language, as a locale (for example, <code>en-US</code>), in the response metadata.</p> <p>Include either <code>Language</code> or <code>LanguageDetectionMode</code> in your request, but not both.</p>"""
    language_options: NotRequired[
        "capo_transcribe.types.sync_language_options.SyncLanguageOptions"
    ]
    """<p>A list of two or more languages that you think may be present in your audio, as base language codes (for example, <code>en</code> and <code>es</code>). Each language can appear only once. A list with only one language returns a <code>BadRequestException</code>.</p> <p>You can use <code>LanguageOptions</code> only with <code>LanguageDetectionMode</code>.</p>"""
    channel_identification: NotRequired["capo_transcribe.types.boolean.Boolean"]
    """<p>Enables channel identification in multi-channel audio. Each channel is transcribed independently, and each item in the transcript is labeled with its channel.</p> <p>Channel identification supports up to two channels.</p>"""
    show_speaker_labels: NotRequired["capo_transcribe.types.boolean.Boolean"]
    """<p>Enables speaker partitioning (diarization) in your transcript. Speaker partitioning labels the speech from individual speakers in your media file.</p> <p>If you set <code>ShowSpeakerLabels</code> to <code>true</code>, you must also include <code>MaxSpeakerLabels</code>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/diarization.html">Partitioning speakers (diarization)</a>.</p>"""
    max_speaker_labels: NotRequired["capo_transcribe.types.max_speakers.MaxSpeakers"]
    """<p>Specify the maximum number of speakers you want to partition in your media.</p> <p>Note that if your media contains more speakers than the specified number, Amazon Transcribe treats multiple speakers as a single speaker.</p> <p>You can set <code>MaxSpeakerLabels</code> only if <code>ShowSpeakerLabels</code> is <code>true</code>.</p>"""
    vocabulary_settings: NotRequired[
        "capo_transcribe.types.vocabulary_settings_list.VocabularySettingsList"
    ]
    """<p>Custom vocabularies to apply to your transcript, with one entry per language. In each entry, you can reference a custom vocabulary you created or provide phrases inline. All entries must use the same type, either all by name or all inline.</p> <p>If you specify <code>Language</code>, include exactly one entry, and its <code>Language</code> must match. If you use <code>LanguageDetectionMode</code>, you can include one entry for each language in <code>LanguageOptions</code>.</p>"""
    vocabulary_filter_settings: NotRequired[
        "capo_transcribe.types.vocabulary_filter_settings.VocabularyFilterSettings"
    ]
    """<p>Custom vocabulary filters to apply to your transcript, and how to apply them.</p>"""
    content_redaction: NotRequired[
        "capo_transcribe.types.content_redaction.ContentRedaction"
    ]
    """<p>Redacts personally identifiable information (PII) from your transcript. Amazon Transcribe returns the redacted transcript in <code>RedactedResults</code>.</p> <p>If you set <code>RedactionOutput</code> to <code>redacted_and_unredacted</code>, Amazon Transcribe also returns the unredacted transcript in <code>Results</code>.</p> <p>In Sync, content redaction has these limits:</p> <ul> <li> <p> <b>Languages:</b> English (<code>en</code>), Spanish (<code>es</code>), French (<code>fr</code>), Italian (<code>it</code>), German (<code>de</code>), and Portuguese (<code>pt</code>).</p> </li> <li> <p> <b>Language identification:</b> If you use <code>LanguageDetectionMode</code>, you must also include <code>LanguageOptions</code>, and every language in it must be one of the languages above. A request that has no <code>LanguageOptions</code>, or that lists a language that isn't supported, returns a <code>BadRequestException</code>.</p> </li> <li> <p> <b>Regions:</b> Content redaction isn't available in the South America (São Paulo) Region (<code>sa-east-1</code>). It's available in the other Amazon Web Services Regions where Sync is available.</p> </li> </ul>"""
    output_configuration: NotRequired[
        "capo_transcribe.types.sync_output_configuration.SyncOutputConfiguration"
    ]
    """<p>Writes the transcript to an Amazon S3 location instead of returning it in the response. If you include <code>OutputConfiguration</code>, the response contains only the output location.</p> <p>You must have write permission for the location you specify.</p>"""

channel_identification instance-attribute

channel_identification: NotRequired[Boolean]

Enables channel identification in multi-channel audio. Each channel is transcribed independently, and each item in the transcript is labeled with its channel.

Channel identification supports up to two channels.

content_redaction instance-attribute

content_redaction: NotRequired[ContentRedaction]

Redacts personally identifiable information (PII) from your transcript. Amazon Transcribe returns the redacted transcript in RedactedResults.

If you set RedactionOutput to redacted_and_unredacted, Amazon Transcribe also returns the unredacted transcript in Results.

In Sync, content redaction has these limits:

  • Languages: English (en), Spanish (es), French (fr), Italian (it), German (de), and Portuguese (pt).

  • Language identification: If you use LanguageDetectionMode, you must also include LanguageOptions, and every language in it must be one of the languages above. A request that has no LanguageOptions, or that lists a language that isn't supported, returns a BadRequestException.

  • Regions: Content redaction isn't available in the South America (São Paulo) Region (sa-east-1). It's available in the other Amazon Web Services Regions where Sync is available.

language instance-attribute

language: NotRequired[SyncLanguage]

The language spoken in your audio, as a base language code (for example, en or es).

Include either Language or LanguageDetectionMode in your request, but not both.

language_detection_mode instance-attribute

language_detection_mode: NotRequired[LanguageDetectionMode]

Enables automatic language identification. Use IDENTIFY_LANGUAGE if your audio contains a single language that you don't know in advance.

You can optionally include LanguageOptions to limit identification to languages you think may be present, which can improve accuracy.

Amazon Transcribe returns the identified language, as a locale (for example, en-US), in the response metadata.

Include either Language or LanguageDetectionMode in your request, but not both.

language_options instance-attribute

language_options: NotRequired[SyncLanguageOptions]

A list of two or more languages that you think may be present in your audio, as base language codes (for example, en and es). Each language can appear only once. A list with only one language returns a BadRequestException.

You can use LanguageOptions only with LanguageDetectionMode.

max_speaker_labels instance-attribute

max_speaker_labels: NotRequired[MaxSpeakers]

Specify the maximum number of speakers you want to partition in your media.

Note that if your media contains more speakers than the specified number, Amazon Transcribe treats multiple speakers as a single speaker.

You can set MaxSpeakerLabels only if ShowSpeakerLabels is true.

media instance-attribute

media: SyncMedia

The audio to transcribe. Specify exactly one of MediaBytes or MediaFileUri.

Audio sent in the request (MediaBytes) can be up to 25 MB. Audio in Amazon S3 (MediaFileUri) can be up to 500 MB.

output_configuration instance-attribute

output_configuration: NotRequired[SyncOutputConfiguration]

Writes the transcript to an Amazon S3 location instead of returning it in the response. If you include OutputConfiguration, the response contains only the output location.

You must have write permission for the location you specify.

show_speaker_labels instance-attribute

show_speaker_labels: NotRequired[Boolean]

Enables speaker partitioning (diarization) in your transcript. Speaker partitioning labels the speech from individual speakers in your media file.

If you set ShowSpeakerLabels to true, you must also include MaxSpeakerLabels.

For more information, see Partitioning speakers (diarization).

vocabulary_filter_settings instance-attribute

vocabulary_filter_settings: NotRequired[VocabularyFilterSettings]

Custom vocabulary filters to apply to your transcript, and how to apply them.

vocabulary_settings instance-attribute

vocabulary_settings: NotRequired[VocabularySettingsList]

Custom vocabularies to apply to your transcript, with one entry per language. In each entry, you can reference a custom vocabulary you created or provide phrases inline. All entries must use the same type, either all by name or all inline.

If you specify Language, include exactly one entry, and its Language must match. If you use LanguageDetectionMode, you can include one entry for each language in LanguageOptions.