One API for local and remote text-to-speech providers.
Switch between Piper, Kokoro, XTTS (and more) without changing your application.
Conceptually, ModelForce is for text-to-speech what LiteLLM is for language models.
✅ Local inference · ✅ Offline · ✅ Multiple providers · ✅ CLI · ✅ SDK · ✅ REST API · ✅ Web UI
Every TTS engine has its own API, installation, configuration, and voice management.
ModelForce provides one interface for all of them.
| Without ModelForce | With ModelForce |
|---|---|
| Each provider has different API | One unified API |
| Separate auth for each | Single auth system |
| Separate configs | One config format |
| Vendor lock-in | Provider abstraction |
| Manual installation | One command install |
import { ModelForceClient } from "@modelforce/sdk";
const mf = new ModelForceClient();
await mf.synthesize({
provider: "piper",
text: "Hello world"
});Change the provider. Your code didn't.
| Provider | Type | Status |
|---|---|---|
| Piper | Local | ✅ Full |
| Kokoro | Local | ✅ Full |
| XTTS | Local | ✅ Full |
git clone https://github.com/PeepSick/ModelForce.git
cd ModelForce
pnpm install
pnpm build
pnpm --filter @modelforce/cli start -- doctor
pnpm --filter @modelforce/cli start -- pull piper
pnpm --filter @modelforce/cli start -- pull voice/piper/tr_TR-dfki-medium
pnpm --filter @modelforce/cli start -- voices
pnpm --filter @modelforce/cli start -- synthesize "Hello"
# Or with Kokoro (local ONNX inference):
pnpm --filter @modelforce/cli start -- pull kokoro
pnpm --filter @modelforce/cli start -- synthesize "Hello" --provider kokoro
# Or with XTTS (local Coqui TTS; requires: pip install TTS):
pnpm --filter @modelforce/cli start -- pull xtts
pnpm --filter @modelforce/cli start -- synthesize "Hello" --provider xttsYour App → SDK → Provider → Backend → Audio
modelforce doctor # Health check
modelforce pull piper # Install Piper provider
modelforce pull kokoro # Install Kokoro (local ONNX)
modelforce pull xtts # Install XTTS (Coqui TTS local)
modelforce pull voice/piper/tr_TR-dfki-medium # Install voice
modelforce voices # List installed voices
modelforce status # Show providers/models/voices status
modelforce synthesize "Hello" # Generate audio
modelforce quick "Hello" # Quick synthesis
modelforce play "Hello" # Synthesize and play- LangChain - Focuses on LLM chains, not TTS runtime
- LiteLLM - Focuses on LLM routing, not TTS providers
- OpenAI SDK - Designed for OpenAI services; ModelForce focuses on provider-independent TTS runtimes
| Package | Description |
|---|---|
@modelforce/sdk |
Simple API for text-to-speech |
@modelforce/server |
REST API server |
@modelforce/web |
React Web UI |
@modelforce/cli |
Command-line interface |
@modelforce/core |
Core types, health monitoring, event bus |
@modelforce/runtime |
Execution engine with parallel synthesis |
@modelforce/character |
Character profiles and voice presets |
@modelforce/speech |
Speech runtime (LeoVoice) |
@modelforce/plugin |
Plugin system with lifecycle management |
@modelforce/registry |
Provider and voice registry |
@modelforce/installer |
Provider installation management |
@modelforce/provider-piper |
Piper TTS provider |
@modelforce/provider-kokoro |
Kokoro TTS provider |
@modelforce/provider-xtts |
XTTS TTS provider |
pnpm testReal integration tests run automatically when local models are present (Kokoro ONNX, XTTS model directory); otherwise they skip.
