https://github.com/user-attachments/assets/975dcfd0-17ec-4912-b3b1-ec084077f858
Agent Voice gives AI agents the ability to create local speech recordings.
AI agents produce useful work, but they still communicate mostly through text. Every response competes for a developer's visual attention, so valuable work is often skimmed or missed.
My initial use case was listening alongside the text: text-to-speech for coding agents such as Codex and Claude Code.
The larger idea is simple: audio should be a first-class medium for agents.
Agent Voice runs locally, uses Kokoro-82M, and requires no API key. English is the best-supported language. The bundled 54-voice catalog also covers Japanese, Mandarin Chinese, Spanish, French, Hindi, Italian, and Brazilian Portuguese, though quality varies.
Install and setup
Install the CLI and download the speech model:
uv tool install agent-voice
agent-voice setup
Install the skills globally for your coding agent (recommended):
npx skills add yoav0gal/agent-voice --skill create-speech-recording --global
npx skills add yoav0gal/agent-voice --skill spoken-response --global
Test it:
agent-voice speak "Hello from Agent Voice." --play
Skills
Agent Voice includes two example skills:
- create-speech-recording turns supplied text into audio. Use it when you want an agent to create a recording or read something aloud.
- spoken-response creates an audio version of an agent's written response. Use it when you want to listen to a long answer instead of reading it.
These skills are starting points, not fixed workflows. Copy them, edit them, and make them yours. You can change delivery wording, recording defaults, playback behavior, or when the agent should offer audio.
Each skill owns its agent instructions and an editable
references/recording-delivery.md template. The CLI returns structured facts;
the skill decides how those facts are presented.
CLI
The CLI provides small primitives that agents can combine. Run
agent-voice COMMAND --help for the full options of any command.
| Command | What it does |
|---|---|
setup |
Download and verify speech model assets. |
speak |
Turn text or stdin into a recording. |
play |
Play an existing local recording. |
voices |
List supported language tags and voices. |
models |
List speech models and variants. |
config |
View or change persistent defaults. |
doctor |
Check that Agent Voice is ready. |
viewer start|stop |
Manage the local recording viewer. |
serve |
Start the localhost speech API. |
Speak
# Positional text
agent-voice speak "The build is finished."
# Agent output through stdin
printf '%s' "$TEXT" | agent-voice speak --label build-summary
# Spoken text and written Markdown in one command
agent-voice speak "$TEXT" --markdown "$RESPONSE" --label response
# Show the written response while playing a speech-friendly narration
agent-voice speak --response-file response.md < narration.txt
# Choose the output and delivery
agent-voice speak "Here is your summary." \
--voice bf_emma --speed 1.2 --format mp3 --play
| Option | Purpose |
|---|---|
-o, --output PATH |
Write to an exact path. |
--label TEXT |
Set the managed filename prefix. |
--markdown TEXT |
Show an inline Markdown response in the viewer. |
--response-file PATH |
Show a Markdown response in the browser viewer. |
--output-dir DIR |
Choose the managed output directory. |
-f, --format FORMAT |
Use wav, mp3, opus, or m4a. |
-v, --voice NAME |
Select a voice. |
--lang TAG |
Set the language tag (default: en-us). |
--speed NUMBER |
Set pitch-preserving playback speed. |
--play |
Play the recording after creation. |
--service on|off|timed |
Control background inference. |
--service-timeout MINUTES |
Set the idle timeout for timed mode. |
--model-id ID, --variant NAME |
Select a model and build. |
speak prints one JSON receipt with the absolute recording path, file URI,
audio metadata, playback status, and available viewer links. This makes the
command reliable for both people and agents.
Configure defaults
# Show current defaults
agent-voice config
# Set your preferred voice, speed, format, and output directory
agent-voice config --voice bf_emma --speed 1.15 --format mp3 --output-dir ./recordings
# Restore built-in defaults
agent-voice config --reset
The same values can be overridden per recording with speak. Service modes are
on for a persistent local service, off for embedded inference, and timed
to stop the service after an idle timeout.
Discover and diagnose
agent-voice voices
agent-voice models
agent-voice doctor
agent-voice doctor --json
voices groups each installed voice under its supported --lang tag. Select a
pair with agent-voice speak --lang TAG --voice VOICE "Text".
Use --json with voices, models, config, or doctor when another tool or
agent will consume the result.
Play and view recordings
agent-voice play "/absolute/path/recording.mp3"
agent-voice viewer start
agent-voice viewer stop
The lightweight viewer starts automatically when needed and serves only local
recordings. It prefers http://127.0.0.1:8779 and selects a free port if that
port is unavailable.
🗒️ The viewer is a workaround for agent surfaces that do not support embedded audio. I expect native text-to-speech to become common across these platforms, which would be a better solution. For now, the viewer keeps playback and the written response together in a local page. 🗒️
Local speech API
agent-voice serve
curl http://127.0.0.1:8765/v1/audio/speech \
-H 'Content-Type: application/json' \
-d '{"input":"The task is complete.","voice":"af_heart","response_format":"mp3"}' \
--output speech.mp3
The API binds to localhost. speak uses it when available and falls back to
embedded inference.
platform limitations
Prebuilt dependencies support macOS arm64/x64, Linux x64, and Windows x64. Linux arm64 requires a C build toolchain for miniaudio. On Windows arm64, use x64 Python under emulation.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_voice-0.6.0.tar.gz.
File metadata
- Download URL: agent_voice-0.6.0.tar.gz
- Upload date:
- Size: 985.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e423ad3d14becc9dbece0b3f547cf35d27afc8263cf0e045e79f99fb11e1335e
|
|
| MD5 |
65101fe413699768966757e6464fe830
|
|
| BLAKE2b-256 |
954709e3d05a831aac8be4a08c29a6a6dd1a2847b5398f4af102a4cb4a92bb34
|
Provenance
The following attestation bundles were made for agent_voice-0.6.0.tar.gz:
Publisher:
publish.yml on yoav0gal/agent-voice
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_voice-0.6.0.tar.gz -
Subject digest:
e423ad3d14becc9dbece0b3f547cf35d27afc8263cf0e045e79f99fb11e1335e - Sigstore transparency entry: 2346971448
- Sigstore integration time:
-
Permalink:
yoav0gal/agent-voice@6540f2f0c3c27478a5d31fab9fcd371275412a2a -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/yoav0gal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6540f2f0c3c27478a5d31fab9fcd371275412a2a -
Trigger Event:
release
-
Statement type:
File details
Details for the file agent_voice-0.6.0-py3-none-any.whl.
File metadata
- Download URL: agent_voice-0.6.0-py3-none-any.whl
- Upload date:
- Size: 49.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26c91e8abe7198d0e86416cced44d1d79c9a6f1e87d9727507c0275d678dc4a0
|
|
| MD5 |
9672989912d2620d41e522bc26a5a8f4
|
|
| BLAKE2b-256 |
9369c21d5676072be7bca581dc23a3942107934ec596494f46c2ba49c6d453fe
|
Provenance
The following attestation bundles were made for agent_voice-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on yoav0gal/agent-voice
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_voice-0.6.0-py3-none-any.whl -
Subject digest:
26c91e8abe7198d0e86416cced44d1d79c9a6f1e87d9727507c0275d678dc4a0 - Sigstore transparency entry: 2346971694
- Sigstore integration time:
-
Permalink:
yoav0gal/agent-voice@6540f2f0c3c27478a5d31fab9fcd371275412a2a -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/yoav0gal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6540f2f0c3c27478a5d31fab9fcd371275412a2a -
Trigger Event:
release
-
Statement type: