audio-cog

GitHub

作为OpenSquilla兼容的音频生成适配器,通过Python脚本调用OpenRouter模型生成WAV音频。支持传入脚本精确合成,自动处理配置校验与路径管理,返回标准化状态标识及元数据,适用于网页项目中的语音、音乐及音效生成。

src/opensquilla/skills/bundled/audio-cog/SKILL.md opensquilla/opensquilla

Trigger Scenarios

需要为网页项目生成配音或音效 Meta-Skill请求使用OpenRouter进行音频合成

Install

npx skills add opensquilla/opensquilla --skill audio-cog -g -y
More Options

Non-standard path

npx skills add https://github.com/opensquilla/opensquilla/tree/main/src/opensquilla/skills/bundled/audio-cog -g -y

Use without installing

npx skills use opensquilla/opensquilla@audio-cog

指定 Agent (Claude Code)

npx skills add opensquilla/opensquilla --skill audio-cog -a claude-code -g -y

安装 repo 全部 skill

npx skills add opensquilla/opensquilla --all -g -y

预览 repo 内 skill

npx skills add opensquilla/opensquilla --list

SKILL.md

Frontmatter
{
    "name": "audio-cog",
    "author": "CellCog",
    "homepage": "https:\/\/cellcog.ai",
    "metadata": {
        "openclaw": {
            "os": [
                "darwin",
                "linux",
                "windows"
            ],
            "emoji": "🎵",
            "requires": {
                "env": [
                    "CELLCOG_API_KEY"
                ],
                "bins": [
                    "python3"
                ]
            }
        },
        "opensquilla": {
            "risk": "medium",
            "requires": {
                "env": [],
                "bins": [
                    "python3"
                ],
                "config": [
                    "awesome_webpage.provider",
                    "awesome_webpage.openrouter.api_key",
                    "awesome_webpage.openrouter.api_key_env",
                    "awesome_webpage.openrouter.models.audio_generation",
                    "awesome_webpage.output_dir"
                ]
            },
            "capabilities": [
                "network-write",
                "filesystem-write"
            ]
        }
    },
    "entrypoint": {
        "env": {
            "{{ with.api_key_env | default('OPENROUTER_API_KEY') }}": "{{ with.api_key | default('') }}"
        },
        "args": [
            "--model",
            "{{ with.model | default('openai\/gpt-audio-mini') }}",
            "--base-url",
            "{{ with.base_url | default('https:\/\/openrouter.ai\/api\/v1') }}",
            "--api-key-env",
            "{{ with.api_key_env | default('OPENROUTER_API_KEY') }}",
            "--output-dir",
            "{{ with.output_dir }}",
            "--filename",
            "{{ with.filename | default('narration.wav') }}",
            "--voice",
            "{{ with.voice | default('cedar') }}"
        ],
        "parse": "text",
        "stdin": "{{ with.payload | default(with.prompt | default(inputs.user_message)) }}",
        "command": "python {baseDir}\/scripts\/openrouter_audio.py",
        "timeout": 240
    },
    "provenance": {
        "origin": "clawhub-mit0",
        "license": "MIT-0",
        "upstream_url": "https:\/\/clawhub.ai\/skills\/audio-cog",
        "maintained_by": "OpenSquilla"
    },
    "description": "OpenSquilla-compatible audio generation adapter for webpage audio requests. Prefer OpenRouter config\/API key in OpenSquilla; preserve the upstream CellCog workflow only as optional ClawHub provenance.",
    "dependencies": [
        "cellcog"
    ]
}

Audio Cog - AI Audio Generation Powered by CellCog

Create professional audio with AI — voiceovers, music, sound effects, and personalized avatar voices.

Meta-Skill Entrypoint

Meta-skills should run this skill as skill_exec when they need OpenRouter audio. The entrypoint is a deterministic Python adapter: it uses an explicit with.api_key value by injecting it into the configured with.api_key_env child process environment variable, calls the configured OpenRouter audio model, writes a browser-playable WAV file under the supplied output directory, and prints either AUDIO_READY: or a single failure label. Do not spawn an LLM sub-agent just to generate audio.

Prefer JSON payload mode when the caller already has a narration script:

{"script": "exact spoken narration text"}

In payload mode the adapter asks the audio model to speak exactly that transcript and not add acknowledgements, titles, or setup text.

OpenSquilla Compatibility Contract

When invoked from OpenSquilla, this skill is an adapter around the caller's configured provider. Do not require CELLCOG_API_KEY, do not assume the cellcog package is installed, and do not invent provider credentials.

