Interface TranscribeAudioRequest.Builder

  • Method Details

    • media

      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.

      Parameters:
      media - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • media

      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.

      This is a convenience method that creates an instance of the SyncMedia.Builder avoiding the need to create one manually via SyncMedia.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to media(SyncMedia).

      Parameters:
      media - a consumer that will call methods on SyncMedia.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • language

      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.

      Parameters:
      language - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • language

      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.

      Parameters:
      language - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • languageDetectionMode

      TranscribeAudioRequest.Builder languageDetectionMode(String 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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • languageDetectionMode

      TranscribeAudioRequest.Builder languageDetectionMode(LanguageDetectionMode 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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • languageOptionsWithStrings

      TranscribeAudioRequest.Builder languageOptionsWithStrings(Collection<String> languageOptions)

      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.

      Parameters:
      languageOptions - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • languageOptionsWithStrings

      TranscribeAudioRequest.Builder languageOptionsWithStrings(String... languageOptions)

      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.

      Parameters:
      languageOptions - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • languageOptions

      TranscribeAudioRequest.Builder languageOptions(Collection<SyncLanguage> languageOptions)

      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.

      Parameters:
      languageOptions - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • languageOptions

      TranscribeAudioRequest.Builder languageOptions(SyncLanguage... languageOptions)

      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.

      Parameters:
      languageOptions - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • channelIdentification

      TranscribeAudioRequest.Builder channelIdentification(Boolean channelIdentification)

      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.

      Parameters:
      channelIdentification - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • showSpeakerLabels

      TranscribeAudioRequest.Builder showSpeakerLabels(Boolean showSpeakerLabels)

      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).

      Parameters:
      showSpeakerLabels - 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).

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • maxSpeakerLabels

      TranscribeAudioRequest.Builder maxSpeakerLabels(Integer maxSpeakerLabels)

      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.

      Parameters:
      maxSpeakerLabels - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • vocabularySettings

      TranscribeAudioRequest.Builder vocabularySettings(Collection<VocabularySettingsEntry> vocabularySettings)

      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.

      Parameters:
      vocabularySettings - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • vocabularySettings

      TranscribeAudioRequest.Builder vocabularySettings(VocabularySettingsEntry... vocabularySettings)

      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.

      Parameters:
      vocabularySettings - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • vocabularySettings

      TranscribeAudioRequest.Builder vocabularySettings(Consumer<VocabularySettingsEntry.Builder>... vocabularySettings)

      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.

      This is a convenience method that creates an instance of the VocabularySettingsEntry.Builder avoiding the need to create one manually via VocabularySettingsEntry.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to vocabularySettings(List<VocabularySettingsEntry>).

      Parameters:
      vocabularySettings - a consumer that will call methods on VocabularySettingsEntry.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • vocabularyFilterSettings

      TranscribeAudioRequest.Builder vocabularyFilterSettings(VocabularyFilterSettings vocabularyFilterSettings)

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

      Parameters:
      vocabularyFilterSettings - Custom vocabulary filters to apply to your transcript, and how to apply them.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • vocabularyFilterSettings

      default TranscribeAudioRequest.Builder vocabularyFilterSettings(Consumer<VocabularyFilterSettings.Builder> vocabularyFilterSettings)

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

      This is a convenience method that creates an instance of the VocabularyFilterSettings.Builder avoiding the need to create one manually via VocabularyFilterSettings.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to vocabularyFilterSettings(VocabularyFilterSettings).

      Parameters:
      vocabularyFilterSettings - a consumer that will call methods on VocabularyFilterSettings.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • contentRedaction

      TranscribeAudioRequest.Builder contentRedaction(ContentRedaction 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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • contentRedaction

      default TranscribeAudioRequest.Builder contentRedaction(Consumer<ContentRedaction.Builder> 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.

      This is a convenience method that creates an instance of the ContentRedaction.Builder avoiding the need to create one manually via ContentRedaction.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to contentRedaction(ContentRedaction).

      Parameters:
      contentRedaction - a consumer that will call methods on ContentRedaction.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • outputConfiguration

      TranscribeAudioRequest.Builder outputConfiguration(SyncOutputConfiguration outputConfiguration)

      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.

      Parameters:
      outputConfiguration - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • outputConfiguration

      default TranscribeAudioRequest.Builder outputConfiguration(Consumer<SyncOutputConfiguration.Builder> outputConfiguration)

      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.

      This is a convenience method that creates an instance of the SyncOutputConfiguration.Builder avoiding the need to create one manually via SyncOutputConfiguration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to outputConfiguration(SyncOutputConfiguration).

      Parameters:
      outputConfiguration - a consumer that will call methods on SyncOutputConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • overrideConfiguration

      TranscribeAudioRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.