rw-generate-audio
作者: runwayml
通过可运行脚本使用Runway API生成音频。支持文本转语音、音效、人声分离、配音及语音转换。
npx skills add https://github.com/runwayml/skills --skill rw-generate-audioGenerate Audio
Generate audio directly using the Runway API. Supports text-to-speech, sound effects, voice isolation, dubbing, and speech-to-speech voice conversion.
IMPORTANT: Run scripts from the user's working directory so output files are saved where the user expects.
Usage
uv run scripts/generate_audio.py --type tts --text "Hello world" --filename "greeting.mp3" [--voice-id ID] [--api-key KEY]
Preflight
command -v uvmust succeedRUNWAYML_API_SECRETmust be set, or pass--api-key
Audio Types
| Type | Description | Required Args |
|---|---|---|
tts | Text to speech | --text |
sfx | Sound effect generation | --text |
isolate | Isolate voice from audio | --audio-url |
dub | Dub to another language | --audio-url, --target-language |
sts | Voice conversion | --audio-url |
Parameters
| Param | Description | Default |
|---|---|---|
--type | Audio type (required): tts, sfx, isolate, dub, sts | -- |
--filename | Output filename (required) | -- |
--text | Text input (for tts and sfx) | -- |
--audio-url | Audio URL or local path (for isolate, dub, sts) | -- |
--voice-id | Voice preset (for tts and sts, e.g. Maya, Noah, Leslie) | Maya |
--target-language | Language code (for dub, e.g. "es") | -- |
--output-dir | Output directory | cwd |
--api-key | Runway API key | env RUNWAYML_API_SECRET |
Examples
Text-to-speech:
uv run scripts/generate_audio.py --type tts --text "Welcome to our product showcase" --filename "voiceover.mp3"
Sound effect:
uv run scripts/generate_audio.py --type sfx --text "Thunder rolling across a stormy sky" --filename "thunder.mp3"
Voice isolation:
uv run scripts/generate_audio.py --type isolate --audio-url "noisy-recording.mp3" --filename "clean-voice.mp3"
Speech-to-speech (voice conversion):
uv run scripts/generate_audio.py --type sts --audio-url "recording.mp3" --voice-id Noah --filename "converted.mp3"
Dubbing:
uv run scripts/generate_audio.py --type dub --audio-url "english-narration.mp3" --target-language es --filename "spanish-dub.mp3"
Output
- The script downloads the result and saves it to the specified path
- Script outputs the full path to the saved file
来自 runwayml 的更多技能
recipe-full-setup
runwayml
完成Runway API设置:检查兼容性,配置API密钥,并集成生成端点
official
integrate-character-embed
runwayml
帮助用户使用 @runwayml/avatars-react SDK 在 React 应用中嵌入 Runway Character 头像调用
official
integrate-characters
runwayml
帮助用户创建Runway角色(GWM-1头像)并将实时对话会话集成到他们的应用中
official
integrate-documents
runwayml
帮助用户向Runway Characters添加知识库文档,以进行特定领域的对话
official
integrate-image
runwayml
帮助用户集成Runway图像生成API(带参考图像的文本到图像)
official
integrate-uploads
runwayml
帮助用户将本地文件上传到Runway,作为生成模型的输入使用。
official
integrate-video
runwayml
帮助用户集成Runway视频生成API(文本转视频、图像转视频、视频转视频)
official
runway-studio-skills
runwayml
使用Runway API生成工作室级别的视频、图像和音频。所有命令均为独立的Python脚本,通过从技能根目录运行uv run来执行。
official