AWS SDK for C++  1.9.44
AWS SDK for C++
Public Member Functions | Static Public Member Functions | List of all members
Aws::TextToSpeech::TextToSpeechManager Class Reference

#include <TextToSpeechManager.h>

+ Inheritance diagram for Aws::TextToSpeech::TextToSpeechManager:

Public Member Functions

 ~TextToSpeechManager ()
 TextToSpeechManager (const TextToSpeechManager &)=delete
TextToSpeechManageroperator= (const TextToSpeechManager &)=delete
 TextToSpeechManager (TextToSpeechManager &&)=delete
TextToSpeechManageroperator= (TextToSpeechManager &&)=delete
void SendTextToOutputDevice (const char *text, SendTextCompletedHandler callback)
OutputDeviceList EnumerateDevices () const
void SetActiveDevice (const std::shared_ptr< PCMOutputDriver > &, const DeviceInfo &, const CapabilityInfo &)
Aws::Vector< std::pair< Aws::String, Aws::String > > ListAvailableVoices () const
void SetActiveVoice (const Aws::String &voice)

Static Public Member Functions

static std::shared_ptr< TextToSpeechManagerCreate (const std::shared_ptr< Polly::PollyClient > &pollyClient, const std::shared_ptr< PCMOutputDriverFactory > &driverFactory=nullptr)

Detailed Description

Manager for rendering text to the Polly service and then sending directly to an audio driver. By default this uses our best guess at the correct drivers for you operating system. On windows, this is the WaveOut API. On Linux, this is PulseAudio On Apple, this is CoreAudio.

The drivers used can be arbitrarily overridden to send the stream anywhere you want. Simply provide your own driverFactory implementation.

Definition at line 46 of file TextToSpeechManager.h.

Constructor & Destructor Documentation

◆ ~TextToSpeechManager()

Aws::TextToSpeech::TextToSpeechManager::~TextToSpeechManager ( )

◆ TextToSpeechManager() [1/2]

Aws::TextToSpeech::TextToSpeechManager::TextToSpeechManager ( const TextToSpeechManager )

◆ TextToSpeechManager() [2/2]

Aws::TextToSpeech::TextToSpeechManager::TextToSpeechManager ( TextToSpeechManager &&  )

Member Function Documentation

◆ Create()

static std::shared_ptr<TextToSpeechManager> Aws::TextToSpeech::TextToSpeechManager::Create ( const std::shared_ptr< Polly::PollyClient > &  pollyClient,
const std::shared_ptr< PCMOutputDriverFactory > &  driverFactory = nullptr 

Create a TextToSpeechManager instance initialized with a polly client and a driver factory. If driver factory is nullptr, we will create a default implementation for your operating system.

◆ EnumerateDevices()

OutputDeviceList Aws::TextToSpeech::TextToSpeechManager::EnumerateDevices ( ) const

Enumerate all devices and their capabilities from the installed drivers. On some operating systems, the ability to choose devices is limited. On windows, this will be more detailed. Call this function to determine what to pass to SetActiveDevice().

◆ ListAvailableVoices()

Aws::Vector<std::pair<Aws::String, Aws::String> > Aws::TextToSpeech::TextToSpeechManager::ListAvailableVoices ( ) const

Lists all available voices and their language. You can use this function to determine what to pass to the SetActiveVoice() function. The first member of the pair is the voice, the second is the language.

◆ operator=() [1/2]

TextToSpeechManager& Aws::TextToSpeech::TextToSpeechManager::operator= ( const TextToSpeechManager )

◆ operator=() [2/2]

TextToSpeechManager& Aws::TextToSpeech::TextToSpeechManager::operator= ( TextToSpeechManager &&  )

◆ SendTextToOutputDevice()

void Aws::TextToSpeech::TextToSpeechManager::SendTextToOutputDevice ( const char *  text,
SendTextCompletedHandler  callback 

Sends @text to the Polly Service, once the audio stream is returned, the audio stream is sent to your audio driver. @callback will be invoked once the entire operation has finished.

◆ SetActiveDevice()

void Aws::TextToSpeech::TextToSpeechManager::SetActiveDevice ( const std::shared_ptr< PCMOutputDriver > &  ,
const DeviceInfo ,
const CapabilityInfo  

Sets the active driver (if there are multiple possbilities), the device to use for that driver, and the audio format to configure the device for. This format will also be used for calls to the Polly service.

◆ SetActiveVoice()

void Aws::TextToSpeech::TextToSpeechManager::SetActiveVoice ( const Aws::String voice)

Sets the active voice for use with the Polly Service.

The documentation for this class was generated from the following file: