Monorepo for Aesthetic.Computer aesthetic.computer
at main 32 lines 814 B view raw
1#ifndef AC_TTS_H 2#define AC_TTS_H 3 4#include "audio.h" 5 6typedef struct ACTts ACTts; 7 8// Initialize TTS engine (call after audio_init) 9ACTts *tts_init(ACAudio *audio); 10 11// Speak text asynchronously (queued, mixed into audio thread) 12void tts_speak(ACTts *tts, const char *text); 13 14// Speak with voice selection (male=0 for female/default, male=1 for male) 15void tts_speak_voice(ACTts *tts, const char *text, int male); 16 17// Speak a single cached letter/word instantly (pre-rendered at init) 18void tts_speak_cached(ACTts *tts, const char *key); 19 20// Pre-cache common single-character utterances (called at init) 21void tts_precache(ACTts *tts); 22 23// Check if currently speaking 24int tts_is_speaking(ACTts *tts); 25 26// Wait for current speech to finish 27void tts_wait(ACTts *tts); 28 29// Cleanup 30void tts_destroy(ACTts *tts); 31 32#endif