aws_sdk_transcribestreaming/operation/start_call_analytics_stream_transcription/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_call_analytics_stream_transcription::_start_call_analytics_stream_transcription_output::StartCallAnalyticsStreamTranscriptionOutputBuilder;
3
4pub use crate::operation::start_call_analytics_stream_transcription::_start_call_analytics_stream_transcription_input::StartCallAnalyticsStreamTranscriptionInputBuilder;
5
6impl crate::operation::start_call_analytics_stream_transcription::builders::StartCallAnalyticsStreamTranscriptionInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.start_call_analytics_stream_transcription();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `StartCallAnalyticsStreamTranscription`.
24///
25/// <p>Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe and the transcription results are streamed to your application. Use this operation for <a href="https://docs.aws.amazon.com/transcribe/latest/dg/call-analytics.html">Call Analytics</a> transcriptions.</p>
26/// <p>The following parameters are required:</p>
27/// <ul>
28/// <li>
29/// <p><code>language-code</code> or <code>identify-language</code></p></li>
30/// <li>
31/// <p><code>media-encoding</code></p></li>
32/// <li>
33/// <p><code>sample-rate</code></p></li>
34/// </ul>
35/// <p>For more information on streaming with Amazon Transcribe, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
36#[derive(::std::fmt::Debug)]
37pub struct StartCallAnalyticsStreamTranscriptionFluentBuilder {
38 handle: ::std::sync::Arc<crate::client::Handle>,
39 inner: crate::operation::start_call_analytics_stream_transcription::builders::StartCallAnalyticsStreamTranscriptionInputBuilder,
40 config_override: ::std::option::Option<crate::config::Builder>,
41}
42impl
43 crate::client::customize::internal::CustomizableSend<
44 crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionOutput,
45 crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError,
46 > for StartCallAnalyticsStreamTranscriptionFluentBuilder
47{
48 fn send(
49 self,
50 config_override: crate::config::Builder,
51 ) -> crate::client::customize::internal::BoxFuture<
52 crate::client::customize::internal::SendResult<
53 crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionOutput,
54 crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError,
55 >,
56 > {
57 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
58 }
59}
60impl StartCallAnalyticsStreamTranscriptionFluentBuilder {
61 /// Creates a new `StartCallAnalyticsStreamTranscriptionFluentBuilder`.
62 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
63 Self {
64 handle,
65 inner: ::std::default::Default::default(),
66 config_override: ::std::option::Option::None,
67 }
68 }
69 /// Access the StartCallAnalyticsStreamTranscription as a reference.
70 pub fn as_input(
71 &self,
72 ) -> &crate::operation::start_call_analytics_stream_transcription::builders::StartCallAnalyticsStreamTranscriptionInputBuilder {
73 &self.inner
74 }
75 /// Sends the request and returns the response.
76 ///
77 /// If an error occurs, an `SdkError` will be returned with additional details that
78 /// can be matched against.
79 ///
80 /// By default, any retryable failures will be retried twice. Retry behavior
81 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
82 /// set when configuring the client.
83 pub async fn send(
84 self,
85 ) -> ::std::result::Result<
86 crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionOutput,
87 ::aws_smithy_runtime_api::client::result::SdkError<
88 crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError,
89 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
90 >,
91 > {
92 let input = self
93 .inner
94 .build()
95 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
96 let runtime_plugins =
97 crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscription::operation_runtime_plugins(
98 self.handle.runtime_plugins.clone(),
99 &self.handle.conf,
100 self.config_override,
101 );
102 crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscription::orchestrate(&runtime_plugins, input).await
103 }
104
105 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
106 pub fn customize(
107 self,
108 ) -> crate::client::customize::CustomizableOperation<
109 crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionOutput,
110 crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError,
111 Self,
112 > {
113 crate::client::customize::CustomizableOperation::new(self)
114 }
115 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
116 self.set_config_override(::std::option::Option::Some(config_override.into()));
117 self
118 }
119
120 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
121 self.config_override = config_override;
122 self
123 }
124 /// <p>Specify the language code that represents the language spoken in your audio.</p>
125 /// <p>For a list of languages supported with real-time Call Analytics, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p>
126 pub fn language_code(mut self, input: crate::types::CallAnalyticsLanguageCode) -> Self {
127 self.inner = self.inner.language_code(input);
128 self
129 }
130 /// <p>Specify the language code that represents the language spoken in your audio.</p>
131 /// <p>For a list of languages supported with real-time Call Analytics, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p>
132 pub fn set_language_code(mut self, input: ::std::option::Option<crate::types::CallAnalyticsLanguageCode>) -> Self {
133 self.inner = self.inner.set_language_code(input);
134 self
135 }
136 /// <p>Specify the language code that represents the language spoken in your audio.</p>
137 /// <p>For a list of languages supported with real-time Call Analytics, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p>
138 pub fn get_language_code(&self) -> &::std::option::Option<crate::types::CallAnalyticsLanguageCode> {
139 self.inner.get_language_code()
140 }
141 /// <p>The sample rate of the input audio (in hertz). Low-quality audio, such as telephone audio, is typically around 8,000 Hz. High-quality audio typically ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must match that of your audio.</p>
142 pub fn media_sample_rate_hertz(mut self, input: i32) -> Self {
143 self.inner = self.inner.media_sample_rate_hertz(input);
144 self
145 }
146 /// <p>The sample rate of the input audio (in hertz). Low-quality audio, such as telephone audio, is typically around 8,000 Hz. High-quality audio typically ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must match that of your audio.</p>
147 pub fn set_media_sample_rate_hertz(mut self, input: ::std::option::Option<i32>) -> Self {
148 self.inner = self.inner.set_media_sample_rate_hertz(input);
149 self
150 }
151 /// <p>The sample rate of the input audio (in hertz). Low-quality audio, such as telephone audio, is typically around 8,000 Hz. High-quality audio typically ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must match that of your audio.</p>
152 pub fn get_media_sample_rate_hertz(&self) -> &::std::option::Option<i32> {
153 self.inner.get_media_sample_rate_hertz()
154 }
155 /// <p>Specify the encoding of your input audio. Supported formats are:</p>
156 /// <ul>
157 /// <li>
158 /// <p>FLAC</p></li>
159 /// <li>
160 /// <p>OPUS-encoded audio in an Ogg container</p></li>
161 /// <li>
162 /// <p>PCM (only signed 16-bit little-endian audio formats, which does not include WAV)</p></li>
163 /// </ul>
164 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio">Media formats</a>.</p>
165 pub fn media_encoding(mut self, input: crate::types::MediaEncoding) -> Self {
166 self.inner = self.inner.media_encoding(input);
167 self
168 }
169 /// <p>Specify the encoding of your input audio. Supported formats are:</p>
170 /// <ul>
171 /// <li>
172 /// <p>FLAC</p></li>
173 /// <li>
174 /// <p>OPUS-encoded audio in an Ogg container</p></li>
175 /// <li>
176 /// <p>PCM (only signed 16-bit little-endian audio formats, which does not include WAV)</p></li>
177 /// </ul>
178 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio">Media formats</a>.</p>
179 pub fn set_media_encoding(mut self, input: ::std::option::Option<crate::types::MediaEncoding>) -> Self {
180 self.inner = self.inner.set_media_encoding(input);
181 self
182 }
183 /// <p>Specify the encoding of your input audio. Supported formats are:</p>
184 /// <ul>
185 /// <li>
186 /// <p>FLAC</p></li>
187 /// <li>
188 /// <p>OPUS-encoded audio in an Ogg container</p></li>
189 /// <li>
190 /// <p>PCM (only signed 16-bit little-endian audio formats, which does not include WAV)</p></li>
191 /// </ul>
192 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio">Media formats</a>.</p>
193 pub fn get_media_encoding(&self) -> &::std::option::Option<crate::types::MediaEncoding> {
194 self.inner.get_media_encoding()
195 }
196 /// <p>Specify the name of the custom vocabulary that you want to use when processing your transcription. Note that vocabulary names are case sensitive.</p>
197 /// <p>If the language of the specified custom vocabulary doesn't match the language identified in your media, the custom vocabulary is not applied to your transcription.</p>
198 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
199 pub fn vocabulary_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200 self.inner = self.inner.vocabulary_name(input.into());
201 self
202 }
203 /// <p>Specify the name of the custom vocabulary that you want to use when processing your transcription. Note that vocabulary names are case sensitive.</p>
204 /// <p>If the language of the specified custom vocabulary doesn't match the language identified in your media, the custom vocabulary is not applied to your transcription.</p>
205 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
206 pub fn set_vocabulary_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207 self.inner = self.inner.set_vocabulary_name(input);
208 self
209 }
210 /// <p>Specify the name of the custom vocabulary that you want to use when processing your transcription. Note that vocabulary names are case sensitive.</p>
211 /// <p>If the language of the specified custom vocabulary doesn't match the language identified in your media, the custom vocabulary is not applied to your transcription.</p>
212 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
213 pub fn get_vocabulary_name(&self) -> &::std::option::Option<::std::string::String> {
214 self.inner.get_vocabulary_name()
215 }
216 /// <p>Specify a name for your Call Analytics transcription session. If you don't include this parameter in your request, Amazon Transcribe generates an ID and returns it in the response.</p>
217 pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
218 self.inner = self.inner.session_id(input.into());
219 self
220 }
221 /// <p>Specify a name for your Call Analytics transcription session. If you don't include this parameter in your request, Amazon Transcribe generates an ID and returns it in the response.</p>
222 pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223 self.inner = self.inner.set_session_id(input);
224 self
225 }
226 /// <p>Specify a name for your Call Analytics transcription session. If you don't include this parameter in your request, Amazon Transcribe generates an ID and returns it in the response.</p>
227 pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
228 self.inner.get_session_id()
229 }
230 /// <p>An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket data frames.</p>
231 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
232 pub fn audio_stream(
233 mut self,
234 input: ::aws_smithy_http::event_stream::EventStreamSender<crate::types::AudioStream, crate::types::error::AudioStreamError>,
235 ) -> Self {
236 self.inner = self.inner.audio_stream(input);
237 self
238 }
239 /// <p>An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket data frames.</p>
240 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
241 pub fn set_audio_stream(
242 mut self,
243 input: ::std::option::Option<
244 ::aws_smithy_http::event_stream::EventStreamSender<crate::types::AudioStream, crate::types::error::AudioStreamError>,
245 >,
246 ) -> Self {
247 self.inner = self.inner.set_audio_stream(input);
248 self
249 }
250 /// <p>An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket data frames.</p>
251 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
252 pub fn get_audio_stream(
253 &self,
254 ) -> &::std::option::Option<::aws_smithy_http::event_stream::EventStreamSender<crate::types::AudioStream, crate::types::error::AudioStreamError>>
255 {
256 self.inner.get_audio_stream()
257 }
258 /// <p>Specify the name of the custom vocabulary filter that you want to use when processing your transcription. Note that vocabulary filter names are case sensitive.</p>
259 /// <p>If the language of the specified custom vocabulary filter doesn't match the language identified in your media, the vocabulary filter is not applied to your transcription.</p>
260 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html">Using vocabulary filtering with unwanted words</a>.</p>
261 pub fn vocabulary_filter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
262 self.inner = self.inner.vocabulary_filter_name(input.into());
263 self
264 }
265 /// <p>Specify the name of the custom vocabulary filter that you want to use when processing your transcription. Note that vocabulary filter names are case sensitive.</p>
266 /// <p>If the language of the specified custom vocabulary filter doesn't match the language identified in your media, the vocabulary filter is not applied to your transcription.</p>
267 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html">Using vocabulary filtering with unwanted words</a>.</p>
268 pub fn set_vocabulary_filter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269 self.inner = self.inner.set_vocabulary_filter_name(input);
270 self
271 }
272 /// <p>Specify the name of the custom vocabulary filter that you want to use when processing your transcription. Note that vocabulary filter names are case sensitive.</p>
273 /// <p>If the language of the specified custom vocabulary filter doesn't match the language identified in your media, the vocabulary filter is not applied to your transcription.</p>
274 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html">Using vocabulary filtering with unwanted words</a>.</p>
275 pub fn get_vocabulary_filter_name(&self) -> &::std::option::Option<::std::string::String> {
276 self.inner.get_vocabulary_filter_name()
277 }
278 /// <p>Specify how you want your vocabulary filter applied to your transcript.</p>
279 /// <p>To replace words with <code>***</code>, choose <code>mask</code>.</p>
280 /// <p>To delete words, choose <code>remove</code>.</p>
281 /// <p>To flag words without changing them, choose <code>tag</code>.</p>
282 pub fn vocabulary_filter_method(mut self, input: crate::types::VocabularyFilterMethod) -> Self {
283 self.inner = self.inner.vocabulary_filter_method(input);
284 self
285 }
286 /// <p>Specify how you want your vocabulary filter applied to your transcript.</p>
287 /// <p>To replace words with <code>***</code>, choose <code>mask</code>.</p>
288 /// <p>To delete words, choose <code>remove</code>.</p>
289 /// <p>To flag words without changing them, choose <code>tag</code>.</p>
290 pub fn set_vocabulary_filter_method(mut self, input: ::std::option::Option<crate::types::VocabularyFilterMethod>) -> Self {
291 self.inner = self.inner.set_vocabulary_filter_method(input);
292 self
293 }
294 /// <p>Specify how you want your vocabulary filter applied to your transcript.</p>
295 /// <p>To replace words with <code>***</code>, choose <code>mask</code>.</p>
296 /// <p>To delete words, choose <code>remove</code>.</p>
297 /// <p>To flag words without changing them, choose <code>tag</code>.</p>
298 pub fn get_vocabulary_filter_method(&self) -> &::std::option::Option<crate::types::VocabularyFilterMethod> {
299 self.inner.get_vocabulary_filter_method()
300 }
301 /// <p>Specify the name of the custom language model that you want to use when processing your transcription. Note that language model names are case sensitive.</p>
302 /// <p>The language of the specified language model must match the language code you specify in your transcription request. If the languages don't match, the custom language model isn't applied. There are no errors or warnings associated with a language mismatch.</p>
303 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html">Custom language models</a>.</p>
304 pub fn language_model_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
305 self.inner = self.inner.language_model_name(input.into());
306 self
307 }
308 /// <p>Specify the name of the custom language model that you want to use when processing your transcription. Note that language model names are case sensitive.</p>
309 /// <p>The language of the specified language model must match the language code you specify in your transcription request. If the languages don't match, the custom language model isn't applied. There are no errors or warnings associated with a language mismatch.</p>
310 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html">Custom language models</a>.</p>
311 pub fn set_language_model_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
312 self.inner = self.inner.set_language_model_name(input);
313 self
314 }
315 /// <p>Specify the name of the custom language model that you want to use when processing your transcription. Note that language model names are case sensitive.</p>
316 /// <p>The language of the specified language model must match the language code you specify in your transcription request. If the languages don't match, the custom language model isn't applied. There are no errors or warnings associated with a language mismatch.</p>
317 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html">Custom language models</a>.</p>
318 pub fn get_language_model_name(&self) -> &::std::option::Option<::std::string::String> {
319 self.inner.get_language_model_name()
320 }
321 /// <p>Enables automatic language identification for your Call Analytics transcription.</p>
322 /// <p>If you include <code>IdentifyLanguage</code>, you must include a list of language codes, using <code>LanguageOptions</code>, that you think may be present in your audio stream. You must provide a minimum of two language selections.</p>
323 /// <p>You can also include a preferred language using <code>PreferredLanguage</code>. Adding a preferred language can help Amazon Transcribe identify the language faster than if you omit this parameter.</p>
324 /// <p>Note that you must include either <code>LanguageCode</code> or <code>IdentifyLanguage</code> in your request. If you include both parameters, your transcription job fails.</p>
325 pub fn identify_language(mut self, input: bool) -> Self {
326 self.inner = self.inner.identify_language(input);
327 self
328 }
329 /// <p>Enables automatic language identification for your Call Analytics transcription.</p>
330 /// <p>If you include <code>IdentifyLanguage</code>, you must include a list of language codes, using <code>LanguageOptions</code>, that you think may be present in your audio stream. You must provide a minimum of two language selections.</p>
331 /// <p>You can also include a preferred language using <code>PreferredLanguage</code>. Adding a preferred language can help Amazon Transcribe identify the language faster than if you omit this parameter.</p>
332 /// <p>Note that you must include either <code>LanguageCode</code> or <code>IdentifyLanguage</code> in your request. If you include both parameters, your transcription job fails.</p>
333 pub fn set_identify_language(mut self, input: ::std::option::Option<bool>) -> Self {
334 self.inner = self.inner.set_identify_language(input);
335 self
336 }
337 /// <p>Enables automatic language identification for your Call Analytics transcription.</p>
338 /// <p>If you include <code>IdentifyLanguage</code>, you must include a list of language codes, using <code>LanguageOptions</code>, that you think may be present in your audio stream. You must provide a minimum of two language selections.</p>
339 /// <p>You can also include a preferred language using <code>PreferredLanguage</code>. Adding a preferred language can help Amazon Transcribe identify the language faster than if you omit this parameter.</p>
340 /// <p>Note that you must include either <code>LanguageCode</code> or <code>IdentifyLanguage</code> in your request. If you include both parameters, your transcription job fails.</p>
341 pub fn get_identify_language(&self) -> &::std::option::Option<bool> {
342 self.inner.get_identify_language()
343 }
344 /// <p>Specify two or more language codes that represent the languages you think may be present in your media.</p>
345 /// <p>Including language options can improve the accuracy of language identification.</p>
346 /// <p>If you include <code>LanguageOptions</code> in your request, you must also include <code>IdentifyLanguage</code>.</p>
347 /// <p>For a list of languages supported with Call Analytics streaming, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p><important>
348 /// <p>You can only include one language dialect per language per stream. For example, you cannot include <code>en-US</code> and <code>en-AU</code> in the same request.</p>
349 /// </important>
350 pub fn language_options(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
351 self.inner = self.inner.language_options(input.into());
352 self
353 }
354 /// <p>Specify two or more language codes that represent the languages you think may be present in your media.</p>
355 /// <p>Including language options can improve the accuracy of language identification.</p>
356 /// <p>If you include <code>LanguageOptions</code> in your request, you must also include <code>IdentifyLanguage</code>.</p>
357 /// <p>For a list of languages supported with Call Analytics streaming, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p><important>
358 /// <p>You can only include one language dialect per language per stream. For example, you cannot include <code>en-US</code> and <code>en-AU</code> in the same request.</p>
359 /// </important>
360 pub fn set_language_options(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
361 self.inner = self.inner.set_language_options(input);
362 self
363 }
364 /// <p>Specify two or more language codes that represent the languages you think may be present in your media.</p>
365 /// <p>Including language options can improve the accuracy of language identification.</p>
366 /// <p>If you include <code>LanguageOptions</code> in your request, you must also include <code>IdentifyLanguage</code>.</p>
367 /// <p>For a list of languages supported with Call Analytics streaming, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p><important>
368 /// <p>You can only include one language dialect per language per stream. For example, you cannot include <code>en-US</code> and <code>en-AU</code> in the same request.</p>
369 /// </important>
370 pub fn get_language_options(&self) -> &::std::option::Option<::std::string::String> {
371 self.inner.get_language_options()
372 }
373 /// <p>Specify a preferred language from the subset of languages codes you specified in <code>LanguageOptions</code>.</p>
374 /// <p>You can only use this parameter if you've included <code>IdentifyLanguage</code> and <code>LanguageOptions</code> in your request.</p>
375 pub fn preferred_language(mut self, input: crate::types::CallAnalyticsLanguageCode) -> Self {
376 self.inner = self.inner.preferred_language(input);
377 self
378 }
379 /// <p>Specify a preferred language from the subset of languages codes you specified in <code>LanguageOptions</code>.</p>
380 /// <p>You can only use this parameter if you've included <code>IdentifyLanguage</code> and <code>LanguageOptions</code> in your request.</p>
381 pub fn set_preferred_language(mut self, input: ::std::option::Option<crate::types::CallAnalyticsLanguageCode>) -> Self {
382 self.inner = self.inner.set_preferred_language(input);
383 self
384 }
385 /// <p>Specify a preferred language from the subset of languages codes you specified in <code>LanguageOptions</code>.</p>
386 /// <p>You can only use this parameter if you've included <code>IdentifyLanguage</code> and <code>LanguageOptions</code> in your request.</p>
387 pub fn get_preferred_language(&self) -> &::std::option::Option<crate::types::CallAnalyticsLanguageCode> {
388 self.inner.get_preferred_language()
389 }
390 /// <p>Specify the names of the custom vocabularies that you want to use when processing your Call Analytics transcription. Note that vocabulary names are case sensitive.</p>
391 /// <p>If the custom vocabulary's language doesn't match the identified media language, it won't be applied to the transcription.</p><important>
392 /// <p>This parameter is only intended for use <b>with</b> the <code>IdentifyLanguage</code> parameter. If you're <b>not</b> including <code>IdentifyLanguage</code> in your request and want to use a custom vocabulary with your transcription, use the <code>VocabularyName</code> parameter instead.</p>
393 /// </important>
394 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
395 pub fn vocabulary_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
396 self.inner = self.inner.vocabulary_names(input.into());
397 self
398 }
399 /// <p>Specify the names of the custom vocabularies that you want to use when processing your Call Analytics transcription. Note that vocabulary names are case sensitive.</p>
400 /// <p>If the custom vocabulary's language doesn't match the identified media language, it won't be applied to the transcription.</p><important>
401 /// <p>This parameter is only intended for use <b>with</b> the <code>IdentifyLanguage</code> parameter. If you're <b>not</b> including <code>IdentifyLanguage</code> in your request and want to use a custom vocabulary with your transcription, use the <code>VocabularyName</code> parameter instead.</p>
402 /// </important>
403 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
404 pub fn set_vocabulary_names(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
405 self.inner = self.inner.set_vocabulary_names(input);
406 self
407 }
408 /// <p>Specify the names of the custom vocabularies that you want to use when processing your Call Analytics transcription. Note that vocabulary names are case sensitive.</p>
409 /// <p>If the custom vocabulary's language doesn't match the identified media language, it won't be applied to the transcription.</p><important>
410 /// <p>This parameter is only intended for use <b>with</b> the <code>IdentifyLanguage</code> parameter. If you're <b>not</b> including <code>IdentifyLanguage</code> in your request and want to use a custom vocabulary with your transcription, use the <code>VocabularyName</code> parameter instead.</p>
411 /// </important>
412 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
413 pub fn get_vocabulary_names(&self) -> &::std::option::Option<::std::string::String> {
414 self.inner.get_vocabulary_names()
415 }
416 /// <p>Specify the names of the custom vocabulary filters that you want to use when processing your Call Analytics transcription. Note that vocabulary filter names are case sensitive.</p>
417 /// <p>These filters serve to customize the transcript output.</p><important>
418 /// <p>This parameter is only intended for use <b>with</b> the <code>IdentifyLanguage</code> parameter. If you're <b>not</b> including <code>IdentifyLanguage</code> in your request and want to use a custom vocabulary filter with your transcription, use the <code>VocabularyFilterName</code> parameter instead.</p>
419 /// </important>
420 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html">Using vocabulary filtering with unwanted words</a>.</p>
421 pub fn vocabulary_filter_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
422 self.inner = self.inner.vocabulary_filter_names(input.into());
423 self
424 }
425 /// <p>Specify the names of the custom vocabulary filters that you want to use when processing your Call Analytics transcription. Note that vocabulary filter names are case sensitive.</p>
426 /// <p>These filters serve to customize the transcript output.</p><important>
427 /// <p>This parameter is only intended for use <b>with</b> the <code>IdentifyLanguage</code> parameter. If you're <b>not</b> including <code>IdentifyLanguage</code> in your request and want to use a custom vocabulary filter with your transcription, use the <code>VocabularyFilterName</code> parameter instead.</p>
428 /// </important>
429 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html">Using vocabulary filtering with unwanted words</a>.</p>
430 pub fn set_vocabulary_filter_names(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
431 self.inner = self.inner.set_vocabulary_filter_names(input);
432 self
433 }
434 /// <p>Specify the names of the custom vocabulary filters that you want to use when processing your Call Analytics transcription. Note that vocabulary filter names are case sensitive.</p>
435 /// <p>These filters serve to customize the transcript output.</p><important>
436 /// <p>This parameter is only intended for use <b>with</b> the <code>IdentifyLanguage</code> parameter. If you're <b>not</b> including <code>IdentifyLanguage</code> in your request and want to use a custom vocabulary filter with your transcription, use the <code>VocabularyFilterName</code> parameter instead.</p>
437 /// </important>
438 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html">Using vocabulary filtering with unwanted words</a>.</p>
439 pub fn get_vocabulary_filter_names(&self) -> &::std::option::Option<::std::string::String> {
440 self.inner.get_vocabulary_filter_names()
441 }
442 /// <p>Enables partial result stabilization for your transcription. Partial result stabilization can reduce latency in your output, but may impact accuracy. For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization">Partial-result stabilization</a>.</p>
443 pub fn enable_partial_results_stabilization(mut self, input: bool) -> Self {
444 self.inner = self.inner.enable_partial_results_stabilization(input);
445 self
446 }
447 /// <p>Enables partial result stabilization for your transcription. Partial result stabilization can reduce latency in your output, but may impact accuracy. For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization">Partial-result stabilization</a>.</p>
448 pub fn set_enable_partial_results_stabilization(mut self, input: ::std::option::Option<bool>) -> Self {
449 self.inner = self.inner.set_enable_partial_results_stabilization(input);
450 self
451 }
452 /// <p>Enables partial result stabilization for your transcription. Partial result stabilization can reduce latency in your output, but may impact accuracy. For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization">Partial-result stabilization</a>.</p>
453 pub fn get_enable_partial_results_stabilization(&self) -> &::std::option::Option<bool> {
454 self.inner.get_enable_partial_results_stabilization()
455 }
456 /// <p>Specify the level of stability to use when you enable partial results stabilization (<code>EnablePartialResultsStabilization</code>).</p>
457 /// <p>Low stability provides the highest accuracy. High stability transcribes faster, but with slightly lower accuracy.</p>
458 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization">Partial-result stabilization</a>.</p>
459 pub fn partial_results_stability(mut self, input: crate::types::PartialResultsStability) -> Self {
460 self.inner = self.inner.partial_results_stability(input);
461 self
462 }
463 /// <p>Specify the level of stability to use when you enable partial results stabilization (<code>EnablePartialResultsStabilization</code>).</p>
464 /// <p>Low stability provides the highest accuracy. High stability transcribes faster, but with slightly lower accuracy.</p>
465 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization">Partial-result stabilization</a>.</p>
466 pub fn set_partial_results_stability(mut self, input: ::std::option::Option<crate::types::PartialResultsStability>) -> Self {
467 self.inner = self.inner.set_partial_results_stability(input);
468 self
469 }
470 /// <p>Specify the level of stability to use when you enable partial results stabilization (<code>EnablePartialResultsStabilization</code>).</p>
471 /// <p>Low stability provides the highest accuracy. High stability transcribes faster, but with slightly lower accuracy.</p>
472 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization">Partial-result stabilization</a>.</p>
473 pub fn get_partial_results_stability(&self) -> &::std::option::Option<crate::types::PartialResultsStability> {
474 self.inner.get_partial_results_stability()
475 }
476 /// <p>Labels all personally identifiable information (PII) identified in your transcript.</p>
477 /// <p>Content identification is performed at the segment level; PII specified in <code>PiiEntityTypes</code> is flagged upon complete transcription of an audio segment. If you don't include <code>PiiEntityTypes</code> in your request, all PII is identified.</p>
478 /// <p>You can’t set <code>ContentIdentificationType</code> and <code>ContentRedactionType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
479 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html">Redacting or identifying personally identifiable information</a>.</p>
480 pub fn content_identification_type(mut self, input: crate::types::ContentIdentificationType) -> Self {
481 self.inner = self.inner.content_identification_type(input);
482 self
483 }
484 /// <p>Labels all personally identifiable information (PII) identified in your transcript.</p>
485 /// <p>Content identification is performed at the segment level; PII specified in <code>PiiEntityTypes</code> is flagged upon complete transcription of an audio segment. If you don't include <code>PiiEntityTypes</code> in your request, all PII is identified.</p>
486 /// <p>You can’t set <code>ContentIdentificationType</code> and <code>ContentRedactionType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
487 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html">Redacting or identifying personally identifiable information</a>.</p>
488 pub fn set_content_identification_type(mut self, input: ::std::option::Option<crate::types::ContentIdentificationType>) -> Self {
489 self.inner = self.inner.set_content_identification_type(input);
490 self
491 }
492 /// <p>Labels all personally identifiable information (PII) identified in your transcript.</p>
493 /// <p>Content identification is performed at the segment level; PII specified in <code>PiiEntityTypes</code> is flagged upon complete transcription of an audio segment. If you don't include <code>PiiEntityTypes</code> in your request, all PII is identified.</p>
494 /// <p>You can’t set <code>ContentIdentificationType</code> and <code>ContentRedactionType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
495 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html">Redacting or identifying personally identifiable information</a>.</p>
496 pub fn get_content_identification_type(&self) -> &::std::option::Option<crate::types::ContentIdentificationType> {
497 self.inner.get_content_identification_type()
498 }
499 /// <p>Redacts all personally identifiable information (PII) identified in your transcript.</p>
500 /// <p>Content redaction is performed at the segment level; PII specified in <code>PiiEntityTypes</code> is redacted upon complete transcription of an audio segment. If you don't include <code>PiiEntityTypes</code> in your request, all PII is redacted.</p>
501 /// <p>You can’t set <code>ContentRedactionType</code> and <code>ContentIdentificationType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
502 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html">Redacting or identifying personally identifiable information</a>.</p>
503 pub fn content_redaction_type(mut self, input: crate::types::ContentRedactionType) -> Self {
504 self.inner = self.inner.content_redaction_type(input);
505 self
506 }
507 /// <p>Redacts all personally identifiable information (PII) identified in your transcript.</p>
508 /// <p>Content redaction is performed at the segment level; PII specified in <code>PiiEntityTypes</code> is redacted upon complete transcription of an audio segment. If you don't include <code>PiiEntityTypes</code> in your request, all PII is redacted.</p>
509 /// <p>You can’t set <code>ContentRedactionType</code> and <code>ContentIdentificationType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
510 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html">Redacting or identifying personally identifiable information</a>.</p>
511 pub fn set_content_redaction_type(mut self, input: ::std::option::Option<crate::types::ContentRedactionType>) -> Self {
512 self.inner = self.inner.set_content_redaction_type(input);
513 self
514 }
515 /// <p>Redacts all personally identifiable information (PII) identified in your transcript.</p>
516 /// <p>Content redaction is performed at the segment level; PII specified in <code>PiiEntityTypes</code> is redacted upon complete transcription of an audio segment. If you don't include <code>PiiEntityTypes</code> in your request, all PII is redacted.</p>
517 /// <p>You can’t set <code>ContentRedactionType</code> and <code>ContentIdentificationType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
518 /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html">Redacting or identifying personally identifiable information</a>.</p>
519 pub fn get_content_redaction_type(&self) -> &::std::option::Option<crate::types::ContentRedactionType> {
520 self.inner.get_content_redaction_type()
521 }
522 /// <p>Specify which types of personally identifiable information (PII) you want to redact in your transcript. You can include as many types as you'd like, or you can select <code>ALL</code>.</p>
523 /// <p>Values must be comma-separated and can include: <code>ADDRESS</code>, <code>BANK_ACCOUNT_NUMBER</code>, <code>BANK_ROUTING</code>, <code>CREDIT_DEBIT_CVV</code>, <code>CREDIT_DEBIT_EXPIRY</code>, <code>CREDIT_DEBIT_NUMBER</code>, <code>EMAIL</code>, <code>NAME</code>, <code>PHONE</code>, <code>PIN</code>, <code>SSN</code>, or <code>ALL</code>.</p>
524 /// <p>Note that if you include <code>PiiEntityTypes</code> in your request, you must also include <code>ContentIdentificationType</code> or <code>ContentRedactionType</code>.</p>
525 /// <p>If you include <code>ContentRedactionType</code> or <code>ContentIdentificationType</code> in your request, but do not include <code>PiiEntityTypes</code>, all PII is redacted or identified.</p>
526 pub fn pii_entity_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
527 self.inner = self.inner.pii_entity_types(input.into());
528 self
529 }
530 /// <p>Specify which types of personally identifiable information (PII) you want to redact in your transcript. You can include as many types as you'd like, or you can select <code>ALL</code>.</p>
531 /// <p>Values must be comma-separated and can include: <code>ADDRESS</code>, <code>BANK_ACCOUNT_NUMBER</code>, <code>BANK_ROUTING</code>, <code>CREDIT_DEBIT_CVV</code>, <code>CREDIT_DEBIT_EXPIRY</code>, <code>CREDIT_DEBIT_NUMBER</code>, <code>EMAIL</code>, <code>NAME</code>, <code>PHONE</code>, <code>PIN</code>, <code>SSN</code>, or <code>ALL</code>.</p>
532 /// <p>Note that if you include <code>PiiEntityTypes</code> in your request, you must also include <code>ContentIdentificationType</code> or <code>ContentRedactionType</code>.</p>
533 /// <p>If you include <code>ContentRedactionType</code> or <code>ContentIdentificationType</code> in your request, but do not include <code>PiiEntityTypes</code>, all PII is redacted or identified.</p>
534 pub fn set_pii_entity_types(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
535 self.inner = self.inner.set_pii_entity_types(input);
536 self
537 }
538 /// <p>Specify which types of personally identifiable information (PII) you want to redact in your transcript. You can include as many types as you'd like, or you can select <code>ALL</code>.</p>
539 /// <p>Values must be comma-separated and can include: <code>ADDRESS</code>, <code>BANK_ACCOUNT_NUMBER</code>, <code>BANK_ROUTING</code>, <code>CREDIT_DEBIT_CVV</code>, <code>CREDIT_DEBIT_EXPIRY</code>, <code>CREDIT_DEBIT_NUMBER</code>, <code>EMAIL</code>, <code>NAME</code>, <code>PHONE</code>, <code>PIN</code>, <code>SSN</code>, or <code>ALL</code>.</p>
540 /// <p>Note that if you include <code>PiiEntityTypes</code> in your request, you must also include <code>ContentIdentificationType</code> or <code>ContentRedactionType</code>.</p>
541 /// <p>If you include <code>ContentRedactionType</code> or <code>ContentIdentificationType</code> in your request, but do not include <code>PiiEntityTypes</code>, all PII is redacted or identified.</p>
542 pub fn get_pii_entity_types(&self) -> &::std::option::Option<::std::string::String> {
543 self.inner.get_pii_entity_types()
544 }
545}