TtsControl API reference¶
Import:
import doly_tts
This page documents the public API exposed by the doly_tts Python module.
Enums¶
VoiceModel¶
Values:
Model1Model2Model3
Functions¶
init(model: VoiceModel, output_path: str = "") -> int¶
Initialize the TTS system.
Parameters
- model: Voice model to use.
- output_path: Optional output directory/path used by the implementation. (default:
"")
Returns
int:
Status code: - 0 : success - 1 : already initialized - -1 : model file missing - -2 : model config file missing
Notes
- Model loading is a time-consuming and CPU-intensive operation; it is a blocking function.
dispose() -> int¶
Dispose the TTS system and release resources.
Returns
int:
Status code (implementation-defined).
produce(text: str) -> int¶
Produce a speech audio output from text.
Parameters
- text: Input text to synthesize.
Returns
int:
Status code: - 0 : success - -1 : TTS not active (init() not called or failed) - -2 : data processing error
Notes
- This operation blocking the thread.
get_version() -> float¶
Get the TTS subsystem/library version.
Returns
float:
Version number.