- android-engine:TextToSpeechService 引擎,含设置页、语音包导入(SHA-256 校验)与预热 - server:Go CPU 合成服务与部署文件 - test-client:端到端验证客户端 - 模型与语音包不入库,见 models/README.md
90 lines
2.0 KiB
YAML
90 lines
2.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: tts-server
|
|
namespace: youlai
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: tts-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: tts-server
|
|
spec:
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 65534
|
|
fsGroup: 65534
|
|
containers:
|
|
- name: tts-server
|
|
image: docker.io/library/tts-server:dev-1
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 8080
|
|
env:
|
|
- name: TTS_VOICES
|
|
value: /voices
|
|
- name: TTS_CACHE
|
|
value: /cache
|
|
- name: TTS_THREADS
|
|
value: "2"
|
|
- name: TTS_QUEUE
|
|
value: "2"
|
|
- name: TTS_MAX_TEXT
|
|
value: "300"
|
|
- name: GOMEMLIMIT
|
|
value: 256MiB
|
|
resources:
|
|
requests:
|
|
cpu: 200m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 1500m
|
|
memory: 768Mi
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
failureThreshold: 12
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 8080
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
failureThreshold: 3
|
|
volumeMounts:
|
|
- name: voices
|
|
mountPath: /voices
|
|
readOnly: true
|
|
- name: cache
|
|
mountPath: /cache
|
|
volumes:
|
|
- name: voices
|
|
hostPath:
|
|
path: /opt/tts/voices
|
|
type: Directory
|
|
- name: cache
|
|
emptyDir:
|
|
sizeLimit: 1Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: tts-server
|
|
namespace: youlai
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app: tts-server
|
|
ports:
|
|
- name: http
|
|
port: 8080
|
|
targetPort: 8080
|
|
nodePort: 30810 |