Package edu.tufts.hrilab.tts.kokoro
Class KokoroSynthesisBackend
java.lang.Object
edu.tufts.hrilab.tts.kokoro.KokoroSynthesisBackend
- All Implemented Interfaces:
SynthesisBackend
Self-hosted synthesis via a local Kokoro sidecar. Each phrase is one POST to /synth
returning complete PCM s16le mono at 24000 Hz.
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.tufts.hrilab.tts.SynthesisBackend
SynthesisBackend.Engine, SynthesisBackend.Session, SynthesisBackend.Sink -
Constructor Summary
Constructors -
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.
-
Constructor Details
-
KokoroSynthesisBackend
-
-
Method Details
-
init
public void init()Description copied from interface:SynthesisBackendLoad credentials and prewarm the transport. Called once from component init.- Specified by:
initin interfaceSynthesisBackend
-
isReady
public boolean isReady()Description copied from interface:SynthesisBackendFalse if the backend cannot synthesize at all (e.g. missing credentials).- Specified by:
isReadyin interfaceSynthesisBackend
-
getSampleRate
public int getSampleRate()Description copied from interface:SynthesisBackendOutput PCM rate (s16le mono), fixed for the backend's lifetime. Valid after init.- Specified by:
getSampleRatein interfaceSynthesisBackend
-
openSession
Description copied from interface:SynthesisBackendBegin one utterance's synthesis. Never returns null when isReady.- Specified by:
openSessionin interfaceSynthesisBackend
-
shutdown
public void shutdown()Description copied from interface:SynthesisBackendRelease transport resources. Called from shutdownComponent.- Specified by:
shutdownin interfaceSynthesisBackend
-