Skip to content

ModelForce

CI Test Piper Provider Tests

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.

ModelForce Demo

✅ Local inference · ✅ Offline · ✅ Multiple providers · ✅ CLI · ✅ SDK · ✅ REST API · ✅ Web UI

Why?

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

30-Second Example

import { ModelForceClient } from "@modelforce/sdk";

const mf = new ModelForceClient();

await mf.synthesize({
    provider: "piper",
    text: "Hello world"
});

Change the provider. Your code didn't.

Works With

Provider Type Status
Piper Local ✅ Full
Kokoro Local ⚠️ Partial (CLI interface)
XTTS Remote ⚠️ Partial (HTTP backend required)

Getting Started

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/en_US-lessac-medium
pnpm --filter @modelforce/cli start -- synthesize "Hello"

Architecture

Your App → SDK → Provider → Backend → Audio

Quick Commands

modelforce doctor                     # Health check
modelforce pull piper                 # Install provider
modelforce synthesize "Hello"         # Generate audio
modelforce quick "Hello"              # Quick synthesis
modelforce play "Hello"               # Synthesize and play

Why Not...

  • 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

Packages

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

Known Issues

See Known Limitations.md

For Developers

pnpm test

License

MPL 2.0

Releases

Packages

Contributors

Languages