#include <chrono>
#include <thread>
#include <spdlog/spdlog.h>
int main()
{
spdlog::set_level(spdlog::level::info);
spdlog::flush_on(spdlog::level::trace);
spdlog::error("Doly service stop failed");
return -1;
}
spdlog::info("Initialize and load voice model...");
{
spdlog::error("TtsControl init failed");
return -2;
}
spdlog::info("Produce Text to Speech");
{
spdlog::error("SoundControl init failed");
return -3;
}
std::this_thread::sleep_for(std::chrono::seconds(5));
return 0;
}
Shared helper utilities and common types used across the Doly SDK.
Public API for Doly sound playback control.
Public API for Doly TTS (Text-to-Speech) control.
@ MODEL_1
Definition TtsControl.h:32
int8_t stopDolyService()
Stop the background Doly service (if running).
int8_t dispose()
Dispose/stop the sound subsystem and release resources.
int8_t init()
Initialize sound control.
int8_t play(std::string file_name, uint16_t id)
Start playing a sound file (non-blocking).
float getVersion()
Get the TTS subsystem/library version.
int8_t dispose()
Dispose the TTS system and release resources.
int8_t produce(std::string text)
Produce a speech audio output from text.
int8_t init(VoiceModel model, std::string output_path="")
Initialize the TTS system.