8#include <aws/text-to-speech/TextToSpeech_EXPORTS.h>
9#include <aws/text-to-speech/PCMOutputDriver.h>
10#include <aws/polly/PollyClient.h>
11#include <aws/core/client/AsyncCallerContext.h>
18 namespace TextToSpeech
46 class AWS_TEXT_TO_SPEECH_API
TextToSpeechManager :
public std::enable_shared_from_this<TextToSpeechManager>
53 static std::shared_ptr<TextToSpeechManager>
Create(
const std::shared_ptr<Polly::PollyClient>& pollyClient,
54 const std::shared_ptr<PCMOutputDriverFactory>& driverFactory =
nullptr);
94 const std::shared_ptr<PCMOutputDriverFactory>& driverFactory);
100 std::shared_ptr<PCMOutputDriver> m_activeDriver;
102 std::atomic<Polly::Model::VoiceId> m_activeVoice;
104 mutable std::mutex m_driverLock;
TextToSpeechManager & operator=(TextToSpeechManager &&)=delete
void SetActiveDevice(const std::shared_ptr< PCMOutputDriver > &, const DeviceInfo &, const CapabilityInfo &)
TextToSpeechManager(const TextToSpeechManager &)=delete
OutputDeviceList EnumerateDevices() const
TextToSpeechManager & operator=(const TextToSpeechManager &)=delete
void SendTextToOutputDevice(const char *text, SendTextCompletedHandler callback)
Aws::Vector< std::pair< Aws::String, Aws::String > > ListAvailableVoices() const
TextToSpeechManager(TextToSpeechManager &&)=delete
void SetActiveVoice(const Aws::String &voice)
static std::shared_ptr< TextToSpeechManager > Create(const std::shared_ptr< Polly::PollyClient > &pollyClient, const std::shared_ptr< PCMOutputDriverFactory > &driverFactory=nullptr)
Aws::Vector< OutputDevicePair > OutputDeviceList
std::function< void(const char *, const Polly::Model::SynthesizeSpeechOutcome &, bool)> SendTextCompletedHandler
std::pair< DeviceInfo, std::shared_ptr< PCMOutputDriver > > OutputDevicePair
static const size_t BUFF_SIZE
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector