From 791deba80cff0bb2edf2870df15e0c883130fcc6 Mon Sep 17 00:00:00 2001 From: yoav0gal Date: Mon, 17 Aug 2026 14:25:47 +0300 Subject: [PATCH 1/3] Simplify audio delivery and support longer input --- THIRD_PARTY_NOTICES.md | 3 - pyproject.toml | 3 - .../create-speech-recording-controls/SKILL.md | 9 +- .../create-speech-recording-desktop/SKILL.md | 9 +- .../references/delivery/opencode-desktop.md | 6 +- skills/create-speech-recording/SKILL.md | 9 +- .../references/delivery/default.md | 2 +- skills/spoken-response-controls/SKILL.md | 27 +- skills/spoken-response-desktop/SKILL.md | 27 +- .../references/delivery/opencode-desktop.md | 6 +- skills/spoken-response/SKILL.md | 27 +- .../references/delivery/default.md | 2 +- src/agent_voice/cli.py | 25 -- src/agent_voice/client.py | 5 +- src/agent_voice/delivery.py | 8 +- src/agent_voice/kokoro.py | 35 ++- src/agent_voice/service.py | 6 +- src/agent_voice/speaking.py | 11 +- src/agent_voice/templates/recording.html | 233 +++++------------- src/agent_voice/viewer.py | 43 ++-- src/agent_voice/viewer_server.py | 43 +--- tests/test_cli.py | 52 +--- tests/test_delivery.py | 5 +- tests/test_engine.py | 24 +- tests/test_service.py | 22 ++ tests/test_speaking.py | 18 +- tests/test_viewer.py | 66 ++--- uv.lock | 48 ---- 28 files changed, 256 insertions(+), 518 deletions(-) diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 127ea3a..43d9f42 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -8,6 +8,3 @@ This project depends on third-party software and downloads model assets. - **imageio-ffmpeg** — Copyright imageio-ffmpeg contributors, licensed under the BSD 2-Clause License. Its platform wheels include an FFmpeg executable: - **FFmpeg** — The executable bundled by imageio-ffmpeg is licensed under GNU GPL version 2 or later. License and source information: - **miniaudio Python bindings** — Copyright Irmen de Jong and contributors, licensed under the MIT License: -- **linkify-it-py and uc-micro-py** — Copyright their contributors, licensed under the MIT License: -- **markdown-it-py and mdurl** — Copyright their contributors, licensed under the MIT License: -- **Pygments** — Copyright Georg Brandl and contributors, licensed under the BSD 2-Clause License: diff --git a/pyproject.toml b/pyproject.toml index 1e6a326..06d15d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,11 +24,8 @@ dependencies = [ "filelock>=3.20,<4", "imageio-ffmpeg==0.6.0", "kokoro-onnx==0.5.0", - "linkify-it-py>=2,<3", - "markdown-it-py>=4.2,<5", "miniaudio==1.71", "numpy>=2,<3", - "pygments>=2.19,<3", ] [project.urls] diff --git a/skills/create-speech-recording-controls/SKILL.md b/skills/create-speech-recording-controls/SKILL.md index d0ef6f3..2d76549 100644 --- a/skills/create-speech-recording-controls/SKILL.md +++ b/skills/create-speech-recording-controls/SKILL.md @@ -10,10 +10,7 @@ matching voice with `agent-voice voices` and pass `--voice` and `--lang`. ## Prepare -Set `RESPONSE_AS_MARKDOWN` to the original text or Markdown. Set -`RESPONSE_AS_TEXT` to its spoken form. Never use `RESPONSE_AS_MARKDOWN` as the -speech input. -Use real line breaks in `RESPONSE_AS_MARKDOWN`, not escaped `\n` text. +Set `RESPONSE_AS_TEXT` to the text's spoken form. - For supplied text, preserve every word and punctuation mark in order while translating presentation syntax into speech. @@ -24,13 +21,13 @@ Use real line breaks in `RESPONSE_AS_MARKDOWN`, not escaped `\n` text. ## Record ```sh -agent-voice speak "$RESPONSE_AS_TEXT" --markdown "$RESPONSE_AS_MARKDOWN" --controls +agent-voice speak "$RESPONSE_AS_TEXT" --controls ``` For long text, use temporary files outside the workspace and remove them afterward: ```sh -agent-voice speak --label "$LABEL" --response-file "$RESPONSE_AS_MARKDOWN_FILE" --controls < "$RESPONSE_AS_TEXT_FILE" +agent-voice speak --label "$LABEL" --controls < "$RESPONSE_AS_TEXT_FILE" ``` Set `LABEL` to a short subject. For an exact requested filename, replace diff --git a/skills/create-speech-recording-desktop/SKILL.md b/skills/create-speech-recording-desktop/SKILL.md index 522fcf6..d8ac687 100644 --- a/skills/create-speech-recording-desktop/SKILL.md +++ b/skills/create-speech-recording-desktop/SKILL.md @@ -10,10 +10,7 @@ matching voice with `agent-voice voices` and pass `--voice` and `--lang`. ## Prepare -Set `RESPONSE_AS_MARKDOWN` to the original text or Markdown. Set -`RESPONSE_AS_TEXT` to its spoken form. Never use `RESPONSE_AS_MARKDOWN` as the -speech input. -Use real line breaks in `RESPONSE_AS_MARKDOWN`, not escaped `\n` text. +Set `RESPONSE_AS_TEXT` to the text's spoken form. - For supplied text, preserve every word and punctuation mark in order while translating presentation syntax into speech. @@ -24,13 +21,13 @@ Use real line breaks in `RESPONSE_AS_MARKDOWN`, not escaped `\n` text. ## Record ```sh -agent-voice speak "$RESPONSE_AS_TEXT" --markdown "$RESPONSE_AS_MARKDOWN" +agent-voice speak "$RESPONSE_AS_TEXT" ``` For long text, use temporary files outside the workspace and remove them afterward: ```sh -agent-voice speak --label "$LABEL" --response-file "$RESPONSE_AS_MARKDOWN_FILE" < "$RESPONSE_AS_TEXT_FILE" +agent-voice speak --label "$LABEL" < "$RESPONSE_AS_TEXT_FILE" ``` On Antigravity App, follow the special diff --git a/skills/create-speech-recording-desktop/references/delivery/opencode-desktop.md b/skills/create-speech-recording-desktop/references/delivery/opencode-desktop.md index 8f7c259..a60d508 100644 --- a/skills/create-speech-recording-desktop/references/delivery/opencode-desktop.md +++ b/skills/create-speech-recording-desktop/references/delivery/opencode-desktop.md @@ -1,15 +1,15 @@ # OpenCode Desktop Set `PLAYER_ID` to a unique lowercase ID. Set `RECORDING_NAME` to the basename -of the returned `path`. Set `audio_url` to `delivery.audio_url`. Replace the +of the returned `path`. Set `AUDIO_SOURCE` to `delivery.audio_url`. Replace the placeholders in the template. Render the HTML directly without the code fence. ```html
$RECORDING_NAME
-