彈性參數
可設定 2 個已記錄的參數,包括 output_format, text。
Text-to-sound effects for games, video, and podcasts
curl -X POST https://runapi.ai/api/v1/elevenlabs/text_to_sound \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sound-effect-v2",
"text": "Convert this paragraph into natural speech with a warm British male voice, moderate pace."
}'
import { ElevenlabsClient } from "@runapi.ai/elevenlabs";
const client = new ElevenlabsClient();
const result = await client.textToSound.run({
model: "sound-effect-v2",
text: "Convert this paragraph into natural speech with a warm British male voice, moderate pace.",
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/elevenlabs/text_to_sound",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"sound-effect-v2","text":"Convert this paragraph into natural speech with a warm British male voice, moderate pace."}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/elevenlabs/text_to_sound");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'sound-effect-v2',
'text' => 'Convert this paragraph into natural speech with a warm British male voice, moderate pace.',
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.textToSound().run({"model":"sound-effect-v2","text":"Convert this paragraph into natural speech with a warm British male voice, moderate pace."});
task.waitForResult();
require "runapi/elevenlabs"
client = RunApi::Elevenlabs::Client.new
result = client.text_to_sound.run(
model: "sound-effect-v2",
text: "Convert this paragraph into natural speech with a warm British male voice, moderate pace."
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.textToSound.Run({"model":"sound-effect-v2","text":"Convert this paragraph into natural speech with a warm British male voice, moderate pace."})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model sound-effect-v2 \
--endpoint text_to_sound \
--wait
6 個版本可用
選擇任一模型,幾秒內即可開始生成。
選擇任一模型,幾秒內即可開始生成。
| 提供者 | ElevenLabs |
| 模型 ID | sound-effect-v2 |
| 模態 | Audio & Music |
| 任務類型 | Asynchronous |
| API 端點 | /api/v1/elevenlabs/text_to_sound |
| 計費單位 | minute |
| 輸入參數 | output_format, text |
| 輸出格式 | mp3_22050_32, mp3_44100_32, mp3_44100_64, mp3_44100_96, mp3_44100_128, mp3_44100_192, pcm_8000, pcm_16000, pcm_22050, pcm_24000, pcm_44100, pcm_48000, ulaw_8000, alaw_8000, opus_48000_32, opus_48000_64, opus_48000_96, opus_48000_128, opus_48000_192 |
| 目錄狀態 | 可直接上線 |
免費註冊後,從控制台建立 sound-effect-v2 的 API 金鑰。
向 /api/v1/elevenlabs/text_to_sound 傳送 POST 請求,並傳入 sound-effect-v2 模型 ID 與參數。
輪詢工作或依照回呼取得已完成的 sound-effect-v2 結果。
可設定 2 個已記錄的參數,包括 output_format, text。
公開 1 個公共 endpoint:text_to_sound。
依 minute 計量,無需訂閱。
text暫無描述。
output_format暫無描述。 (mp3_22050_32, mp3_44100_32, mp3_44100_64, mp3_44100_96, mp3_44100_128, mp3_44100_192, pcm_8000, pcm_16000, pcm_22050, pcm_24000, pcm_44100, pcm_48000, ulaw_8000, alaw_8000, opus_48000_32, opus_48000_64, opus_48000_96, opus_48000_128, opus_48000_192)
依照單集情緒生成免版稅背景音樂,無需支付授權費。
為程序化生成的關卡產生可自適應的環境音景與效果音。
無需錄音室即可為客戶廣告製作客製化旁白與音效。
傳入 quickstart 顯示的 model ID。
每個金鑰的速率限制會依使用方案而調整。請查看定價頁面以了解目前限制。
可以——variant 只是旗標。只要變更 model 參數即可切換。
只要支援串流,RunAPI 就會端到端串流。
請在公開 GitHub repo 提交 issue,或寄信給支援。