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 Characters(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