vsdk 10.1.0
 
Loading...
Searching...
No Matches
Vsdk::Tts::Engineabstract

Responsible for creation of Channel instances. More...

#include <Engine.hpp>

Inheritance diagram for Vsdk::Tts::Engine:

Public Member Functions

 ~Engine ()
 
auto channel (std::string const &name) -> std::shared_ptr< Channel >
 Gets the TTS channel named name with no voice activated yet.
 
auto channel (std::string const &name, std::string const &voice) -> std::shared_ptr< Channel >
 Gets the TTS channel named name with a specific voice activated.
 
auto availableVoices () const -> ChannelVoices const &
 Gets available voices per channel for all configured channels.
 

Static Public Member Functions

template<class T , typename... Args>
static auto make (Args &&... args) -> std::shared_ptr< Engine >
 Gets or constructs a shared Tts::Engine instance of type T with args.
 

Protected Member Functions

 Engine (char const *name, std::string const &configPath)
 
 Engine (char const *name, nlohmann::json config)
 
 Engine (char const *name, char const *configPath)
 Specialization used to avoid overload collisions, forwards to Engine(char const*, std::string const &);
 
virtual auto makeChannel (std::string name) -> Channel *=0
 
void setAvailableVoicesForChannel (std::string const &name, std::vector< std::string > info)
 

Detailed Description

Responsible for creation of Channel instances.

Constructor & Destructor Documentation

◆ Engine() [1/3]

Engine::Engine ( char const * name,
std::string const & configPath )
protected
Parameters
nameName of the configuration object in vsdk.json
configPathPath to a vsdk.json formatted file

◆ Engine() [2/3]

Engine::Engine ( char const * name,
nlohmann::json config )
protected
Parameters
nameName of the configuration object in vsdk.json
configA vsdk.json formatted JSON configuration object

◆ Engine() [3/3]

Engine::Engine ( char const * name,
char const * configPath )
protected

Specialization used to avoid overload collisions, forwards to Engine(char const*, std::string const &);

Parameters
nameName of the configuration object in vsdk.json
configPathPath to a vsdk.json formatted file

◆ ~Engine()

Engine::~Engine ( )

Member Function Documentation

◆ make()

template<class T , typename... Args>
static auto Vsdk::Tts::Engine::make ( Args &&... args) -> std::shared_ptr<Engine>
static

Gets or constructs a shared Tts::Engine instance of type T with args.

Note
If an engine of this type exists, a shared instance will be returned instead.

◆ channel() [1/2]

auto Engine::channel ( std::string const & name) -> std::shared_ptr<Channel>

Gets the TTS channel named name with no voice activated yet.

◆ channel() [2/2]

auto Engine::channel ( std::string const & name,
std::string const & voice ) -> std::shared_ptr<Channel>

Gets the TTS channel named name with a specific voice activated.

◆ availableVoices()

auto Engine::availableVoices ( ) const -> ChannelVoices const &

Gets available voices per channel for all configured channels.

Returns
map<channel_name, vector<voice>>

◆ makeChannel()

virtual auto Vsdk::Tts::Engine::makeChannel ( std::string name) -> Channel *
protectedpure virtual

◆ setAvailableVoicesForChannel()

void Engine::setAvailableVoicesForChannel ( std::string const & name,
std::vector< std::string > info )
protected
Note
If info.empty() then removes entry