Multimodal capability · AbstractCore plugin · v0.13.0

AbstractVoice

Voice input and output for AI applications: text-to-speech, speech-to-text and optional voice cloning behind one Python API. The base install talks to OpenAI or any OpenAI-compatible audio server; local engines such as Supertonic, Piper, Qwen3-TTS, OmniVoice and Whisper come with explicit extras. Use it as a library, or install it next to AbstractCore and it becomes llm.voice and llm.audio.

# Remote OpenAI audio (reads OPENAI_API_KEY)
pip install abstractvoice

# Local text-to-speech + speech-to-text on CPU
pip install "abstractvoice[supertonic,stt]"

# Full local stack: Apple Silicon or GPU
pip install "abstractvoice[apple]"
pip install "abstractvoice[gpu]"

One voice API, remote or local

You pick a provider (the engine), a model and a voice. The same calls work whether the audio comes from a hosted endpoint or from an engine running in your process.

Remote by default

pip install abstractvoice is light: it installs no PyTorch and no local model. VoiceManager() uses OpenAI audio with OPENAI_API_KEY; the openai-compatible provider points the same calls at any compatible /v1 audio server.

Local engines, when you ask for them

Each local engine sits behind its own extra, and [apple] / [gpu] install the local stack in one go. The interactive abstractvoice command (a spoken chat in the terminal) never downloads a model on its own: you fetch weights with abstractvoice-prefetch. In the library, VoiceManager(allow_downloads=False) gives the same guarantee.

It says what it can do

engine_runtime_status(engine) tells you whether an engine can run here, what is missing, and the install command, without importing the engine. Voice listings name each unavailable provider with a code (runtime_missing, model_not_downloaded, not_configured) and a reason.

Included in the one-line installer. The AbstractFramework installer adds abstractvoice[supertonic,stt] to the gateway: Supertonic text-to-speech and Whisper speech-to-text, both on CPU. This is skipped on musl Linux and on macOS before 13, where no wheels exist; Windows ARM64 gets Supertonic only. The abstractvoice and abstractvoice-prefetch commands are on your PATH (~/.local/bin), and the gateway consoles use the same engine status to show a missing voice engine with its install command. To upgrade, re-run the same install line (on a Mac without Terminal, double-click Install AbstractFramework.command again), see Upgrade; on an installer install, the console’s update runs the installer.

Generated with AbstractVoice

The same text-to-speech API with two providers: Supertonic 3 running locally, and OpenAI's hosted voices.

Supertonic 3 — local ONNX engine, fixed voices M1–M5 and F1–F5

F1 (female)

M1 (male)

M3 (male)

Supertonic 3 weights come from Supertone/supertonic-3 and carry their own license.

OpenAI text-to-speech — remote, provider openai

Nova

Onyx

Alloy

Make your own with the one-shot command in Getting started.

What runs where

Every engine below is a provider id you can pass to VoiceManager, the CLI or AbstractCore. Only the two remote providers work with the base install; each local engine needs the extra shown. Model weights are licensed separately from AbstractVoice (MIT): check the source of each model you download.

