Doly C++ SDK v1.00
Loading...
Searching...
No Matches
TtsControl Namespace Reference

Functions

int8_t init (VoiceModel model, std::string output_path="")
 Initialize the TTS system.
int8_t dispose ()
 Dispose the TTS system and release resources.
int8_t produce (std::string text)
 Produce a speech audio output from text.
float getVersion ()
 Get the TTS subsystem/library version.

Function Documentation

◆ dispose()

int8_t TtsControl::dispose ( )

Dispose the TTS system and release resources.

Returns
Status code (implementation-defined).
Examples
TtsControl/main.cpp.

◆ getVersion()

float TtsControl::getVersion ( )

Get the TTS subsystem/library version.

Returns
Version number.
Examples
TtsControl/main.cpp.

◆ init()

int8_t TtsControl::init ( VoiceModel model,
std::string output_path = "" )

Initialize the TTS system.

Parameters
modelVoice model to use.
output_pathOptional output directory/path used by the implementation.
Returns
Status code:
  • 0 : success
  • 1 : already initialized
  • -1 : model file missing
  • -2 : model config file missing
Note
Model loading is a time-consuming and CPU-intensive operation; it is a blocking function.
Examples
TtsControl/main.cpp.

◆ produce()

int8_t TtsControl::produce ( std::string text)

Produce a speech audio output from text.

Parameters
textInput text to synthesize.
Returns
Status code:
  • 0 : success
  • -1 : TTS not active (init() not called or failed)
  • -2 : data processing error
Note
This operation blocking the thread.
Examples
TtsControl/main.cpp.