audio-cog
OpenSquilla-compatible audio generation adapter for webpage audio requests. Prefer OpenRouter config/API key in OpenSquilla; preserve the upstream C…
它会碰到什么
逐条看命中(6 条严重或高危)
- 高
scripts/openrouter_audio.py:130cred-envreadlease_required = os.environ.get(META_CAPABILITY_LEASE_REQUIRED_ENV) == "1"
- 高
scripts/openrouter_audio.py:132cred-envreadprovider = os.environ.get(META_CAPABILITY_PROVIDER_ENV, "").strip().lower()
- 高
scripts/openrouter_audio.py:136cred-envreados.environ.get(META_CAPABILITY_API_KEY_ENV, "").strip(),
- 高
scripts/openrouter_audio.py:137cred-envreados.environ.get(META_CAPABILITY_BASE_URL_ENV, "").strip().rstrip("/"), - 高
scripts/openrouter_audio.py:138cred-envreados.environ.get(META_CAPABILITY_PROXY_ENV, "").strip(),
- 高
scripts/openrouter_audio.py:143cred-envreadstr(args.api_key.strip() or os.environ.get(api_key_env, "")),
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
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. During MetaSkill
execution it receives a short-lived provider connection from ordinary Provider
Settings in the child process only; the credential and endpoint never enter
with, argv, the plan, or persisted run data. It 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:
- Use the code-owned OpenRouter capability candidate and the volatile provider
lease resolved from ordinary Provider Settings after explicit approval.
- Use only
config.awesome_webpage.openrouter.models.audio_generationfor
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_pathMUST be the relative pathproject/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/completionswith body:
{
"model": "<audio_generation>",
"stream": true,
"modalities": ["text", "audio"],
"audio": {"voice": "alloy", "format": "pcm16"},
"messages": [...]
}
stream: trueis REQUIRED. Non-streaming requests are rejected with
HTTP 400 "Audio output requires stream: true".
audio.formatMUST bepcm16when 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.datachunk,
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 toaudio/wavin the manifest. - If the required MetaSkill provider lease is missing or invalid, emit
AUDIO_CONFIG_NEEDED and exit 78 before any provider submission. Direct
standalone CLI use may still read OPENROUTER_API_KEY; never fall back to
CELLCOG_API_KEY or another provider.
- Provider/model failures after submission remain an exit-0 degradation with a
structured replacement slot. They are never automatically replayed.
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.
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
src/opensquilla/skills/bundled/audio-cog/SKILL.md