Metadata-Version: 2.4
Name: demystify-voice
Version: 0.3.0
Summary: Interruption-aware voice agent runtime (barge-in, spoken-prefix truncation, multi-turn context repair)
Project-URL: Homepage, https://github.com/demystify-systems/ai-services-tools/tree/main/modules/dmstfy-voice-core/runtime
Project-URL: Repository, https://github.com/demystify-systems/ai-services-tools
Author: Demystify Systems
License: MIT
Requires-Python: >=3.11
Requires-Dist: httpx<1,>=0.27
Requires-Dist: pydantic<3,>=2
Provides-Extra: cartesia
Requires-Dist: cartesia<4,>=3; extra == 'cartesia'
Provides-Extra: contracts
Requires-Dist: demystify-platform-contracts<0.4,>=0.3; extra == 'contracts'
Provides-Extra: deepgram
Requires-Dist: deepgram-sdk<5,>=4; extra == 'deepgram'
Provides-Extra: dev
Requires-Dist: demystify-platform-contracts<0.4,>=0.3; extra == 'dev'
Requires-Dist: demystify-platform-observability<0.4,>=0.3; extra == 'dev'
Requires-Dist: demystify-platform-profiles<0.4,>=0.3; extra == 'dev'
Requires-Dist: demystify-platform-state<0.4,>=0.3; extra == 'dev'
Requires-Dist: fastapi<1,>=0.115; extra == 'dev'
Requires-Dist: mutmut<3,>=2.5; extra == 'dev'
Requires-Dist: mypy<2,>=1.13; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest<9,>=8; extra == 'dev'
Requires-Dist: ruff<0.9,>=0.8; extra == 'dev'
Requires-Dist: uvicorn<1,>=0.30; extra == 'dev'
Provides-Extra: elevenlabs
Requires-Dist: elevenlabs<3,>=2; extra == 'elevenlabs'
Provides-Extra: local
Requires-Dist: faster-whisper<2,>=1.1; extra == 'local'
Requires-Dist: kokoro<1,>=0.9; extra == 'local'
Provides-Extra: pg
Requires-Dist: psycopg-pool<4,>=3.2; extra == 'pg'
Requires-Dist: psycopg[binary]<4,>=3.1; extra == 'pg'
Provides-Extra: pipecat
Requires-Dist: pipecat-ai>=0.0.49; extra == 'pipecat'
Provides-Extra: platform
Requires-Dist: demystify-platform-observability<0.4,>=0.3; extra == 'platform'
Requires-Dist: demystify-platform-profiles<0.4,>=0.3; extra == 'platform'
Requires-Dist: demystify-platform-state<0.4,>=0.3; extra == 'platform'
Provides-Extra: server
Requires-Dist: demystify-platform-observability<0.4,>=0.3; extra == 'server'
Requires-Dist: demystify-platform-profiles<0.4,>=0.3; extra == 'server'
Requires-Dist: demystify-platform-state<0.4,>=0.3; extra == 'server'
Requires-Dist: fastapi<1,>=0.115; extra == 'server'
Requires-Dist: uvicorn<1,>=0.30; extra == 'server'
Description-Content-Type: text/markdown

# demystify-voice

Interruption-aware voice-agent runtime: low-latency **barge-in** (client-audible
stop within one sub-chunk), **spoken-prefix truncation** (the interrupted
assistant turn keeps only the audio the caller actually heard), backchannel vs
barge-in discrimination, and multi-turn context repair.

This is the packaged runtime of the `dmstfy-voice-core` module. The full module
docs (architecture, harness, runbooks, contracts) live in the repository at
`modules/dmstfy-voice-core/`.

## Install

```sh
pip install demystify-voice                 # core runtime + pipeline
pip install "demystify-voice[server]"       # + FastAPI/uvicorn control plane (demystify_voice.api)
pip install "demystify-voice[pg]"           # + Postgres write-behind store adapter
```

The core install is intentionally light. `demystify_voice.api` (the HTTP/WS
control plane) requires the `server` extra; the module imports fine without it
and raises a clear error if you import the api without the extra.

## Public protocol surface

Plugins (e.g. `demystify-voice-lingua`) code against these stable exports —
see `docs/contracts/voice-plugin-protocol.md`:

- `demystify_voice.frames` — frame dataclasses
- `demystify_voice.stage` — `Stage`, `StageContext`, `Clock`
- `demystify_voice.pipeline` — `Pipeline` plugin API (`insert_stage`, `replace_stage`)
- `demystify_voice.PROTOCOL_VERSION` — plugin-protocol contract version (`MAJOR.MINOR`)

## Quickstart (offline, zero keys)

```python
from demystify_voice import SessionRuntime  # inject mock providers; drive with the SimClock
```

MIT licensed.
