run_server.sh 731 Bytes
Newer Older
weishb's avatar
weishb committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
set -euo pipefail

SERVER="${SERVER:-http://127.0.0.1:8000}"
MODEL="${MODEL:-qwen3-tts}"
LANGUAGE="${LANGUAGE:-Auto}"

curl -sS "${SERVER}/v1/audio/speech" \
  -H "Content-Type: application/json" \
  -o output.wav \
  -d @- <<EOF
{
  "model": "${MODEL}",
  "text": "哥哥,你回来啦,人家等了你好久好久了,要抱抱!",
  "task_type": "VoiceDesign",
  "language": "${LANGUAGE}",
  "instruct": "体现撒娇稚嫩的萝莉女声,音调偏高且起伏明显,营造出黏人、做作又刻意卖萌的听觉效果。",
  "generation_params": {
    "max_new_tokens": 4096,
    "do_sample": true,
    "top_k": 50,
    "top_p": 1.0,
    "temperature": 0.9
  },
  "response_format": "wav"
}
EOF