AWS SDK for C++

AWS SDK for C++ Version 1.11.747

Loading...
Searching...
No Matches
AudioStream.h
1
6#pragma once
7#include <aws/core/utils/event/EventStream.h>
8#include <aws/transcribestreaming/TranscribeStreamingService_EXPORTS.h>
9#include <aws/transcribestreaming/model/AudioEvent.h>
10#include <aws/transcribestreaming/model/ConfigurationEvent.h>
11
12#include <utility>
13
14namespace Aws {
15namespace TranscribeStreamingService {
16namespace Model {
17
26class AWS_TRANSCRIBESTREAMINGSERVICE_API AudioStream : public Aws::Utils::Event::EventEncoderStream {
27 public:
30 if (!value.GetAudioChunk().empty()) {
31 msg.InsertEventHeader(":message-type", Aws::String("event"));
32 msg.InsertEventHeader(":event-type", Aws::String("AudioEvent"));
33 msg.InsertEventHeader(":content-type", Aws::String("application/octet-stream"));
35 }
36 WriteEvent(msg);
37 return *this;
38 }
41 msg.InsertEventHeader(":message-type", Aws::String("event"));
42 msg.InsertEventHeader(":event-type", Aws::String("ConfigurationEvent"));
43 msg.InsertEventHeader(":content-type", Aws::String("application/json"));
45 WriteEvent(msg);
46 return *this;
47 }
48};
49
50} // namespace Model
51} // namespace TranscribeStreamingService
52} // namespace Aws
const Aws::Vector< unsigned char > & GetAudioChunk() const
Definition AudioEvent.h:41
AudioStream & WriteConfigurationEvent(const ConfigurationEvent &value)
Definition AudioStream.h:39
AudioStream & WriteAudioEvent(const AudioEvent &value)
Definition AudioStream.h:28
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