Package edu.tufts.hrilab.tts
Interface SynthesisBackend
- All Known Implementing Classes:
CartesiaSynthesisBackend,KokoroSynthesisBackend
public interface SynthesisBackend
Unified interface for streaming TTS synthesis backends.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumAvailable engines.static interfaceOne utterance's worth of synthesis.static interfaceWhere synthesized PCM goes. -
Method Summary
Modifier and TypeMethodDescriptionintOutput PCM rate (s16le mono), fixed for the backend's lifetime.voidinit()Load credentials and prewarm the transport.booleanisReady()False if the backend cannot synthesize at all (e.g.Begin one utterance's synthesis.voidshutdown()Release transport resources.
-
Method Details
-
init
void init()Load credentials and prewarm the transport. Called once from component init. -
isReady
boolean isReady()False if the backend cannot synthesize at all (e.g. missing credentials). -
getSampleRate
int getSampleRate()Output PCM rate (s16le mono), fixed for the backend's lifetime. Valid after init. -
openSession
Begin one utterance's synthesis. Never returns null when isReady. -
shutdown
void shutdown()Release transport resources. Called from shutdownComponent.
-