Skip to content

feat: supertonic TTS shared workflow + daily-news voice artifact#39164

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/add-share-agentic-workflow
Draft

feat: supertonic TTS shared workflow + daily-news voice artifact#39164
Copilot wants to merge 4 commits into
mainfrom
copilot/add-share-agentic-workflow

Conversation

Copilot AI commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Wraps the supertone-inc/supertonic-py on-device TTS SDK as a reusable shared workflow and wires it into daily-news to produce a spoken digest uploaded as a run artifact.

shared/supertonic.md (new)

  • Pre-agent steps: installs supertonic[serve], starts HTTP server on 127.0.0.1:7788, polls readiness up to 3 min (first run downloads ~400 MB model from HuggingFace)
  • Model caching: actions/cache stores ~/.cache/supertonic3/ keyed by runner OS and package version — subsequent runs skip the ~400 MB download entirely; cache is automatically invalidated when the supertonic package version changes
  • Agent prompt: full curl reference for both endpoints, voice/language/quality tables, artifact upload walkthrough
# native endpoint
curl -X POST http://127.0.0.1:7788/v1/tts \
  -H 'content-type: application/json' \
  -d '{"text":"...", "voice":"F1", "lang":"en", "steps":8}' \
  -o output.wav

# OpenAI-compatible alias
curl -X POST http://127.0.0.1:7788/v1/audio/speech \
  -H 'content-type: application/json' \
  -d '{"model":"supertonic-3", "input":"...", "voice":"F1", "response_format":"wav"}' \
  -o output.wav

daily-news.md (updated)

  • Imports shared/supertonic.md
  • timeout-minutes 30 → 50 to cover model download + synthesis
  • Adds 🔊 Voice Summary phase: agent composes a 2–4 sentence spoken digest, synthesizes WAV via the local server (jq-safe quoting to avoid shell escaping issues), uploads via upload_artifact safe-output, and embeds the download link in the discussion

Copilot AI and others added 2 commits June 13, 2026 23:33
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…rl escaping

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title feat: add supertonic TTS shared workflow and daily-news voice summary feat: supertonic TTS shared workflow + daily-news voice artifact Jun 13, 2026
Copilot AI requested a review from pelikhan June 13, 2026 23:35
@github-actions github-actions Bot mentioned this pull request Jun 14, 2026
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Hey @Copilot 👋 — great work adding the Supertonic TTS shared workflow and wiring it into daily-news! The PR description is thorough, the implementation is focused, and the jq-safe quoting pattern for the TTS payload is a nice touch.

One thing that would strengthen this before it leaves draft:

  • No validation stepshared/supertonic.md does real work in its pre-agent steps (pip install, server startup, up-to-3-min readiness poll), but there is no smoke-test that confirms the server can actually synthesise audio before the agent tries to call it. A lightweight end-to-end health check right after the readiness loop would surface broken installs or network issues early rather than letting the agent fail mid-run.

If you'd like a hand, assign this prompt to your coding agent:

In .github/workflows/shared/supertonic.md, add a post-startup validation step that runs immediately after the readiness-poll loop.
The step should:
1. Send a minimal TTS request (short phrase, e.g. "test") to (127.0.0.1/redacted) with voice F1, lang en, steps 4.
2. Verify the response is a non-empty WAV file (check that the output file size is greater than 0 bytes).
3. Print a success line including the output file size.
4. Exit non-zero (fail the step) if the health check does not pass, so the job fails fast before the agent starts.

Generated by ✅ Contribution Check · 445.3 AIC · ⌖ 14.6 AIC · ⊞ 24.7K ·

@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot store downloaded model in an actions/cache

Copilot AI and others added 2 commits June 14, 2026 15:24
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Add actions/cache/restore before server start and actions/cache/save
after server is ready. Cache key is keyed by runner OS and installed
package version (~/.cache/supertonic3/) so subsequent runs skip the
~400 MB model download from HuggingFace.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot store downloaded model in an actions/cache

Done. Two new steps added to shared/supertonic.md (commit feat: cache supertonic model in actions/cache):

  1. Restore (actions/cache/restore@v5.0.5) — runs after install, before the server starts. Cache key: supertonic3-model-${{ runner.os }}-${{ steps.install-supertonic.outputs.version }} with a restore-keys fallback on OS alone.
  2. Save (actions/cache/save@v5.0.5) — runs after server readiness is confirmed, guaranteeing the model is fully on disk before the snapshot is taken.

The install step now also writes the package version to $GITHUB_OUTPUT so the key is automatically invalidated whenever the supertonic package version changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants