- android-engine:TextToSpeechService 引擎,含设置页、语音包导入(SHA-256 校验)与预热 - server:Go CPU 合成服务与部署文件 - test-client:端到端验证客户端 - 模型与语音包不入库,见 models/README.md
44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
# TTS 在线合成(k3s NodePort 30810)反向代理
|
|
# 证书由 certbot 签发(自动续期):
|
|
# certbot certonly --webroot -w /var/www/certbot -d tts.ttstd.com
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name tts.ttstd.com;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name tts.ttstd.com;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/tts.ttstd.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/tts.ttstd.com/privkey.pem;
|
|
ssl_session_timeout 5m;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_prefer_server_ciphers on;
|
|
|
|
client_max_body_size 1m;
|
|
|
|
# 服务本身无鉴权,对外开放前需自行加访问控制
|
|
location / {
|
|
proxy_pass http://127.0.0.1:30810;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_connect_timeout 10s;
|
|
proxy_read_timeout 30s;
|
|
proxy_send_timeout 30s;
|
|
proxy_buffering off;
|
|
}
|
|
} |