Metadata-Version: 2.4
Name: p99-runtime
Version: 0.1.0
Summary: Local open-source P99 voice runtime (ASR → LLM → TTS over WebSocket)
Project-URL: Homepage, https://github.com/kollaikal-rupesh/p99-voice
Project-URL: Repository, https://github.com/kollaikal-rupesh/p99-voice
Project-URL: Documentation, https://github.com/kollaikal-rupesh/p99-voice/blob/main/docs/protocol.md
Project-URL: Issues, https://github.com/kollaikal-rupesh/p99-voice/issues
Author: P99 Labs
License: Apache-2.0
Keywords: asr,realtime,speech,tts,vad,voice,websocket
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.115.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: uvicorn[standard]>=0.32.0
Requires-Dist: websockets>=13.0
Provides-Extra: dev
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Provides-Extra: ml
Description-Content-Type: text/markdown

# p99-runtime

Local open-source voice runtime for the
[P99 protocol](https://github.com/kollaikal-rupesh/p99-voice/blob/main/docs/protocol.md).

Speaks the same WebSocket contract as the hosted P99 runtime, so the browser
client (`@p99labs/voice`) works unchanged.

## Quick start

```bash
pip install p99-runtime
p99-runtime serve --port 8787
```

Stub mode works with **zero models** — useful to verify the client pipeline
(mic → WS → PCM playback). To run real models, replace `handle_turn` in
`p99_runtime/server.py` with your ASR → LLM → TTS (or S2S) stack; keep the
[protocol](https://github.com/kollaikal-rupesh/p99-voice/blob/main/docs/protocol.md)
events and the client stays unchanged.

## Endpoints

| Path | Description |
|------|-------------|
| `GET /healthz` | Liveness |
| `GET /config` | Mic/TTS sample rates for the client |
| `WS /ws` | Voice session (JSON control + binary PCM) |

The server binds `127.0.0.1` by default. Pass `--host 0.0.0.0` only when
you have TLS and auth in front (see
[self-host notes](https://github.com/kollaikal-rupesh/p99-voice/blob/main/docs/self-host.md)).

## Tests

```bash
pip install -e '.[dev]'   # from the repo's runtime/ directory
pytest
```

## Hosted runtime (coming soon)

P99 will offer a managed GPU runtime speaking this same protocol — swap the
URL, add an API key, no client changes. Watch the repo for availability.
