mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2026-01-10 04:17:01 +08:00
Compare commits
5 Commits
cddd78f318
...
784d7d1cbb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
784d7d1cbb | ||
|
|
c767f0b83b | ||
|
|
9080a967d5 | ||
|
|
51df9f7384 | ||
|
|
35fac290ba |
@ -707,12 +707,11 @@ class Text2SemanticDecoder(nn.Module):
|
|||||||
|
|
||||||
if idx == 0:
|
if idx == 0:
|
||||||
attn_mask = F.pad(attn_mask[:, :, -1].unsqueeze(-2), (0, 1), value=False)
|
attn_mask = F.pad(attn_mask[:, :, -1].unsqueeze(-2), (0, 1), value=False)
|
||||||
logits = logits[:, :-1]
|
|
||||||
else:
|
else:
|
||||||
attn_mask = F.pad(attn_mask, (0, 1), value=False)
|
attn_mask = F.pad(attn_mask, (0, 1), value=False)
|
||||||
|
|
||||||
if idx < 11: ###至少预测出10个token不然不给停止(0.4s)
|
if idx < 11: ###至少预测出10个token不然不给停止(0.4s)
|
||||||
logits = logits[:, :-1]
|
logits = logits[:, :-1]
|
||||||
|
|
||||||
samples = sample(
|
samples = sample(
|
||||||
logits, y, top_k=top_k, top_p=top_p, repetition_penalty=repetition_penalty, temperature=temperature
|
logits, y, top_k=top_k, top_p=top_p, repetition_penalty=repetition_penalty, temperature=temperature
|
||||||
|
|||||||
@ -7,7 +7,7 @@ from text.g2pw import G2PWPinyin
|
|||||||
|
|
||||||
g2pw = G2PWPinyin(
|
g2pw = G2PWPinyin(
|
||||||
model_dir="GPT_SoVITS/text/G2PWModel",
|
model_dir="GPT_SoVITS/text/G2PWModel",
|
||||||
model_source="GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large",
|
model_source=os.environ.get("bert_pretrained_dir") or os.environ.get("bert_path") or "GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large",
|
||||||
v_to_u=False,
|
v_to_u=False,
|
||||||
neutral_tone_with_five=True,
|
neutral_tone_with_five=True,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -28,15 +28,8 @@ import jieba_fast.posseg as psg
|
|||||||
is_g2pw = True # True if is_g2pw_str.lower() == 'true' else False
|
is_g2pw = True # True if is_g2pw_str.lower() == 'true' else False
|
||||||
if is_g2pw:
|
if is_g2pw:
|
||||||
# print("当前使用g2pw进行拼音推理")
|
# print("当前使用g2pw进行拼音推理")
|
||||||
from text.g2pw import G2PWPinyin, correct_pronunciation
|
from text.g2pw import correct_pronunciation
|
||||||
|
from download import g2pw
|
||||||
parent_directory = os.path.dirname(current_file_path)
|
|
||||||
g2pw = G2PWPinyin(
|
|
||||||
model_dir="GPT_SoVITS/text/G2PWModel",
|
|
||||||
model_source=os.environ.get("bert_path", "GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large"),
|
|
||||||
v_to_u=False,
|
|
||||||
neutral_tone_with_five=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
rep_map = {
|
rep_map = {
|
||||||
":": ",",
|
":": ",",
|
||||||
|
|||||||
@ -347,7 +347,7 @@ Use v4 from v1/v2/v3 environment:
|
|||||||
|
|
||||||
2. Clone the latest codes from github.
|
2. Clone the latest codes from github.
|
||||||
|
|
||||||
3. Download v4 pretrained models (gsv-v4-pretrained/s2v4.ckpt, and gsv-v4-pretrained/vocoder.pth) from [huggingface](https://huggingface.co/lj1995/GPT-SoVITS/tree/main) and put them into `GPT_SoVITS/pretrained_models`.
|
3. Download v4 pretrained models (gsv-v4-pretrained/s2v4.pth, and gsv-v4-pretrained/vocoder.pth) from [huggingface](https://huggingface.co/lj1995/GPT-SoVITS/tree/main) and put them into `GPT_SoVITS/pretrained_models`.
|
||||||
|
|
||||||
## V2Pro Release Notes
|
## V2Pro Release Notes
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user