AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
AudioStream.h
1
6#pragma once
7#include <aws/transcribestreaming/TranscribeStreamingService_EXPORTS.h>
8#include <aws/transcribestreaming/model/AudioEvent.h>
9#include <aws/transcribestreaming/model/ConfigurationEvent.h>
10#include <utility>
11#include <aws/core/utils/event/EventStream.h>
12
13namespace Aws
14{
15namespace TranscribeStreamingService
16{
17namespace Model
18{
19
28 class AWS_TRANSCRIBESTREAMINGSERVICE_API AudioStream : public Aws::Utils::Event::EventEncoderStream
29 {
30 public:
32 {
34 if(!value.GetAudioChunk().empty())
35 {
36 msg.InsertEventHeader(":message-type", Aws::String("event"));
37 msg.InsertEventHeader(":event-type", Aws::String("AudioEvent"));
38 msg.InsertEventHeader(":content-type", Aws::String("application/octet-stream"));
40 }
41 WriteEvent(msg);
42 return *this;
43 }
45 {
47 msg.InsertEventHeader(":message-type", Aws::String("event"));
48 msg.InsertEventHeader(":event-type", Aws::String("ConfigurationEvent"));
49 msg.InsertEventHeader(":content-type", Aws::String("application/json"));
51 WriteEvent(msg);
52 return *this;
53 }
54
55 };
56
57} // namespace Model
58} // namespace TranscribeStreamingService
59} // namespace Aws
const Aws::Vector< unsigned char > & GetAudioChunk() const
Definition AudioEvent.h:37
AudioStream & WriteConfigurationEvent(const ConfigurationEvent &value)
Definition AudioStream.h:44
AudioStream & WriteAudioEvent(const AudioEvent &value)
Definition AudioStream.h:31
AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const
void WriteEventPayload(const unsigned char *data, size_t length)
void InsertEventHeader(const Aws::String &headerName, const EventHeaderValue &eventHeaderValue)
Aws::String WriteCompact(bool treatAsObject=true) const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String