From 64bc80f3b2f26af8d3fccb0964925e8087189261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=94=A6=E5=BC=BA?= <1061669148@qq.com> Date: Wed, 9 Apr 2025 14:43:17 +0800 Subject: [PATCH] feat: update TTS API request example and modify getVoice function parameters fix #12 --- workers/src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workers/src/index.js b/workers/src/index.js index d971e0c..ea384f8 100644 --- a/workers/src/index.js +++ b/workers/src/index.js @@ -521,14 +521,14 @@ async function handleRequest(request) {
示例请求:
-curl ${baseUrl}/v1/audio/speech \\
+curl -X POST ${baseUrl}/v1/audio/speech \\
-H "Authorization: Bearer your-secret-api-key" \\
-H "Content-Type: application/json" \\
-d '{
"model": "tts-1",
"input": "这是一个语音合成测试",
"voice": "alloy"
- }'
+ }' --output output.mp3