Content & Media v1.0.0

sfx-generator

使用 ElevenLabs API 根据文本描述生成音效,验证输出结果并在失败时重试

ClawHub 更新于 2026-03-23 38 浏览
下载 SKILL

技能说明

使用 ElevenLabs API 根据文本描述生成音效,验证输出结果并在失败时重试

使用场景

Generates sound effects from text via ElevenLabs API with automatic validation and retry on failure

查看英文原始说明

Generates sound effects from a text description using the ElevenLabs API. It validates the output and retries on failure.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/sfx-generator
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 11 kB · zip 6.8 kB
手动下载 zip · 6.8 kB
SKILL.md text/markdown
---
name: sfx-generator
description: Generates sound effects from a text description using the ElevenLabs API. It validates the output and retries on failure.
version: 1.0.0
metadata:
  openclaw:
    emoji: "🔊"
    tags: ["sfx", "sound", "effect", "generation", "elevenlabs"]
---

# Sound Effect (SFX) Generator

This skill generates a high-quality sound effect from a simple text description, powered by the ElevenLabs SFX API.

## When to Use

This skill is typically called by the `audio-conductor` when a request is classified as a sound effect. It can also be used directly when you know you need a specific sound effect.

- **User says**: "I need the sound of a laser blast."
- **User says**: "Generate a sound of a crowd cheering."

## Core Principles

- **Simplicity**: Takes a simple text prompt and returns an audio file.
- **Quality Control**: Automatically validates the generated audio and can retry if the quality is poor.
- **Parameter Tuning**: Allows for fine-tuning of duration and prompt influence for more creative control.

## Workflow

1.  **Receive SFX Request**: The skill is triggered with a `prompt` and optional `duration_seconds`.
2.  **Set Generation Parameters**: It prepares the request for the ElevenLabs SFX API, consulting `sfx-api-kb.md` for defaults and limits.
    *   `text`: The user's prompt.
    *   `duration_seconds`: (Optional) Target length between 0.5 and 30 seconds.
    *   `prompt_influence`: (Optional) A value between 0 and 1 to control creativity vs. prompt adherence. Defaults to 0.3.
3.  **Execute Generation**: It calls the ElevenLabs SFX API (`/v1/sound-generation`).
4.  **Quality Validation**: It performs a basic check on the output to ensure it's a valid audio file and meets a minimum quality standard (e.g., not silent, no obvious clipping).
5.  **Error Handling & Retry**: If the generation fails or the quality is unacceptable, it can retry up to 2 times.
6.  **Output Audio File**: It returns the final `sfx.mp3` file and its metadata.

## Input: `SFXRequest` Schema

```yaml
prompt: "A futuristic spaceship door opening with a pneumatic hiss."
# Optional parameters
params:
  duration_seconds: 3.5
  prompt_influence: 0.5
```

## Output: `SFXOutput` Schema

```yaml
sfx_output:
  audio_file: "spaceship_door_hiss.mp3"
  audio_url: "https://..."
  duration_ms: 3489
  model_used: "eleven_text_to_sound_v2"
  request_details:
    prompt: "A futuristic spaceship door opening with a pneumatic hiss."
```

## References

- **[sfx-api-kb.md](references/sfx-api-kb.md)**: Defines the ElevenLabs SFX API specifications, parameter details, and best practices.

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。