Skip to content

Commit

Permalink
feat:VITS 格式更新为 OGG
Browse files Browse the repository at this point in the history
  • Loading branch information
sudoskys committed Dec 22, 2022
1 parent dacd3cd commit 29c44e8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion App/Event.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import random
import re
import time
from io import BytesIO
from typing import Union

from loguru import logger

import openai_async
Expand Down Expand Up @@ -102,7 +104,10 @@ async def TTS_Support_Check(text, user_id):
params=TTS_REQ(task_id=user_id,
text=_new_text,
model_name=_vits_config["model_name"],
speaker_id=_vits_config["speaker_id"]))
speaker_id=_vits_config["speaker_id"],
audio_type="ogg"
))

if not result:
logger.error(f"TTS:{user_id} --type:vits --content: {text}:{len(text)} --{e}")
return
Expand Down
2 changes: 1 addition & 1 deletion README.EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ that are not in the preset will not be completed.
- auzre:location Server resource address
- auzre:key api key

#### VITS Voice Support Description(ONLY CN NOW)
#### VITS Voice Support Description(Language types are determined by the model)

This technology provides an emulated voice interaction technique.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ https://azure.microsoft.com/en-us/pricing/details/cognitive-services/speech-serv
- auzre:location 服务器资源地址
- auzre:key api key

#### VITS 语音支持说明(ONLY CN NOW)
#### VITS 语音支持说明(ONLY CN/JA NOW)

Api 后端请使用我打包改造的 MoeGoe https://github.com/sudoskys/MoeGoe 本机运行

Expand Down
1 change: 1 addition & 0 deletions utils/TTS.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class TTS_REQ(BaseModel):
task_id: int = 1
text: str = "[ZH]你好[ZH]"
speaker_id: int = 0
audio_type: str = "ogg"


class TTS_Clint(object):
Expand Down

0 comments on commit 29c44e8

Please sign in to comment.