/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace TranscribeStreamingService { namespace Model { /** */ class AWS_TRANSCRIBESTREAMINGSERVICE_API StartStreamTranscriptionRequest : public TranscribeStreamingServiceRequest { public: StartStreamTranscriptionRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "StartStreamTranscription"; } inline virtual bool IsEventStreamRequest() const override { return true; } // SerializePayload will not be invoked. // This request is sent by encoding its data in event-streams which is sent as IOStream via GetBody() Aws::String SerializePayload() const override { return {}; } std::shared_ptr GetBody() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * Underlying Event Stream Decoder. */ inline Aws::Utils::Event::EventStreamDecoder& GetEventStreamDecoder() { return m_decoder; } /** * Underlying Event Stream Handler which is used to define callback functions. */ inline const StartStreamTranscriptionHandler& GetEventStreamHandler() const { return m_handler; } /** * Underlying Event Stream Handler which is used to define callback functions. */ inline void SetEventStreamHandler(const StartStreamTranscriptionHandler& value) { m_handler = value; m_decoder.ResetEventStreamHandler(&m_handler); } /** * Underlying Event Stream Handler which is used to define callback functions. */ inline StartStreamTranscriptionRequest& WithEventStreamHandler(const StartStreamTranscriptionHandler& value) { SetEventStreamHandler(value); return *this; } /** *

Indicates the source language used in the input audio stream.

*/ inline const LanguageCode& GetLanguageCode() const{ return m_languageCode; } /** *

Indicates the source language used in the input audio stream.

*/ inline bool LanguageCodeHasBeenSet() const { return m_languageCodeHasBeenSet; } /** *

Indicates the source language used in the input audio stream.

*/ inline void SetLanguageCode(const LanguageCode& value) { m_languageCodeHasBeenSet = true; m_languageCode = value; } /** *

Indicates the source language used in the input audio stream.

*/ inline void SetLanguageCode(LanguageCode&& value) { m_languageCodeHasBeenSet = true; m_languageCode = std::move(value); } /** *

Indicates the source language used in the input audio stream.

*/ inline StartStreamTranscriptionRequest& WithLanguageCode(const LanguageCode& value) { SetLanguageCode(value); return *this;} /** *

Indicates the source language used in the input audio stream.

*/ inline StartStreamTranscriptionRequest& WithLanguageCode(LanguageCode&& value) { SetLanguageCode(std::move(value)); return *this;} /** *

The sample rate, in Hertz, of the input audio. We suggest that you use 8000 * Hz for low quality audio and 16000 Hz for high quality audio.

*/ inline int GetMediaSampleRateHertz() const{ return m_mediaSampleRateHertz; } /** *

The sample rate, in Hertz, of the input audio. We suggest that you use 8000 * Hz for low quality audio and 16000 Hz for high quality audio.

*/ inline bool MediaSampleRateHertzHasBeenSet() const { return m_mediaSampleRateHertzHasBeenSet; } /** *

The sample rate, in Hertz, of the input audio. We suggest that you use 8000 * Hz for low quality audio and 16000 Hz for high quality audio.

*/ inline void SetMediaSampleRateHertz(int value) { m_mediaSampleRateHertzHasBeenSet = true; m_mediaSampleRateHertz = value; } /** *

The sample rate, in Hertz, of the input audio. We suggest that you use 8000 * Hz for low quality audio and 16000 Hz for high quality audio.

*/ inline StartStreamTranscriptionRequest& WithMediaSampleRateHertz(int value) { SetMediaSampleRateHertz(value); return *this;} /** *

The encoding used for the input audio. pcm is the only valid * value.

*/ inline const MediaEncoding& GetMediaEncoding() const{ return m_mediaEncoding; } /** *

The encoding used for the input audio. pcm is the only valid * value.

*/ inline bool MediaEncodingHasBeenSet() const { return m_mediaEncodingHasBeenSet; } /** *

The encoding used for the input audio. pcm is the only valid * value.

*/ inline void SetMediaEncoding(const MediaEncoding& value) { m_mediaEncodingHasBeenSet = true; m_mediaEncoding = value; } /** *

The encoding used for the input audio. pcm is the only valid * value.

*/ inline void SetMediaEncoding(MediaEncoding&& value) { m_mediaEncodingHasBeenSet = true; m_mediaEncoding = std::move(value); } /** *

The encoding used for the input audio. pcm is the only valid * value.

*/ inline StartStreamTranscriptionRequest& WithMediaEncoding(const MediaEncoding& value) { SetMediaEncoding(value); return *this;} /** *

The encoding used for the input audio. pcm is the only valid * value.

*/ inline StartStreamTranscriptionRequest& WithMediaEncoding(MediaEncoding&& value) { SetMediaEncoding(std::move(value)); return *this;} /** *

The name of the vocabulary to use when processing the transcription job.

*/ inline const Aws::String& GetVocabularyName() const{ return m_vocabularyName; } /** *

The name of the vocabulary to use when processing the transcription job.

*/ inline bool VocabularyNameHasBeenSet() const { return m_vocabularyNameHasBeenSet; } /** *

The name of the vocabulary to use when processing the transcription job.

*/ inline void SetVocabularyName(const Aws::String& value) { m_vocabularyNameHasBeenSet = true; m_vocabularyName = value; } /** *

The name of the vocabulary to use when processing the transcription job.

*/ inline void SetVocabularyName(Aws::String&& value) { m_vocabularyNameHasBeenSet = true; m_vocabularyName = std::move(value); } /** *

The name of the vocabulary to use when processing the transcription job.

*/ inline void SetVocabularyName(const char* value) { m_vocabularyNameHasBeenSet = true; m_vocabularyName.assign(value); } /** *

The name of the vocabulary to use when processing the transcription job.

*/ inline StartStreamTranscriptionRequest& WithVocabularyName(const Aws::String& value) { SetVocabularyName(value); return *this;} /** *

The name of the vocabulary to use when processing the transcription job.

*/ inline StartStreamTranscriptionRequest& WithVocabularyName(Aws::String&& value) { SetVocabularyName(std::move(value)); return *this;} /** *

The name of the vocabulary to use when processing the transcription job.

*/ inline StartStreamTranscriptionRequest& WithVocabularyName(const char* value) { SetVocabularyName(value); return *this;} /** *

A identifier for the transcription session. Use this parameter when you want * to retry a session. If you don't provide a session ID, Amazon Transcribe will * generate one for you and return it in the response.

*/ inline const Aws::String& GetSessionId() const{ return m_sessionId; } /** *

A identifier for the transcription session. Use this parameter when you want * to retry a session. If you don't provide a session ID, Amazon Transcribe will * generate one for you and return it in the response.

*/ inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; } /** *

A identifier for the transcription session. Use this parameter when you want * to retry a session. If you don't provide a session ID, Amazon Transcribe will * generate one for you and return it in the response.

*/ inline void SetSessionId(const Aws::String& value) { m_sessionIdHasBeenSet = true; m_sessionId = value; } /** *

A identifier for the transcription session. Use this parameter when you want * to retry a session. If you don't provide a session ID, Amazon Transcribe will * generate one for you and return it in the response.

*/ inline void SetSessionId(Aws::String&& value) { m_sessionIdHasBeenSet = true; m_sessionId = std::move(value); } /** *

A identifier for the transcription session. Use this parameter when you want * to retry a session. If you don't provide a session ID, Amazon Transcribe will * generate one for you and return it in the response.

*/ inline void SetSessionId(const char* value) { m_sessionIdHasBeenSet = true; m_sessionId.assign(value); } /** *

A identifier for the transcription session. Use this parameter when you want * to retry a session. If you don't provide a session ID, Amazon Transcribe will * generate one for you and return it in the response.

*/ inline StartStreamTranscriptionRequest& WithSessionId(const Aws::String& value) { SetSessionId(value); return *this;} /** *

A identifier for the transcription session. Use this parameter when you want * to retry a session. If you don't provide a session ID, Amazon Transcribe will * generate one for you and return it in the response.

*/ inline StartStreamTranscriptionRequest& WithSessionId(Aws::String&& value) { SetSessionId(std::move(value)); return *this;} /** *

A identifier for the transcription session. Use this parameter when you want * to retry a session. If you don't provide a session ID, Amazon Transcribe will * generate one for you and return it in the response.

*/ inline StartStreamTranscriptionRequest& WithSessionId(const char* value) { SetSessionId(value); return *this;} /** *

PCM-encoded stream of audio blobs. The audio stream is encoded as an HTTP2 * data frame.

*/ std::shared_ptr GetAudioStream() const { return m_audioStream; } /** *

PCM-encoded stream of audio blobs. The audio stream is encoded as an HTTP2 * data frame.

*/ void SetAudioStream(const std::shared_ptr& value) { m_audioStream = value; } /** *

PCM-encoded stream of audio blobs. The audio stream is encoded as an HTTP2 * data frame.

*/ StartStreamTranscriptionRequest& WithAudioStream(const std::shared_ptr& value) { SetAudioStream(value); return *this;} /** *

The name of the vocabulary filter you've created that is unique to your AWS * account. Provide the name in this field to successfully use it in a stream.

*/ inline const Aws::String& GetVocabularyFilterName() const{ return m_vocabularyFilterName; } /** *

The name of the vocabulary filter you've created that is unique to your AWS * account. Provide the name in this field to successfully use it in a stream.

*/ inline bool VocabularyFilterNameHasBeenSet() const { return m_vocabularyFilterNameHasBeenSet; } /** *

The name of the vocabulary filter you've created that is unique to your AWS * account. Provide the name in this field to successfully use it in a stream.

*/ inline void SetVocabularyFilterName(const Aws::String& value) { m_vocabularyFilterNameHasBeenSet = true; m_vocabularyFilterName = value; } /** *

The name of the vocabulary filter you've created that is unique to your AWS * account. Provide the name in this field to successfully use it in a stream.

*/ inline void SetVocabularyFilterName(Aws::String&& value) { m_vocabularyFilterNameHasBeenSet = true; m_vocabularyFilterName = std::move(value); } /** *

The name of the vocabulary filter you've created that is unique to your AWS * account. Provide the name in this field to successfully use it in a stream.

*/ inline void SetVocabularyFilterName(const char* value) { m_vocabularyFilterNameHasBeenSet = true; m_vocabularyFilterName.assign(value); } /** *

The name of the vocabulary filter you've created that is unique to your AWS * account. Provide the name in this field to successfully use it in a stream.

*/ inline StartStreamTranscriptionRequest& WithVocabularyFilterName(const Aws::String& value) { SetVocabularyFilterName(value); return *this;} /** *

The name of the vocabulary filter you've created that is unique to your AWS * account. Provide the name in this field to successfully use it in a stream.

*/ inline StartStreamTranscriptionRequest& WithVocabularyFilterName(Aws::String&& value) { SetVocabularyFilterName(std::move(value)); return *this;} /** *

The name of the vocabulary filter you've created that is unique to your AWS * account. Provide the name in this field to successfully use it in a stream.

*/ inline StartStreamTranscriptionRequest& WithVocabularyFilterName(const char* value) { SetVocabularyFilterName(value); return *this;} /** *

The manner in which you use your vocabulary filter to filter words in your * transcript. Remove removes filtered words from your transcription * results. Mask masks those words with a *** in your * transcription results. Tag keeps the filtered words in your * transcription results and tags them. The tag appears as * VocabularyFilterMatch equal to True

*/ inline const VocabularyFilterMethod& GetVocabularyFilterMethod() const{ return m_vocabularyFilterMethod; } /** *

The manner in which you use your vocabulary filter to filter words in your * transcript. Remove removes filtered words from your transcription * results. Mask masks those words with a *** in your * transcription results. Tag keeps the filtered words in your * transcription results and tags them. The tag appears as * VocabularyFilterMatch equal to True

*/ inline bool VocabularyFilterMethodHasBeenSet() const { return m_vocabularyFilterMethodHasBeenSet; } /** *

The manner in which you use your vocabulary filter to filter words in your * transcript. Remove removes filtered words from your transcription * results. Mask masks those words with a *** in your * transcription results. Tag keeps the filtered words in your * transcription results and tags them. The tag appears as * VocabularyFilterMatch equal to True

*/ inline void SetVocabularyFilterMethod(const VocabularyFilterMethod& value) { m_vocabularyFilterMethodHasBeenSet = true; m_vocabularyFilterMethod = value; } /** *

The manner in which you use your vocabulary filter to filter words in your * transcript. Remove removes filtered words from your transcription * results. Mask masks those words with a *** in your * transcription results. Tag keeps the filtered words in your * transcription results and tags them. The tag appears as * VocabularyFilterMatch equal to True

*/ inline void SetVocabularyFilterMethod(VocabularyFilterMethod&& value) { m_vocabularyFilterMethodHasBeenSet = true; m_vocabularyFilterMethod = std::move(value); } /** *

The manner in which you use your vocabulary filter to filter words in your * transcript. Remove removes filtered words from your transcription * results. Mask masks those words with a *** in your * transcription results. Tag keeps the filtered words in your * transcription results and tags them. The tag appears as * VocabularyFilterMatch equal to True

*/ inline StartStreamTranscriptionRequest& WithVocabularyFilterMethod(const VocabularyFilterMethod& value) { SetVocabularyFilterMethod(value); return *this;} /** *

The manner in which you use your vocabulary filter to filter words in your * transcript. Remove removes filtered words from your transcription * results. Mask masks those words with a *** in your * transcription results. Tag keeps the filtered words in your * transcription results and tags them. The tag appears as * VocabularyFilterMatch equal to True

*/ inline StartStreamTranscriptionRequest& WithVocabularyFilterMethod(VocabularyFilterMethod&& value) { SetVocabularyFilterMethod(std::move(value)); return *this;} /** *

When true, enables speaker identification in your real-time * stream.

*/ inline bool GetShowSpeakerLabel() const{ return m_showSpeakerLabel; } /** *

When true, enables speaker identification in your real-time * stream.

*/ inline bool ShowSpeakerLabelHasBeenSet() const { return m_showSpeakerLabelHasBeenSet; } /** *

When true, enables speaker identification in your real-time * stream.

*/ inline void SetShowSpeakerLabel(bool value) { m_showSpeakerLabelHasBeenSet = true; m_showSpeakerLabel = value; } /** *

When true, enables speaker identification in your real-time * stream.

*/ inline StartStreamTranscriptionRequest& WithShowSpeakerLabel(bool value) { SetShowSpeakerLabel(value); return *this;} private: LanguageCode m_languageCode; bool m_languageCodeHasBeenSet; int m_mediaSampleRateHertz; bool m_mediaSampleRateHertzHasBeenSet; MediaEncoding m_mediaEncoding; bool m_mediaEncodingHasBeenSet; Aws::String m_vocabularyName; bool m_vocabularyNameHasBeenSet; Aws::String m_sessionId; bool m_sessionIdHasBeenSet; std::shared_ptr m_audioStream; Aws::String m_vocabularyFilterName; bool m_vocabularyFilterNameHasBeenSet; VocabularyFilterMethod m_vocabularyFilterMethod; bool m_vocabularyFilterMethodHasBeenSet; bool m_showSpeakerLabel; bool m_showSpeakerLabelHasBeenSet; Aws::Utils::Event::EventStreamDecoder m_decoder; StartStreamTranscriptionHandler m_handler; }; } // namespace Model } // namespace TranscribeStreamingService } // namespace Aws