Accelerated FireRedTTS1 with RedServing
-
Download the FireRedTTS model:
# Note! this weight is for non-commercial usage only huggingface-cli download --resume-download --repo-type model FireRedTeam/FireRedTTS-1S --revision fireredtts1s_4_chat --local-dir ./tts_4_chat -
Run service:
docker run -td --name ttsserver --security-opt seccomp:unconfined -v "$(pwd)/tts_4_chat/pretrained_models:/workspace/models/redtts" -p 8081:8081 crpi-byegxpnnsibfy3j1.cn-shanghai.personal.cr.aliyuncs.com/fireredchat/fireredtts1-server:latest bash /workspace/run.sh --llm --svc_config_path /workspace/svc.yaml --port 8081 --http_uri=/v1/audio/speech
Endpoint: POST /v1/audio/speech
Example using curl:
curl https://localhost:8081/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"input": "哈喽,你好呀~",
"voice": "f531",
"response_format": "mp3"
}' --output audio.mp3Response:
<audio binary>This TTS model weight is not under Apache2.0 (FireRedTeam/FireRedTTS-1S, revision fireredtts1s_4_chat) and the voice f531 included are for non-commercial usage only. You should also not use any f531 derivatives to train/distill your own model.