AWS SDK for C++

AWS SDK for C++ Version 1.11.742

Loading...
Searching...
No Matches
StartStreamTranscriptionRequest.h
1
6#pragma once
7#include <aws/core/utils/event/EventStreamDecoder.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/transcribestreaming/TranscribeStreamingServiceRequest.h>
10#include <aws/transcribestreaming/TranscribeStreamingService_EXPORTS.h>
11#include <aws/transcribestreaming/model/AudioStream.h>
12#include <aws/transcribestreaming/model/ContentIdentificationType.h>
13#include <aws/transcribestreaming/model/ContentRedactionType.h>
14#include <aws/transcribestreaming/model/LanguageCode.h>
15#include <aws/transcribestreaming/model/MediaEncoding.h>
16#include <aws/transcribestreaming/model/PartialResultsStability.h>
17#include <aws/transcribestreaming/model/StartStreamTranscriptionHandler.h>
18#include <aws/transcribestreaming/model/VocabularyFilterMethod.h>
19
20#include <memory>
21#include <utility>
22
23namespace Aws {
24namespace TranscribeStreamingService {
25namespace Model {
26
30 public:
31 AWS_TRANSCRIBESTREAMINGSERVICE_API StartStreamTranscriptionRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "StartStreamTranscription"; }
38
39 inline virtual bool IsEventStreamRequest() const override { return true; }
40 inline virtual bool HasEventStreamResponse() const override { return true; }
41 // SerializePayload will not be invoked.
42 // This request is sent by encoding its data in event-streams which is sent as IOStream via GetBody()
43 AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::String SerializePayload() const override { return {}; }
44 AWS_TRANSCRIBESTREAMINGSERVICE_API std::shared_ptr<Aws::IOStream> GetBody() const override;
45 AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
46
51
56
61 m_handler = value;
62 m_decoder.ResetEventStreamHandler(&m_handler);
63 }
64
70 return *this;
71 }
72
74
83 inline LanguageCode GetLanguageCode() const { return m_languageCode; }
84 inline bool LanguageCodeHasBeenSet() const { return m_languageCodeHasBeenSet; }
85 inline void SetLanguageCode(LanguageCode value) {
86 m_languageCodeHasBeenSet = true;
87 m_languageCode = value;
88 }
90 SetLanguageCode(value);
91 return *this;
92 }
94
96
102 inline int GetMediaSampleRateHertz() const { return m_mediaSampleRateHertz; }
103 inline bool MediaSampleRateHertzHasBeenSet() const { return m_mediaSampleRateHertzHasBeenSet; }
104 inline void SetMediaSampleRateHertz(int value) {
105 m_mediaSampleRateHertzHasBeenSet = true;
106 m_mediaSampleRateHertz = value;
107 }
110 return *this;
111 }
113
115
123 inline MediaEncoding GetMediaEncoding() const { return m_mediaEncoding; }
124 inline bool MediaEncodingHasBeenSet() const { return m_mediaEncodingHasBeenSet; }
125 inline void SetMediaEncoding(MediaEncoding value) {
126 m_mediaEncodingHasBeenSet = true;
127 m_mediaEncoding = value;
128 }
130 SetMediaEncoding(value);
131 return *this;
132 }
134
136
150 inline const Aws::String& GetVocabularyName() const { return m_vocabularyName; }
151 inline bool VocabularyNameHasBeenSet() const { return m_vocabularyNameHasBeenSet; }
152 template <typename VocabularyNameT = Aws::String>
153 void SetVocabularyName(VocabularyNameT&& value) {
154 m_vocabularyNameHasBeenSet = true;
155 m_vocabularyName = std::forward<VocabularyNameT>(value);
156 }
157 template <typename VocabularyNameT = Aws::String>
159 SetVocabularyName(std::forward<VocabularyNameT>(value));
160 return *this;
161 }
163
165
170 inline const Aws::String& GetSessionId() const { return m_sessionId; }
171 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
172 template <typename SessionIdT = Aws::String>
173 void SetSessionId(SessionIdT&& value) {
174 m_sessionIdHasBeenSet = true;
175 m_sessionId = std::forward<SessionIdT>(value);
176 }
177 template <typename SessionIdT = Aws::String>
179 SetSessionId(std::forward<SessionIdT>(value));
180 return *this;
181 }
183
185
191 AWS_TRANSCRIBESTREAMINGSERVICE_API std::shared_ptr<AudioStream> GetAudioStream() const { return m_audioStream; }
192 AWS_TRANSCRIBESTREAMINGSERVICE_API void SetAudioStream(const std::shared_ptr<AudioStream>& value) {
193 m_audioStreamHasBeenSet = true;
194 m_audioStream = value;
195 }
196 AWS_TRANSCRIBESTREAMINGSERVICE_API StartStreamTranscriptionRequest& WithAudioStream(const std::shared_ptr<AudioStream>& value) {
197 SetAudioStream(value);
198 return *this;
199 }
200
202
204
218 inline const Aws::String& GetVocabularyFilterName() const { return m_vocabularyFilterName; }
219 inline bool VocabularyFilterNameHasBeenSet() const { return m_vocabularyFilterNameHasBeenSet; }
220 template <typename VocabularyFilterNameT = Aws::String>
221 void SetVocabularyFilterName(VocabularyFilterNameT&& value) {
222 m_vocabularyFilterNameHasBeenSet = true;
223 m_vocabularyFilterName = std::forward<VocabularyFilterNameT>(value);
224 }
225 template <typename VocabularyFilterNameT = Aws::String>
227 SetVocabularyFilterName(std::forward<VocabularyFilterNameT>(value));
228 return *this;
229 }
231
233
239 inline VocabularyFilterMethod GetVocabularyFilterMethod() const { return m_vocabularyFilterMethod; }
240 inline bool VocabularyFilterMethodHasBeenSet() const { return m_vocabularyFilterMethodHasBeenSet; }
242 m_vocabularyFilterMethodHasBeenSet = true;
243 m_vocabularyFilterMethod = value;
244 }
247 return *this;
248 }
250
252
259 inline bool GetShowSpeakerLabel() const { return m_showSpeakerLabel; }
260 inline bool ShowSpeakerLabelHasBeenSet() const { return m_showSpeakerLabelHasBeenSet; }
261 inline void SetShowSpeakerLabel(bool value) {
262 m_showSpeakerLabelHasBeenSet = true;
263 m_showSpeakerLabel = value;
264 }
266 SetShowSpeakerLabel(value);
267 return *this;
268 }
270
272
284 inline bool GetEnableChannelIdentification() const { return m_enableChannelIdentification; }
285 inline bool EnableChannelIdentificationHasBeenSet() const { return m_enableChannelIdentificationHasBeenSet; }
286 inline void SetEnableChannelIdentification(bool value) {
287 m_enableChannelIdentificationHasBeenSet = true;
288 m_enableChannelIdentification = value;
289 }
292 return *this;
293 }
295
297
304 inline int GetNumberOfChannels() const { return m_numberOfChannels; }
305 inline bool NumberOfChannelsHasBeenSet() const { return m_numberOfChannelsHasBeenSet; }
306 inline void SetNumberOfChannels(int value) {
307 m_numberOfChannelsHasBeenSet = true;
308 m_numberOfChannels = value;
309 }
311 SetNumberOfChannels(value);
312 return *this;
313 }
315
317
324 inline bool GetEnablePartialResultsStabilization() const { return m_enablePartialResultsStabilization; }
325 inline bool EnablePartialResultsStabilizationHasBeenSet() const { return m_enablePartialResultsStabilizationHasBeenSet; }
326 inline void SetEnablePartialResultsStabilization(bool value) {
327 m_enablePartialResultsStabilizationHasBeenSet = true;
328 m_enablePartialResultsStabilization = value;
329 }
332 return *this;
333 }
335
337
345 inline PartialResultsStability GetPartialResultsStability() const { return m_partialResultsStability; }
346 inline bool PartialResultsStabilityHasBeenSet() const { return m_partialResultsStabilityHasBeenSet; }
348 m_partialResultsStabilityHasBeenSet = true;
349 m_partialResultsStability = value;
350 }
353 return *this;
354 }
356
358
370 inline ContentIdentificationType GetContentIdentificationType() const { return m_contentIdentificationType; }
371 inline bool ContentIdentificationTypeHasBeenSet() const { return m_contentIdentificationTypeHasBeenSet; }
373 m_contentIdentificationTypeHasBeenSet = true;
374 m_contentIdentificationType = value;
375 }
378 return *this;
379 }
381
383
395 inline ContentRedactionType GetContentRedactionType() const { return m_contentRedactionType; }
396 inline bool ContentRedactionTypeHasBeenSet() const { return m_contentRedactionTypeHasBeenSet; }
398 m_contentRedactionTypeHasBeenSet = true;
399 m_contentRedactionType = value;
400 }
403 return *this;
404 }
406
408
423 inline const Aws::String& GetPiiEntityTypes() const { return m_piiEntityTypes; }
424 inline bool PiiEntityTypesHasBeenSet() const { return m_piiEntityTypesHasBeenSet; }
425 template <typename PiiEntityTypesT = Aws::String>
426 void SetPiiEntityTypes(PiiEntityTypesT&& value) {
427 m_piiEntityTypesHasBeenSet = true;
428 m_piiEntityTypes = std::forward<PiiEntityTypesT>(value);
429 }
430 template <typename PiiEntityTypesT = Aws::String>
432 SetPiiEntityTypes(std::forward<PiiEntityTypesT>(value));
433 return *this;
434 }
436
438
448 inline const Aws::String& GetLanguageModelName() const { return m_languageModelName; }
449 inline bool LanguageModelNameHasBeenSet() const { return m_languageModelNameHasBeenSet; }
450 template <typename LanguageModelNameT = Aws::String>
451 void SetLanguageModelName(LanguageModelNameT&& value) {
452 m_languageModelNameHasBeenSet = true;
453 m_languageModelName = std::forward<LanguageModelNameT>(value);
454 }
455 template <typename LanguageModelNameT = Aws::String>
457 SetLanguageModelName(std::forward<LanguageModelNameT>(value));
458 return *this;
459 }
461
463
479 inline bool GetIdentifyLanguage() const { return m_identifyLanguage; }
480 inline bool IdentifyLanguageHasBeenSet() const { return m_identifyLanguageHasBeenSet; }
481 inline void SetIdentifyLanguage(bool value) {
482 m_identifyLanguageHasBeenSet = true;
483 m_identifyLanguage = value;
484 }
486 SetIdentifyLanguage(value);
487 return *this;
488 }
490
492
505 inline const Aws::String& GetLanguageOptions() const { return m_languageOptions; }
506 inline bool LanguageOptionsHasBeenSet() const { return m_languageOptionsHasBeenSet; }
507 template <typename LanguageOptionsT = Aws::String>
508 void SetLanguageOptions(LanguageOptionsT&& value) {
509 m_languageOptionsHasBeenSet = true;
510 m_languageOptions = std::forward<LanguageOptionsT>(value);
511 }
512 template <typename LanguageOptionsT = Aws::String>
514 SetLanguageOptions(std::forward<LanguageOptionsT>(value));
515 return *this;
516 }
518
520
526 inline LanguageCode GetPreferredLanguage() const { return m_preferredLanguage; }
527 inline bool PreferredLanguageHasBeenSet() const { return m_preferredLanguageHasBeenSet; }
529 m_preferredLanguageHasBeenSet = true;
530 m_preferredLanguage = value;
531 }
534 return *this;
535 }
537
539
553 inline bool GetIdentifyMultipleLanguages() const { return m_identifyMultipleLanguages; }
554 inline bool IdentifyMultipleLanguagesHasBeenSet() const { return m_identifyMultipleLanguagesHasBeenSet; }
555 inline void SetIdentifyMultipleLanguages(bool value) {
556 m_identifyMultipleLanguagesHasBeenSet = true;
557 m_identifyMultipleLanguages = value;
558 }
561 return *this;
562 }
564
566
579 inline const Aws::String& GetVocabularyNames() const { return m_vocabularyNames; }
580 inline bool VocabularyNamesHasBeenSet() const { return m_vocabularyNamesHasBeenSet; }
581 template <typename VocabularyNamesT = Aws::String>
582 void SetVocabularyNames(VocabularyNamesT&& value) {
583 m_vocabularyNamesHasBeenSet = true;
584 m_vocabularyNames = std::forward<VocabularyNamesT>(value);
585 }
586 template <typename VocabularyNamesT = Aws::String>
588 SetVocabularyNames(std::forward<VocabularyNamesT>(value));
589 return *this;
590 }
592
594
608 inline const Aws::String& GetVocabularyFilterNames() const { return m_vocabularyFilterNames; }
609 inline bool VocabularyFilterNamesHasBeenSet() const { return m_vocabularyFilterNamesHasBeenSet; }
610 template <typename VocabularyFilterNamesT = Aws::String>
611 void SetVocabularyFilterNames(VocabularyFilterNamesT&& value) {
612 m_vocabularyFilterNamesHasBeenSet = true;
613 m_vocabularyFilterNames = std::forward<VocabularyFilterNamesT>(value);
614 }
615 template <typename VocabularyFilterNamesT = Aws::String>
617 SetVocabularyFilterNames(std::forward<VocabularyFilterNamesT>(value));
618 return *this;
619 }
621 private:
622 LanguageCode m_languageCode{LanguageCode::NOT_SET};
623
624 int m_mediaSampleRateHertz{0};
625
626 MediaEncoding m_mediaEncoding{MediaEncoding::NOT_SET};
627
628 Aws::String m_vocabularyName;
629
630 Aws::String m_sessionId;
631
632 std::shared_ptr<AudioStream> m_audioStream;
633
634 Aws::String m_vocabularyFilterName;
635
637
638 bool m_showSpeakerLabel{false};
639
640 bool m_enableChannelIdentification{false};
641
642 int m_numberOfChannels{0};
643
644 bool m_enablePartialResultsStabilization{false};
645
647
649
651
652 Aws::String m_piiEntityTypes;
653
654 Aws::String m_languageModelName;
655
656 bool m_identifyLanguage{false};
657
658 Aws::String m_languageOptions;
659
660 LanguageCode m_preferredLanguage{LanguageCode::NOT_SET};
661
662 bool m_identifyMultipleLanguages{false};
663
664 Aws::String m_vocabularyNames;
665
666 Aws::String m_vocabularyFilterNames;
667 StartStreamTranscriptionHandler m_handler;
668 Aws::Utils::Event::EventStreamDecoder m_decoder{Utils::Event::EventStreamDecoder(&m_handler)};
669
670 bool m_languageCodeHasBeenSet = false;
671 bool m_mediaSampleRateHertzHasBeenSet = false;
672 bool m_mediaEncodingHasBeenSet = false;
673 bool m_vocabularyNameHasBeenSet = false;
674 bool m_sessionIdHasBeenSet = false;
675 bool m_audioStreamHasBeenSet = false;
676 bool m_vocabularyFilterNameHasBeenSet = false;
677 bool m_vocabularyFilterMethodHasBeenSet = false;
678 bool m_showSpeakerLabelHasBeenSet = false;
679 bool m_enableChannelIdentificationHasBeenSet = false;
680 bool m_numberOfChannelsHasBeenSet = false;
681 bool m_enablePartialResultsStabilizationHasBeenSet = false;
682 bool m_partialResultsStabilityHasBeenSet = false;
683 bool m_contentIdentificationTypeHasBeenSet = false;
684 bool m_contentRedactionTypeHasBeenSet = false;
685 bool m_piiEntityTypesHasBeenSet = false;
686 bool m_languageModelNameHasBeenSet = false;
687 bool m_identifyLanguageHasBeenSet = false;
688 bool m_languageOptionsHasBeenSet = false;
689 bool m_preferredLanguageHasBeenSet = false;
690 bool m_identifyMultipleLanguagesHasBeenSet = false;
691 bool m_vocabularyNamesHasBeenSet = false;
692 bool m_vocabularyFilterNamesHasBeenSet = false;
693};
694
695} // namespace Model
696} // namespace TranscribeStreamingService
697} // namespace Aws
AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
StartStreamTranscriptionRequest & WithVocabularyFilterNames(VocabularyFilterNamesT &&value)
AWS_TRANSCRIBESTREAMINGSERVICE_API StartStreamTranscriptionRequest & WithAudioStream(const std::shared_ptr< AudioStream > &value)
AWS_TRANSCRIBESTREAMINGSERVICE_API StartStreamTranscriptionRequest()=default
StartStreamTranscriptionRequest & WithPiiEntityTypes(PiiEntityTypesT &&value)
StartStreamTranscriptionRequest & WithContentIdentificationType(ContentIdentificationType value)
StartStreamTranscriptionRequest & WithContentRedactionType(ContentRedactionType value)
StartStreamTranscriptionRequest & WithPartialResultsStability(PartialResultsStability value)
StartStreamTranscriptionRequest & WithVocabularyNames(VocabularyNamesT &&value)
StartStreamTranscriptionRequest & WithLanguageModelName(LanguageModelNameT &&value)
AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::String SerializePayload() const override
AWS_TRANSCRIBESTREAMINGSERVICE_API void SetAudioStream(const std::shared_ptr< AudioStream > &value)
StartStreamTranscriptionRequest & WithEventStreamHandler(const StartStreamTranscriptionHandler &value)
StartStreamTranscriptionRequest & WithVocabularyName(VocabularyNameT &&value)
AWS_TRANSCRIBESTREAMINGSERVICE_API std::shared_ptr< Aws::IOStream > GetBody() const override
StartStreamTranscriptionRequest & WithVocabularyFilterMethod(VocabularyFilterMethod value)
StartStreamTranscriptionRequest & WithVocabularyFilterName(VocabularyFilterNameT &&value)
AWS_TRANSCRIBESTREAMINGSERVICE_API std::shared_ptr< AudioStream > GetAudioStream() const
StartStreamTranscriptionRequest & WithLanguageOptions(LanguageOptionsT &&value)
void ResetEventStreamHandler(EventStreamHandler *handler)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String