vsdk 7.3.2
 
Loading...
Searching...
No Matches
Vsdk::Tts::Channelabstract

Can perform voice synthesis. More...

#include <Channel.hpp>

Public Member Functions

 Channel (Channel const &) noexcept=delete
 
Channeloperator= (Channel const &) noexcept=delete
 
 Channel (Channel &&) noexcept=default
 
Channeloperator= (Channel &&) noexcept=default
 
virtual ~Channel () noexcept=default
 
auto name () const -> std::string const &
 Name of this particular Channel instance.
 
auto currentVoice () const -> std::string const &
 Name of the currently activated voice, if any.
 
void setCurrentVoice (std::string const &voice)
 Activates a voice for the next synthesis operations.
 
virtual auto synthesizeFromText (std::string const &text) -> Vsdk::Audio::Buffer=0
 Synthesizes audio data from a SSML or raw text string.
 
virtual auto synthesizeFromFile (std::string const &path) -> Vsdk::Audio::Buffer=0
 Synthesizes audio data from a SSML or raw text file.
 

Protected Member Functions

 Channel (std::shared_ptr< Engine > engine, std::string name) noexcept
 
virtual void setCurrentVoiceImpl (std::string const &voice)=0
 

Static Protected Member Functions

static auto packageResult (std::vector< std::int16_t > data, int sampleRate, int channelCount) -> Vsdk::Audio::Buffer
 Helper function that produces a Vsdk::Audio::Buffer.
 

Detailed Description

Can perform voice synthesis.

Constructor & Destructor Documentation

◆ Channel() [1/3]

Channel::Channel ( std::shared_ptr< Engine engine,
std::string  name 
)
protectednoexcept

◆ Channel() [2/3]

Vsdk::Tts::Channel::Channel ( Channel const &  )
deletenoexcept

◆ Channel() [3/3]

Vsdk::Tts::Channel::Channel ( Channel &&  )
defaultnoexcept

◆ ~Channel()

virtual Vsdk::Tts::Channel::~Channel ( )
virtualdefaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

Channel & Vsdk::Tts::Channel::operator= ( Channel const &  )
deletenoexcept

◆ operator=() [2/2]

Channel & Vsdk::Tts::Channel::operator= ( Channel &&  )
defaultnoexcept

◆ name()

auto Channel::name ( ) const -> std::string const &

Name of this particular Channel instance.

◆ currentVoice()

auto Channel::currentVoice ( ) const -> std::string const &

Name of the currently activated voice, if any.

Returns
Empty string if no voice has been successfully activated yet.

◆ setCurrentVoice()

void Channel::setCurrentVoice ( std::string const &  voice)

Activates a voice for the next synthesis operations.

◆ synthesizeFromText()

virtual auto Vsdk::Tts::Channel::synthesizeFromText ( std::string const &  text) -> Vsdk::Audio::Buffer
pure virtual

Synthesizes audio data from a SSML or raw text string.

Warning
This is a synchronous call! The longer and/or more complex the text to synthesize, the longer it will take for the call to finish.

◆ synthesizeFromFile()

virtual auto Vsdk::Tts::Channel::synthesizeFromFile ( std::string const &  path) -> Vsdk::Audio::Buffer
pure virtual

Synthesizes audio data from a SSML or raw text file.

Warning
This is a synchronous call! The longer and/or more complex the text to synthesize, the longer it will take for the call to finish.

◆ setCurrentVoiceImpl()

virtual void Vsdk::Tts::Channel::setCurrentVoiceImpl ( std::string const &  voice)
protectedpure virtual

◆ packageResult()

auto Channel::packageResult ( std::vector< std::int16_t >  data,
int  sampleRate,
int  channelCount 
) -> Vsdk::Audio::Buffer
staticprotected

Helper function that produces a Vsdk::Audio::Buffer.