For AwesomeWebpageMetaSkill:

  • Read provider settings from config.awesome_webpage.
  • Use config.awesome_webpage.provider; the expected value is openrouter.
  • Use config.awesome_webpage.openrouter.api_key or the configured api_key_env value, normally OPENROUTER_API_KEY.
  • Use only config.awesome_webpage.openrouter.models.audio_generation for audio model selection.
  • Save generated or processed files only under config.awesome_webpage.output_dir/project/assets/audio.
  • If the OpenRouter key, audio model, or output directory is missing, return a concise AUDIO_CONFIG_NEEDED report listing the missing config keys.
  • If the configured OpenRouter model cannot return a browser-playable audio file, return AUDIO_MODEL_UNSUPPORTED with the narration/script, desired duration, style, and target filename so the webpage can expose a clean replacement slot instead of failing the whole project.

On success: AUDIO_READY manifest line (required)

After every successful save, end your reply with one single-line JSON record per file so AwesomeWebpageMetaSkill can collect and bind the assets:

AUDIO_READY: {"local_path": "project/assets/audio/<slug>.wav", "mime": "audio/wav", "duration_s": <int_or_null>, "voice": "<voice>", "script_preview": "<first 80 chars>"}
  • One AUDIO_READY: line per audio file. No trailing prose on that line.
  • local_path MUST be the relative path project/assets/audio/.... Do NOT emit an absolute path here.
  • On failure, emit one of AUDIO_CONFIG_NEEDED, AUDIO_MODEL_UNSUPPORTED, or AUDIO_GENERATION_FAILED as a single-line label with the replacement-slot path so the page can render a placeholder.

OpenRouter Audio API Contract (hard rule for openai/gpt-audio*)

The default CellCog code-path is wrong for OpenSquilla and will fail. OpenRouter routes openai/gpt-audio / openai/gpt-audio-mini through OpenAI's audio-output mode, which has a strict request shape:

  • POST {base_url}/chat/completions with body:
    {
      "model": "<audio_generation>",
      "stream": true,
      "modalities": ["text", "audio"],
      "audio": {"voice": "alloy", "format": "pcm16"},
      "messages": [...]
    }
    
  • stream: true is REQUIRED. Non-streaming requests are rejected with HTTP 400 "Audio output requires stream: true".
  • audio.format MUST be pcm16 when streaming. mp3, opus, flac, wav are all rejected as "unsupported_value" — there is no alternative combo. Sending format=mp3 (any stream setting) burns ~190 s of per-attempt timeout for nothing; do not try it.
  • Read the SSE response, base64-decode each delta.audio.data chunk, concatenate the raw 24kHz mono signed-16-bit-little-endian PCM stream, then save it as a browser-playable WAV file.
  • Final on-disk asset is .wav. Set MIME to audio/wav in the manifest.
  • If OPENROUTER_API_KEY is missing, return AUDIO_CONFIG_NEEDED. Do not fall back to CELLCOG_API_KEY or any other provider.

Upstream CellCog instructions are intentionally omitted from the executable prompt body. OpenSquilla meta-skills use the entrypoint above; provenance is kept in frontmatter for registry/audit purposes.

Version History

  • 7f72a32 Current 2026-07-05 18:38

Dependencies

  • required cellcog

Same Skill Collection