ProviderDoesInstallNotes
openaiSpeech, transcription, cloningbaseHosted OpenAI audio; needs OPENAI_API_KEY (or a key passed by the host). The base-install default.
openai-compatibleSpeech, transcription, cloningbaseAny compatible /v1 audio endpoint (--api / remote_base_url).
supertonic (Supertonic 3)Speech[supertonic]Local ONNX. Fixed voices M1–M5 and F1–F5, 31 languages. The recommended local text-to-speech. Not a cloning engine.
piperSpeech[piper]Local ONNX on CPU. Curated voices for en, fr, de, es, ru and zh. Licenses vary per voice.
qwen3-ttsSpeech, voice design, cloning[qwen3-tts]Preset speakers (CustomVoice), voice from a description (1.7B VoiceDesign), cloning (Base). Python 3.10+, torch 2.4+, Transformers 5.9+; about 2.5–4.5 GB per checkpoint. Not installable on Intel Macs; not part of [apple] / [gpu].
omnivoiceSpeech, cloning[omnivoice]The default cloning engine. Python 3.10+, very large; uses Metal on Apple Silicon.
audiodit (LongCat-AudioDiT-1B)Speech, prompt-audio cloning[audiodit]torch / transformers; runs on Python 3.9 too.
f5_tts (OpenF5 / F5-TTS)Cloning[cloning]Python 3.10+; about 5.4 GB. The platform profiles include it on Python 3.11+ only.
chroma (Chroma-4B)Cloning[chroma]Very large and GPU-heavy.
faster-whisperTranscription[stt]Whisper model sizes such as small or large.
transformers-asrTranscription[stt-hf]Hugging Face models such as openai/whisper-large-v3, openai/whisper-large-v3-turbo and Qwen/Qwen3-ASR-1.7B (Qwen3-ASR needs Python 3.10+ and Transformers 5.4+).

Headless or played aloud

speak() plays through your speakers; speak_to_bytes(), speak_to_file() and speak_to_audio_chunks() return audio for servers and pipelines.

LLM text in, speech out

open_tts_text_stream() takes text as it arrives from a model, cuts it into short segments and starts speaking before the reply is complete.

Microphone and barge-in

Optional microphone listening with voice activity detection, a stop phrase, and acoustic echo cancellation ([aec], Python 3.11+).

First words in a few minutes

Requires Python 3.9 or later; several local engines need 3.10+.

Command line

# One-shot: write a WAV with hosted OpenAI audio and exit
OPENAI_API_KEY=... abstractvoice --provider openai --model tts-1 --voice alloy \
  --prompt "Hello from AbstractVoice." --output hello.wav

# Local: fetch the weights once, then chat without the network.
# The AbstractFramework installer already put these commands on PATH; otherwise:
pip install "abstractvoice[supertonic,stt]"
abstractvoice-prefetch --supertonic
abstractvoice-prefetch --stt small
abstractvoice --tts-engine supertonic --stt-engine faster_whisper

# Browser example (needs abstractvoice[web])
abstractvoice web --port 5000

Python

In Python, VoiceManager takes a text-to-speech, a speech-to-text and a cloning engine (for example Supertonic, faster-whisper and OmniVoice with abstractvoice[supertonic,stt,omnivoice]) and offers speak, speak_to_bytes, transcribe_file and clone_voice. The verified AbstractCore call is in the examples below.

Streaming, availability and AbstractCore

# Speak an LLM reply while it is still being generated
stream = vm.open_tts_text_stream()
for delta in llm_text_deltas:   # text chunks from your model
    stream.push(delta)
stream.close()     # no more text
stream.join()      # wait until the last segment is synthesized
# stream.cancel() stops early

Checked against AbstractVoice 0.13.0 (abstractvoice/vm/tts_mixin.py, line 1711); a fragment that needs a VoiceManager and your model’s text deltas; not executed for this page.

from abstractvoice.engine_runtime import engine_runtime_status

# Checks installed packages only: nothing is imported or loaded
status = engine_runtime_status("qwen3-tts")
print(status.installed)        # False when torch/transformers are missing
print(status.reason)           # plain-words explanation
print(status.install_command)  # the pip command for the qwen3-tts extra
from abstractcore import create_llm

llm = create_llm("mlx", model="mlx-community/Qwen3.5-4B-4bit")

speech = llm.generate("AbstractFramework: write once, generate everything, run anywhere.",
                      output={"modality": "voice", "provider": "supertonic", "model": "supertonic-3"})
open("tagline.wav", "wb").write(speech.outputs["voice"][0].data)

With the AbstractCore server running (abstractcore serve), the same engines answer POST /v1/audio/speech and POST /v1/audio/transcriptions.