Skip to main content

A modular Python library for voice interactions with AI systems

Project description

AbstractVoice

A modular Python library for voice I/O around AI applications.

  • TTS (default): Piper (cross-platform, no system deps)
  • STT (default): faster-whisper
  • Local assistant: listen() + speak() with playback/listening control
  • Headless/server: speak_to_bytes() / speak_to_file() and transcribe_*

Status: alpha (0.6.1). The supported integrator surface is documented in docs/api.md.

Next: docs/getting-started.md (recommended setup + first smoke tests).

AbstractVoice will ultimately be integrated as the voice modality of AbstractFramework.
An OpenAI-compatible voice endpoint is an optional demo/integration layer (see backlog).


Install

pip install abstractvoice

Optional extras (feature flags):

pip install "abstractvoice[all]"

Notes:

  • abstractvoice[all] enables most optional features (incl. cloning + AEC + audio-fx), but does not include the GPU-heavy Chroma runtime.
  • For the full list of extras (and platform troubleshooting), see docs/installation.md.

Explicit model downloads (recommended; never implicit in the REPL)

Some features rely on large model weights/artifacts. AbstractVoice will not download these implicitly inside the REPL (offline-first).

After installing, prefetch explicitly (cross-platform):

abstractvoice-prefetch --stt small
abstractvoice-prefetch --piper en
abstractvoice-prefetch --openf5
abstractvoice-prefetch --chroma

Or equivalently:

python -m abstractvoice download --stt small
python -m abstractvoice download --piper en
python -m abstractvoice download --openf5
python -m abstractvoice download --chroma

Notes:

  • --piper <lang> downloads the Piper ONNX voice for that language into ~/.piper/models.
  • --openf5 is ~5.4GB. --chroma is very large (GPU-heavy).

Quick smoke tests

REPL (fastest end-to-end)

abstractvoice --verbose
# or (from a source checkout):
python -m abstractvoice cli --verbose

Notes:

  • Mic voice input is off by default for fast startup. Enable with --voice-mode stop (or in-session: /voice stop).
  • The REPL is offline-first: no implicit model downloads. Use the explicit download commands above.

See docs/repl_guide.md.

Minimal Python

from abstractvoice import VoiceManager

vm = VoiceManager()
vm.speak("Hello! This is AbstractVoice.")

Public API (stable surface)

See docs/api.md for the supported integrator contract.

At a glance:

  • TTS: speak(), stop_speaking(), pause_speaking(), resume_speaking(), speak_to_bytes(), speak_to_file()
  • STT: transcribe_file(), transcribe_from_bytes()
  • Mic: listen(), stop_listening(), pause_listening(), resume_listening()

Documentation (minimal set)

  • Docs index: docs/README.md
  • Getting started: docs/getting-started.md
  • FAQ: docs/faq.md
  • Orientation: docs/overview.md
  • Acronyms: docs/acronyms.md
  • Public API: docs/api.md
  • REPL guide: docs/repl_guide.md
  • Install troubleshooting: docs/installation.md
  • Multilingual support: docs/multilingual.md
  • Architecture (internal): docs/architecture.md + docs/adr/
  • Model management (Piper-first): docs/model-management.md
  • Licensing notes: docs/voices-and-licenses.md

Project

  • Changelog: CHANGELOG.md
  • Contributing: CONTRIBUTING.md
  • Security: SECURITY.md
  • Acknowledgments: ACKNOWLEDGMENTS.md

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abstractvoice-0.6.1.tar.gz (118.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abstractvoice-0.6.1-py3-none-any.whl (121.0 kB view details)

Uploaded Python 3

File details

Details for the file abstractvoice-0.6.1.tar.gz.

File metadata

  • Download URL: abstractvoice-0.6.1.tar.gz
  • Upload date:
  • Size: 118.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for abstractvoice-0.6.1.tar.gz
Algorithm Hash digest
SHA256 48e7a286e4da23142deb38b73f1fe910f7f0e4ad2c36365498f6a91a86ec93e7
MD5 091698da7d0f9c32aa26dc1d153c7a4b
BLAKE2b-256 0b393c327338dd4223871516d57c8ea0dffd0e23f50c613b38990f6855b072f2

See more details on using hashes here.

File details

Details for the file abstractvoice-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: abstractvoice-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 121.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for abstractvoice-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b5b629fe87d1e2a19dc28c8d069b3027b1a01e2238427eebac038a02ba63b326
MD5 d36e86495c3df0a12932b50d4bf56295
BLAKE2b-256 ec584e79de4ba8d5612b9fd120e96c61009c5a7fc23e91f52b5ede4c4942a7ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page