src/opensquilla/skills/bundled/advanced-dubbing-studio/SKILL.md
src/opensquilla/skills/bundled/ai-video-script/SKILL.md
src/opensquilla/skills/bundled/awesome-webpage-image-download/SKILL.md
src/opensquilla/skills/bundled/awesome-webpage-research/SKILL.md
src/opensquilla/skills/bundled/AwesomeWebpageMetaSkill/SKILL.md
src/opensquilla/skills/bundled/cron/SKILL.md
src/opensquilla/skills/bundled/docx/SKILL.md
src/opensquilla/skills/bundled/filesystem/SKILL.md
src/opensquilla/skills/bundled/git-diff/SKILL.md
src/opensquilla/skills/bundled/github/SKILL.md
src/opensquilla/skills/bundled/history-explorer/SKILL.md
src/opensquilla/skills/bundled/html-coder/SKILL.md
src/opensquilla/skills/bundled/html-to-pdf/SKILL.md
src/opensquilla/skills/bundled/http-fetch/SKILL.md
src/opensquilla/skills/bundled/latex-compile/SKILL.md
src/opensquilla/skills/bundled/memory/SKILL.md
src/opensquilla/skills/bundled/music-and-singing-studio/SKILL.md
src/opensquilla/skills/bundled/nano-banana-pro-openrouter/SKILL.md
src/opensquilla/skills/bundled/nano-banana-pro/SKILL.md
src/opensquilla/skills/bundled/nano-pdf/SKILL.md
src/opensquilla/skills/bundled/openrouter-video-generator/SKILL.md
src/opensquilla/skills/bundled/paper-abstract-author/SKILL.md
src/opensquilla/skills/bundled/paper-citation-planner/SKILL.md
src/opensquilla/skills/bundled/paper-experiment-stub/SKILL.md
src/opensquilla/skills/bundled/paper-outline-author/SKILL.md
src/opensquilla/skills/bundled/paper-preference-planner/SKILL.md
src/opensquilla/skills/bundled/paper-refbib-stub/SKILL.md
src/opensquilla/skills/bundled/paper-revision-author/SKILL.md
src/opensquilla/skills/bundled/paper-section-author/SKILL.md
src/opensquilla/skills/bundled/paper-source-curator/SKILL.md
src/opensquilla/skills/bundled/pptx/SKILL.md
src/opensquilla/skills/bundled/seedance-2-prompt/SKILL.md
src/opensquilla/skills/bundled/skill-creator-linter/SKILL.md
src/opensquilla/skills/bundled/skill-creator-proposals/SKILL.md
src/opensquilla/skills/bundled/skill-creator-smoke-test/SKILL.md
src/opensquilla/skills/bundled/srt-from-script/SKILL.md
src/opensquilla/skills/bundled/stack-trace-generic-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-go-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-js-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-python-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-rust-probe/SKILL.md
src/opensquilla/skills/bundled/subtitle-burner/SKILL.md
src/opensquilla/skills/bundled/swe-bench/SKILL.md
src/opensquilla/skills/bundled/text-file-read/SKILL.md
src/opensquilla/skills/bundled/title-card-image/SKILL.md
src/opensquilla/skills/bundled/video-merger/SKILL.md
src/opensquilla/skills/bundled/video-still-animator/SKILL.md
src/opensquilla/skills/bundled/voice-clone-lab/SKILL.md
src/opensquilla/skills/bundled/voice-conversion-studio/SKILL.md
src/opensquilla/skills/bundled/voiceover-studio/SKILL.md
src/opensquilla/skills/bundled/weather/SKILL.md
src/opensquilla/skills/bundled/web-search/SKILL.md
src/opensquilla/skills/bundled/xlsx/SKILL.md
src/opensquilla/skills/exp/meta-arxiv-daily-digest-deck/SKILL.md
src/opensquilla/skills/exp/meta-codereview-current-diff/SKILL.md
src/opensquilla/skills/exp/meta-compliance-audit-bundle/SKILL.md
src/opensquilla/skills/exp/meta-diagram-triangulation/SKILL.md
src/opensquilla/skills/exp/meta-github-pr-watch-digest/SKILL.md
src/opensquilla/skills/exp/meta-issue-to-pr-autopilot/SKILL.md
src/opensquilla/skills/exp/meta-knowledge-base-bootstrap/SKILL.md
src/opensquilla/skills/exp/meta-migration-assistant/SKILL.md
src/opensquilla/skills/exp/meta-multi-format-export-pack/SKILL.md
src/opensquilla/skills/exp/meta-pdf-intelligence/SKILL.md
src/opensquilla/skills/exp/meta-pdf-reformat-pipeline/SKILL.md
src/opensquilla/skills/exp/meta-pre-commit-quality-gate/SKILL.md
src/opensquilla/skills/exp/meta-scheduled-morning-digest/SKILL.md
src/opensquilla/skills/exp/meta-security-review-bundle/SKILL.md
src/opensquilla/skills/exp/meta-spreadsheet-insight/SKILL.md
src/opensquilla/skills/exp/meta-stack-trace-investigator/SKILL.md
src/opensquilla/skills/exp/meta-travel-planner/SKILL.md
src/opensquilla/skills/exp/meta-web-to-pdf-briefing/SKILL.md
tests/_fixtures/meta-paper-write-handwritten.SKILL.md
src/opensquilla/skills/bundled/code-task/SKILL.md
src/opensquilla/skills/bundled/deep-research/SKILL.md
src/opensquilla/skills/bundled/meta-kid-project-planner/SKILL.md
src/opensquilla/skills/bundled/meta-paper-write/SKILL.md
src/opensquilla/skills/bundled/meta-short-drama/SKILL.md
src/opensquilla/skills/bundled/meta-skill-creator/SKILL.md
src/opensquilla/skills/bundled/multi-search-engine/SKILL.md
src/opensquilla/skills/bundled/pdf-toolkit/SKILL.md
src/opensquilla/skills/bundled/skill-creator/SKILL.md
src/opensquilla/skills/bundled/sub-agent/SKILL.md
src/opensquilla/skills/bundled/summarize/SKILL.md
src/opensquilla/skills/bundled/tmux/SKILL.md
src/opensquilla/skills/exp/meta-long-running-build-watchdog/SKILL.md
src/opensquilla/skills/bundled/paper-plot-stub/SKILL.md
src/opensquilla/skills/exp/meta-content-publish-pipeline/SKILL.md
src/opensquilla/skills/exp/meta-home-it-rescue/SKILL.md
src/opensquilla/skills/exp/meta-meeting-to-workflow/SKILL.md
src/opensquilla/skills/exp/meta-research-to-slide-deck/SKILL.md
src/opensquilla/skills/exp/meta-sales-lead-researcher/SKILL.md

Metadata

Files
0
Version
7f72a32
Hash
ae7481b3
Indexed
2026-07-05 18:38

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-08 23:20
浙ICP备14020137号-1 $Гость$