@kpanks/voice
v0.1.0
Published
Praetor-native text-to-speech runtime. Default backend is Kokoro 82M (Apache 2.0, ONNX, lazy-loaded). Azure Speech, Edge TTS, ElevenLabs, OpenAI TTS, fal-tts, OpenVoice v2 cloning available as opt-in adapters.
Maintainers
Readme
@kpanks/voice
Text-to-speech for Praetor charters. Default backend is Kokoro 82M
(Apache 2.0, ONNX, lazy-loaded — no API key, no quota, no network egress).
Azure Speech, Edge TTS, ElevenLabs, OpenAI TTS, fal-tts, and OpenVoice v2
ship as opt-in adapters tagged with licenseFamily so charters can refuse
non-permissive backends.
Install
npm install @kpanks/voice
# Optional peer for the Kokoro adapter:
npm install kokoro-jsUsage
import { PraetorVoice, KokoroAdapter, AzureSpeechAdapter } from "@kpanks/voice";
const voice = new PraetorVoice();
voice.attach("kokoro", new KokoroAdapter());
voice.attach("azure-speech", new AzureSpeechAdapter({ key, region }));
const out = await voice.synthesize({ text: "hello", voice: "af_bella" });
// out.audioBuffer, out.mime, out.backend, out.licenseFamilyLicense families
| Family | Adapters |
|---|---|
| apache_or_mit | Kokoro, Piper, OpenVoice v2 (safe-default) |
| proprietary | Azure Speech, ElevenLabs, OpenAI TTS, fal-tts |
| restricted | non-commercial / Llama-derivative / watermarked |
Pass allowedLicenseFamilies on PraetorVoice to whitelist.
License
Apache 2.0. Kokoro itself is Apache 2.0.
