Feat: support auto split in webui (#158)

* Feat: support auto split in webui

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Sora
2023-11-08 17:08:47 +08:00
committed by GitHub
parent af7b0ea0ff
commit ee423f29df
3 changed files with 7 additions and 3 deletions

View File

@@ -2,8 +2,8 @@
VITS2 Backbone with bert VITS2 Backbone with bert
# 紧急通知 # 紧急通知
我们在2.0版本中发现了重大bug该bug导致日文和英文bert被置0后训练即失去bert效果。 我们在2.0版本中发现了重大bug该bug导致日文和英文bert被置0后训练即失去bert效果。
我们将重炼2.0版本底模,已经开炉的建议关炉静候。 我们将重炼2.0版本底模,已经开炉的建议关炉静候。
## 请注意,本项目核心思路来源于[anyvoiceai/MassTTS](https://github.com/anyvoiceai/MassTTS) 一个非常好的tts项目 ## 请注意,本项目核心思路来源于[anyvoiceai/MassTTS](https://github.com/anyvoiceai/MassTTS) 一个非常好的tts项目
## MassTTS的演示demo为[ai版峰哥锐评峰哥本人,并找回了在金三角失落的腰子](https://www.bilibili.com/video/BV1w24y1c7z9) ## MassTTS的演示demo为[ai版峰哥锐评峰哥本人,并找回了在金三角失落的腰子](https://www.bilibili.com/video/BV1w24y1c7z9)

View File

@@ -5,6 +5,7 @@ import logging
import gc import gc
import random import random
import gradio
import numpy as np import numpy as np
import utils import utils
from fastapi import FastAPI, Query, Request from fastapi import FastAPI, Query, Request
@@ -245,6 +246,7 @@ if __name__ == "__main__":
) )
audios.append(np.zeros((int)(44100 * 0.3))) audios.append(np.zeros((int)(44100 * 0.3)))
audio = np.concatenate(audios) audio = np.concatenate(audios)
audio = gradio.processing_utils.convert_to_16_bit_wav(audio)
wavContent = BytesIO() wavContent = BytesIO()
wavfile.write( wavfile.write(
wavContent, loaded_models.models[model_id].hps.data.sampling_rate, audio wavContent, loaded_models.models[model_id].hps.data.sampling_rate, audio

View File

@@ -9,6 +9,8 @@ import sys
logger.remove() logger.remove()
# 自定义格式并添加到标准输出 # 自定义格式并添加到标准输出
log_format = "<g>{time:MM-DD HH:mm:ss}</g> [<lvl>{level}</lvl>] | {message}" log_format = (
"<g>{time:MM-DD HH:mm:ss}</g> [<lvl>{level}</lvl>] | {file}:{line} | {message}"
)
logger.add(sys.stdout, format=log_format) logger.add(sys.stdout, format=log_format)