1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`StartTranscriptionJob`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`transcription_job_name(impl Into<String>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::transcription_job_name) / [`set_transcription_job_name(Option<String>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_transcription_job_name):<br>required: **true**<br><p>A unique name, chosen by you, for your transcription job. The name that you specify is also used as the default name of your transcription output file. If you want to specify a different name for your transcription output, use the <code>OutputKey</code> parameter.</p> <p>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 job with the same name as an existing job, you get a <code>ConflictException</code> error.</p><br>
    ///   - [`language_code(LanguageCode)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::language_code) / [`set_language_code(Option<LanguageCode>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_language_code):<br>required: **false**<br><p>The language code that represents the language spoken in the input media file.</p> <p>If you're unsure of the language spoken in your media file, consider using <code>IdentifyLanguage</code> or <code>IdentifyMultipleLanguages</code> to enable automatic language identification.</p> <p>Note that you must include one of <code>LanguageCode</code>, <code>IdentifyLanguage</code>, or <code>IdentifyMultipleLanguages</code> in your request. If you include more than one of these parameters, your transcription job fails.</p> <p>For a list of supported languages and their associated language codes, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p><note>  <p>To transcribe speech in Modern Standard Arabic (<code>ar-SA</code>), your media file must be encoded at a sample rate of 16,000 Hz or higher.</p> </note><br>
    ///   - [`media_sample_rate_hertz(i32)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::media_sample_rate_hertz) / [`set_media_sample_rate_hertz(Option<i32>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_media_sample_rate_hertz):<br>required: **false**<br><p>The sample rate, in hertz, of the audio track in your input media file.</p> <p>If you do not specify the media sample rate, Amazon Transcribe determines it for you. If you specify the sample rate, it must match the rate detected by Amazon Transcribe. If there's a mismatch between the value that you specify and the value detected, your job fails. In most cases, you can omit <code>MediaSampleRateHertz</code> and let Amazon Transcribe determine the sample rate.</p><br>
    ///   - [`media_format(MediaFormat)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::media_format) / [`set_media_format(Option<MediaFormat>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_media_format):<br>required: **false**<br><p>Specify the format of your input media file.</p><br>
    ///   - [`media(Media)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::media) / [`set_media(Option<Media>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_media):<br>required: **true**<br><p>Describes the Amazon S3 location of the media file you want to use in your request.</p><br>
    ///   - [`output_bucket_name(impl Into<String>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::output_bucket_name) / [`set_output_bucket_name(Option<String>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_output_bucket_name):<br>required: **false**<br><p>The name of the Amazon S3 bucket where you want your transcription output stored. Do not include the <code>S3://</code> prefix of the specified bucket.</p> <p>If you want your output to go to a sub-folder of this bucket, specify it using the <code>OutputKey</code> parameter; <code>OutputBucketName</code> only accepts the name of a bucket.</p> <p>For example, if you want your output stored in <code>S3://DOC-EXAMPLE-BUCKET</code>, set <code>OutputBucketName</code> to <code>DOC-EXAMPLE-BUCKET</code>. However, if you want your output stored in <code>S3://DOC-EXAMPLE-BUCKET/test-files/</code>, set <code>OutputBucketName</code> to <code>DOC-EXAMPLE-BUCKET</code> and <code>OutputKey</code> to <code>test-files/</code>.</p> <p>Note that Amazon Transcribe must have permission to use the specified location. You can change Amazon S3 permissions using the <a href="https://console.aws.amazon.com/s3">Amazon Web Services Management Console</a>. See also <a href="https://docs.aws.amazon.com/transcribe/latest/dg/security_iam_id-based-policy-examples.html#auth-role-iam-user">Permissions Required for IAM User Roles</a>.</p> <p>If you do not specify <code>OutputBucketName</code>, your transcript is placed in a service-managed Amazon S3 bucket and you are provided with a URI to access your transcript.</p><br>
    ///   - [`output_key(impl Into<String>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::output_key) / [`set_output_key(Option<String>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_output_key):<br>required: **false**<br><p>Use in combination with <code>OutputBucketName</code> to specify the output location of your transcript and, optionally, a unique name for your output file. The default name for your transcription output is the same as the name you specified for your transcription job (<code>TranscriptionJobName</code>).</p> <p>Here are some examples of how you can use <code>OutputKey</code>:</p> <ul>  <li>   <p>If you specify 'DOC-EXAMPLE-BUCKET' as the <code>OutputBucketName</code> and 'my-transcript.json' as the <code>OutputKey</code>, your transcription output path is <code>s3://DOC-EXAMPLE-BUCKET/my-transcript.json</code>.</p></li>  <li>   <p>If you specify 'my-first-transcription' as the <code>TranscriptionJobName</code>, 'DOC-EXAMPLE-BUCKET' as the <code>OutputBucketName</code>, and 'my-transcript' as the <code>OutputKey</code>, your transcription output path is <code>s3://DOC-EXAMPLE-BUCKET/my-transcript/my-first-transcription.json</code>.</p></li>  <li>   <p>If you specify 'DOC-EXAMPLE-BUCKET' as the <code>OutputBucketName</code> and 'test-files/my-transcript.json' as the <code>OutputKey</code>, your transcription output path is <code>s3://DOC-EXAMPLE-BUCKET/test-files/my-transcript.json</code>.</p></li>  <li>   <p>If you specify 'my-first-transcription' as the <code>TranscriptionJobName</code>, 'DOC-EXAMPLE-BUCKET' as the <code>OutputBucketName</code>, and 'test-files/my-transcript' as the <code>OutputKey</code>, your transcription output path is <code>s3://DOC-EXAMPLE-BUCKET/test-files/my-transcript/my-first-transcription.json</code>.</p></li> </ul> <p>If you specify the name of an Amazon S3 bucket sub-folder that doesn't exist, one is created for you.</p><br>
    ///   - [`output_encryption_kms_key_id(impl Into<String>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::output_encryption_kms_key_id) / [`set_output_encryption_kms_key_id(Option<String>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_output_encryption_kms_key_id):<br>required: **false**<br><p>The KMS key you want to use to encrypt your transcription output.</p> <p>If using a key located in the <b>current</b> Amazon Web Services account, you can specify your KMS key in one of four ways:</p> <ol>  <li>   <p>Use the KMS key ID itself. For example, <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p></li>  <li>   <p>Use an alias for the KMS key ID. For example, <code>alias/ExampleAlias</code>.</p></li>  <li>   <p>Use the Amazon Resource Name (ARN) for the KMS key ID. For example, <code>arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p></li>  <li>   <p>Use the ARN for the KMS key alias. For example, <code>arn:aws:kms:region:account-ID:alias/ExampleAlias</code>.</p></li> </ol> <p>If using a key located in a <b>different</b> Amazon Web Services account than the current Amazon Web Services account, you can specify your KMS key in one of two ways:</p> <ol>  <li>   <p>Use the ARN for the KMS key ID. For example, <code>arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p></li>  <li>   <p>Use the ARN for the KMS key alias. For example, <code>arn:aws:kms:region:account-ID:alias/ExampleAlias</code>.</p></li> </ol> <p>If you do not specify an encryption key, your output is encrypted with the default Amazon S3 key (SSE-S3).</p> <p>If you specify a KMS key to encrypt your output, you must also specify an output location using the <code>OutputLocation</code> parameter.</p> <p>Note that the role making the request must have permission to use the specified KMS key.</p><br>
    ///   - [`kms_encryption_context(impl Into<String>, impl Into<String>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::kms_encryption_context) / [`set_kms_encryption_context(Option<HashMap::<String, String>>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_kms_encryption_context):<br>required: **false**<br><p>A map of plain text, non-secret key:value pairs, known as encryption context pairs, that provide an added layer of security for your data. For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/key-management.html#kms-context">KMS encryption context</a> and <a href="https://docs.aws.amazon.com/transcribe/latest/dg/symmetric-asymmetric.html">Asymmetric keys in KMS</a>.</p><br>
    ///   - [`settings(Settings)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::settings) / [`set_settings(Option<Settings>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_settings):<br>required: **false**<br><p>Specify additional optional settings in your request, including channel identification, alternative transcriptions, speaker partitioning. You can use that to apply custom vocabularies and vocabulary filters.</p> <p>If you want to include a custom vocabulary or a custom vocabulary filter (or both) with your request but <b>do not</b> want to use automatic language identification, use <code>Settings</code> with the <code>VocabularyName</code> or <code>VocabularyFilterName</code> (or both) sub-parameter.</p> <p>If you're using automatic language identification with your request and want to include a custom language model, a custom vocabulary, or a custom vocabulary filter, use instead the <code></code> parameter with the <code>LanguageModelName</code>, <code>VocabularyName</code> or <code>VocabularyFilterName</code> sub-parameters.</p><br>
    ///   - [`model_settings(ModelSettings)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::model_settings) / [`set_model_settings(Option<ModelSettings>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_model_settings):<br>required: **false**<br><p>Specify the custom language model you want to include with your transcription job. If you include <code>ModelSettings</code> in your request, you must include the <code>LanguageModelName</code> sub-parameter.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html">Custom language models</a>.</p><br>
    ///   - [`job_execution_settings(JobExecutionSettings)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::job_execution_settings) / [`set_job_execution_settings(Option<JobExecutionSettings>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_job_execution_settings):<br>required: **false**<br><p>Makes it possible to control how your transcription job is processed. Currently, the only <code>JobExecutionSettings</code> modification you can choose is enabling job queueing using the <code>AllowDeferredExecution</code> sub-parameter.</p> <p>If you include <code>JobExecutionSettings</code> in your request, you must also include the sub-parameters: <code>AllowDeferredExecution</code> and <code>DataAccessRoleArn</code>.</p><br>
    ///   - [`content_redaction(ContentRedaction)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::content_redaction) / [`set_content_redaction(Option<ContentRedaction>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_content_redaction):<br>required: **false**<br><p>Makes it possible to redact or flag specified personally identifiable information (PII) in your transcript. If you use <code>ContentRedaction</code>, you must also include the sub-parameters: <code>RedactionOutput</code> and <code>RedactionType</code>. You can optionally include <code>PiiEntityTypes</code> to choose which types of PII you want to redact. If you do not include <code>PiiEntityTypes</code> in your request, all PII is redacted.</p><br>
    ///   - [`identify_language(bool)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::identify_language) / [`set_identify_language(Option<bool>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_identify_language):<br>required: **false**<br><p>Enables automatic language identification in your transcription job request. Use this parameter if your media file contains only one language. If your media contains multiple languages, use <code>IdentifyMultipleLanguages</code> instead.</p> <p>If you include <code>IdentifyLanguage</code>, you can optionally include a list of language codes, using <code>LanguageOptions</code>, that you think may be present in your media file. Including <code>LanguageOptions</code> restricts <code>IdentifyLanguage</code> to only the language options that you specify, which can improve transcription accuracy.</p> <p>If you want to apply a custom language model, a custom vocabulary, or a custom vocabulary filter to your automatic language identification request, include <code>LanguageIdSettings</code> with the relevant sub-parameters (<code>VocabularyName</code>, <code>LanguageModelName</code>, and <code>VocabularyFilterName</code>). If you include <code>LanguageIdSettings</code>, also include <code>LanguageOptions</code>.</p> <p>Note that you must include one of <code>LanguageCode</code>, <code>IdentifyLanguage</code>, or <code>IdentifyMultipleLanguages</code> in your request. If you include more than one of these parameters, your transcription job fails.</p><br>
    ///   - [`identify_multiple_languages(bool)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::identify_multiple_languages) / [`set_identify_multiple_languages(Option<bool>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_identify_multiple_languages):<br>required: **false**<br><p>Enables automatic multi-language identification in your transcription job request. Use this parameter if your media file contains more than one language. If your media contains only one language, use <code>IdentifyLanguage</code> instead.</p> <p>If you include <code>IdentifyMultipleLanguages</code>, you can optionally include a list of language codes, using <code>LanguageOptions</code>, that you think may be present in your media file. Including <code>LanguageOptions</code> restricts <code>IdentifyLanguage</code> to only the language options that you specify, which can improve transcription accuracy.</p> <p>If you want to apply a custom vocabulary or a custom vocabulary filter to your automatic language identification request, include <code>LanguageIdSettings</code> with the relevant sub-parameters (<code>VocabularyName</code> and <code>VocabularyFilterName</code>). If you include <code>LanguageIdSettings</code>, also include <code>LanguageOptions</code>.</p> <p>Note that you must include one of <code>LanguageCode</code>, <code>IdentifyLanguage</code>, or <code>IdentifyMultipleLanguages</code> in your request. If you include more than one of these parameters, your transcription job fails.</p><br>
    ///   - [`language_options(LanguageCode)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::language_options) / [`set_language_options(Option<Vec::<LanguageCode>>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_language_options):<br>required: **false**<br><p>You can specify two or more language codes that represent the languages you think may be present in your media. Including more than five is not recommended. If you're unsure what languages are present, do not include this parameter.</p> <p>If you include <code>LanguageOptions</code> in your request, you must also include <code>IdentifyLanguage</code>.</p> <p>For more information, refer to <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a>.</p> <p>To transcribe speech in Modern Standard Arabic (<code>ar-SA</code>), your media file must be encoded at a sample rate of 16,000 Hz or higher.</p><br>
    ///   - [`subtitles(Subtitles)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::subtitles) / [`set_subtitles(Option<Subtitles>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_subtitles):<br>required: **false**<br><p>Produces subtitle files for your input media. You can specify WebVTT (*.vtt) and SubRip (*.srt) formats.</p><br>
    ///   - [`tags(Tag)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_tags):<br>required: **false**<br><p>Adds one or more custom tags, each in the form of a key:value pair, to a new transcription job at the time you start this new job.</p> <p>To learn more about using tags with Amazon Transcribe, refer to <a href="https://docs.aws.amazon.com/transcribe/latest/dg/tagging.html">Tagging resources</a>.</p><br>
    ///   - [`language_id_settings(LanguageCode, LanguageIdSettings)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::language_id_settings) / [`set_language_id_settings(Option<HashMap::<LanguageCode, LanguageIdSettings>>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_language_id_settings):<br>required: **false**<br><p>If using automatic language identification in your request and you want to apply a custom language model, a custom vocabulary, or a custom vocabulary filter, include <code>LanguageIdSettings</code> with the relevant sub-parameters (<code>VocabularyName</code>, <code>LanguageModelName</code>, and <code>VocabularyFilterName</code>). Note that multi-language identification (<code>IdentifyMultipleLanguages</code>) doesn't support custom language models.</p> <p><code>LanguageIdSettings</code> supports two to five language codes. Each language code you include can have an associated custom language model, custom vocabulary, and custom vocabulary filter. The language codes that you specify must match the languages of the associated custom language models, custom vocabularies, and custom vocabulary filters.</p> <p>It's recommended that you include <code>LanguageOptions</code> when using <code>LanguageIdSettings</code> to ensure that the correct language dialect is identified. For example, if you specify a custom vocabulary that is in <code>en-US</code> but Amazon Transcribe determines that the language spoken in your media is <code>en-AU</code>, your custom vocabulary <i>is not</i> applied to your transcription. If you include <code>LanguageOptions</code> and include <code>en-US</code> as the only English language dialect, your custom vocabulary <i>is</i> applied to your transcription.</p> <p>If you want to include a custom language model with your request but <b>do not</b> want to use automatic language identification, use instead the <code></code> parameter with the <code>LanguageModelName</code> sub-parameter. If you want to include a custom vocabulary or a custom vocabulary filter (or both) with your request but <b>do not</b> want to use automatic language identification, use instead the <code></code> parameter with the <code>VocabularyName</code> or <code>VocabularyFilterName</code> (or both) sub-parameter.</p><br>
    ///   - [`toxicity_detection(ToxicityDetectionSettings)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::toxicity_detection) / [`set_toxicity_detection(Option<Vec::<ToxicityDetectionSettings>>)`](crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::set_toxicity_detection):<br>required: **false**<br><p>Enables toxic speech detection in your transcript. If you include <code>ToxicityDetection</code> in your request, you must also include <code>ToxicityCategories</code>.</p> <p>For information on the types of toxic speech Amazon Transcribe can detect, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/toxic-language.html">Detecting toxic speech</a>.</p><br>
    /// - On success, responds with [`StartTranscriptionJobOutput`](crate::operation::start_transcription_job::StartTranscriptionJobOutput) with field(s):
    ///   - [`transcription_job(Option<TranscriptionJob>)`](crate::operation::start_transcription_job::StartTranscriptionJobOutput::transcription_job): <p>Provides detailed information about the current transcription job, including job status and, if applicable, failure reason.</p>
    /// - On failure, responds with [`SdkError<StartTranscriptionJobError>`](crate::operation::start_transcription_job::StartTranscriptionJobError)
    pub fn start_transcription_job(&self) -> crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder {
        crate::operation::start_transcription_job::builders::StartTranscriptionJobFluentBuilder::new(self.handle.clone())
    }
}