Class representing a voice template (voice profile)
More...
#include <voicesdk/core/common/voice_template.h>
|
virtual void | serialize (std::ostream &stream) const =0 |
| Serializes voice template to the given stream. More...
|
|
virtual void | saveToFile (const std::string &filepath) const =0 |
| Stores voice template in a file of the given path. More...
|
|
virtual const ChannelType & | getChannelType () const =0 |
| Returns voice template channel type which was specified by user on creation. More...
|
|
virtual const std::string & | getInitDataId () const =0 |
| Returns ID of the init data, which was used to create the template. More...
|
|
virtual bool | isValid () const =0 |
| Checks if voice template is valid or not. More...
|
|
|
static Ptr | deserialize (std::istream &stream) |
| Deserializes voice template from the given stream. More...
|
|
static Ptr | loadFromFile (const std::string &filepath) |
| Restores voice template from the given file. More...
|
|
Class representing a voice template (voice profile)
◆ deserialize()
static Ptr voicesdk::VoiceTemplate::deserialize |
( |
std::istream & |
stream | ) |
|
|
static |
Deserializes voice template from the given stream.
- Parameters
-
- Exceptions
-
std::runtime_error | if runtime error occurred |
- Returns
- Created voice template instance
◆ getChannelType()
virtual const ChannelType& voicesdk::VoiceTemplate::getChannelType |
( |
| ) |
const |
|
pure virtual |
Returns voice template channel type which was specified by user on creation.
- Returns
- Channel type
◆ getInitDataId()
virtual const std::string& voicesdk::VoiceTemplate::getInitDataId |
( |
| ) |
const |
|
pure virtual |
Returns ID of the init data, which was used to create the template.
- Returns
- A string containing init data ID
◆ isValid()
virtual bool voicesdk::VoiceTemplate::isValid |
( |
| ) |
const |
|
pure virtual |
Checks if voice template is valid or not.
- Returns
- true if voice template instance is valid, false otherwise
- Deprecated:
- Always returns true, will be removed in the next release
◆ loadFromFile()
static Ptr voicesdk::VoiceTemplate::loadFromFile |
( |
const std::string & |
filepath | ) |
|
|
static |
Restores voice template from the given file.
- Parameters
-
filepath | Path to the template file |
- Exceptions
-
std::runtime_error | if runtime error occurred |
- Returns
- Created voice template instance
◆ saveToFile()
virtual void voicesdk::VoiceTemplate::saveToFile |
( |
const std::string & |
filepath | ) |
const |
|
pure virtual |
Stores voice template in a file of the given path.
- Parameters
-
filepath | Path to the output file |
- Exceptions
-
std::runtime_error | if runtime error occurred |
◆ serialize()
virtual void voicesdk::VoiceTemplate::serialize |
( |
std::ostream & |
stream | ) |
const |
|
pure virtual |
Serializes voice template to the given stream.
- Parameters
-
- Exceptions
-
std::runtime_error | if runtime error occurred |