跳轉到主要內容

請求本文

model
string
預設值:"tts-1"
TTS 模型:tts-1(標準)或 tts-1-hd(更高品質)。
input
string
必填
要用來產生音訊的文字。最多 4096 個字元。
voice
string
必填
要使用的語音:alloyashballadcoralechofablenovaonyxsageshimmerverse
response_format
string
預設值:"mp3"
音訊格式:mp3opusaacflacwavpcm
speed
number
預設值:"1.0"
音訊速度(0.25 到 4.0)。

回應

以請求的格式回傳音訊檔案。
curl -X POST "https://api.lemondata.cc/v1/audio/speech" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1-hd",
    "voice": "nova",
    "input": "Hello, welcome to LemonData!"
  }' \
  --output speech.mp3

語音範例

語音描述
alloy中性、均衡
ash平靜、沉穩
ballad富有旋律感、表現力強
coral溫暖、親切
echo溫暖、適合對話
fable表現力強、敘事感佳
nova友善、清晰
onyx低沉、具權威感
sage睿智、深思熟慮
shimmer柔和、溫柔
verse動態感強、用途多元