- newapi 的 docker-compose。如果没有用newapi,也是类似的,把tts这项加到openwebui的docker-compose里
version: '3.4'
services:
new-api:
image: calciumion/new-api:latest
# build: .
container_name: new-api
restart: always
command: --log-dir /app/logs
ports:
- "3333:3000"
volumes:
- ./data:/data
- ./logs:/app/logs
environment:
- REDIS_CONN_STRING=redis://redis
- SESSION_SECRET=random # 修改为随机字符串
- TZ=Asia/Shanghai
depends_on:
- redis
- tts
healthcheck:
test: [ "CMD-SHELL", "wget -q -O - http://localhost:3000/api/status | grep -o '\"success\":\\s*true' | awk -F: '{print $2}'" ]
interval: 30s
timeout: 10s
retries: 3
extra_hosts:
- "host.docker.internal:host-gateway"
redis:
image: redis:latest
container_name: redis_newapi
restart: always
tts:
image: mzzsfy/tts
container_name: tts
restart: always
- newapi添加渠道:
代理:http://tts:8080
模型:tts-1
密钥:随便填一个 - openwebui 填写语音配置
语音转文本用硅基流动的免费模型,填硅基流动的地址和key
模型名:FunAudioLLM/SenseVoiceSmall
文本转语音填newapi的地址,我整理了一下可选音色
ShortName | Gender | ContentCategories | VoicePersonalities |
---|---|---|---|
zh-CN-XiaoxiaoNeural | Female | News,Novel | Warm |
zh-CN-XiaoyiNeural | Female | Cartoon,Novel | Lively |
zh-CN-YunjianNeural | Male | Sports, Novel | Passion |
zh-CN-YunxiNeural | Male | Novel | Lively,Sunshine |
zh-CN-YunxiaNeural | Male | Cartoon,Novel | Cute |
zh-CN-YunyangNeural | Male | News | Professional,Reliable |
zh-CN-liaoning-XiaobeiNeural | Female | Dialect | Humorous |
zh-CN-shaanxi-XiaoniNeural | Female | Dialect | Bright |
这样的话,openwebui的语音对话就可以用了。一句一答
感谢大佬