Skip to content

Commit aa090fa

Browse files
committed
update:
1 parent e94c731 commit aa090fa

File tree

4 files changed

+38
-26
lines changed

4 files changed

+38
-26
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
2. ChatTTS原始项目新版本有兼容问题,可能会报错 “报错 Normalizer pynini WeTextProcessing nemo_text_processing ”
9494
9595
解决方法:
96+
9697
新版使用了 nemo_text_processing 和 pynini 来处理中文,但遗憾的是,pynini压根无法在windows平台安装和使用,要使用,也只能安装在WSL子系统上。
9798
9899
不管给出的什么安装方式, 比如
@@ -113,6 +114,7 @@ pip install pynini==2.1.5 Cython WeTextProcessing
113114
114115
![image](https://github.com/2noise/ChatTTS/assets/3378335/5bdd3dc8-0c7c-485f-b5dc-613f14917319)
115116
117+
或者 chat.infer() 添加参数 do_text_normalization=False, chat.infer(do_text_normalization=False)
116118
117119
118120

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def tts():
146146
'temperature':temperature,
147147
'top_P':top_p,
148148
'top_K':top_k
149-
}, params_refine_text= {'prompt': prompt})
149+
}, params_refine_text= {'prompt': prompt},do_text_normalization=False)
150150
# 初始化一个空的numpy数组用于之后的合并
151151
combined_wavdata = np.array([], dtype=wavs[0][0].dtype) # 确保dtype与你的wav数据类型匹配
152152

faq.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,6 @@ pip install pynini==2.1.5 Cython WeTextProcessing
8585
![image](https://github.com/2noise/ChatTTS/assets/3378335/5bdd3dc8-0c7c-485f-b5dc-613f14917319)
8686

8787

88-
问题解决
88+
问题解决
89+
90+
或者 chat.infer() 添加参数 do_text_normalization=False, chat.infer(do_text_normalization=False)

templates/index.html

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,39 @@ <h1 class="text-center">ChatTTS WebUI & API<span class="fs-6">(v{{version}})</sp
3838
<hr>
3939
<div class="row justify-content-center">
4040
<div class="col-12 my-2">
41-
<textarea id="text-input" class="form-control" rows="3" placeholder="在此输入要转换的文本,以行为单位合成..."></textarea>
41+
<textarea id="text-input" class="form-control d-block" rows="3" placeholder="在此输入要转换的文本,以行为单位合成..."></textarea>
42+
<span class="text-secondary fs-6">除文本框必填外,其他均为可选,若不懂无需填写</span>
4243
</div>
43-
<div class="col-5 my-2 d-flex ">
44-
<select id="voice" class="form-control w-25">
45-
<option value="2222">男音色1</option>
46-
<option value="7869">男音色2</option>
47-
<option value="6653">男音色3</option>
48-
<option value="4099">女音色1</option>
49-
<option value="5099">女音色2</option>
50-
<option value="3333">女音色3</option>
51-
</select>
52-
<input id="custom_voice" data-toggle="tooltip" title="填写后将忽略左侧音色选择,以该填写值获取音色" class="form-control w-75" placeholder="自定义音色种子值,大于1,如 3000 9000等" type="number" min="0" />
53-
54-
</div>
55-
<div class="col-5 my-2">
56-
<input id="prompt" class="form-control" placeholder="填写prompt,如 [oral_2][laugh_0][break_6] ,不懂请留空" />
57-
</div>
58-
59-
<div class="col-2 my-2 d-flex align-items-center">
60-
<div class="form-check" title="如果文本中加入了控制符或效果较差,可尝试选中该项" data-toggle="tooltip">
61-
<input type="checkbox" class="form-check-input" id="skip_refine">
62-
<label class="form-check-label" for="skip_refine">跳过refine text</label>
63-
</div>
44+
<div class="col-12 my-2 ">
45+
<div class="row align-items-center">
46+
<div class="col align-items-center input-group">
47+
<span class="input-group-text">选择音色</span>
48+
<select id="voice" class="form-control">
49+
<option value="2222">男音色1</option>
50+
<option value="7869">男音色2</option>
51+
<option value="6653">男音色3</option>
52+
<option value="4099">女音色1</option>
53+
<option value="5099">女音色2</option>
54+
<option value="3333">女音色3</option>
55+
</select>
56+
</div>
57+
<div class="col align-items-center input-group">
58+
<span class="input-group-text" id="">自定义音色值</span>
59+
<input id="custom_voice" data-toggle="tooltip" title="填写后将忽略左侧音色选择,以该填写值获取音色,例如 2000,8000等" class="form-control" placeholder="自定义音色种子值,大于1,如 3000 9000等" type="number" min="0" />
60+
</div>
61+
<div class="col align-items-center input-group">
62+
<span class="input-group-text" id="">Prompt</span>
63+
<input id="prompt" class="form-control" data-toggle="tooltip" title="填写prompt,如 [oral_2][laugh_0][break_6]" placeholder="填写prompt,如 [oral_2][laugh_0][break_6]" />
64+
</div>
65+
<div class="col align-items-center">
66+
<div class="form-check" title="如果文本中加入了控制符或效果较差,可尝试选中该项" data-toggle="tooltip">
67+
<input type="checkbox" class="form-check-input" id="skip_refine">
68+
<label class="form-check-label" for="skip_refine">跳过refine text</label>
69+
</div>
70+
</div>
71+
</div>
6472
</div>
65-
<div class="col-12 d-flex align-items-center justify-content-between" id="temper_wrap">
73+
<div class="col-12 my-2 d-flex align-items-center justify-content-between" id="temper_wrap">
6674
<div class="form-group">
6775
<label for="temperature">temperature</label>
6876
<input type="range" class="form-control-range" id="temperature" min='0.00001' max='1.0' step='0.00001' value='0.3' />
@@ -83,7 +91,7 @@ <h1 class="text-center">ChatTTS WebUI & API<span class="fs-6">(v{{version}})</sp
8391

8492
</div>
8593
</div>
86-
<div class="col-12 my-2 text-center">
94+
<div class="col-12 my-4 text-center">
8795
<button id="submit-btn" class="btn btn-primary">立即合成声音</button>
8896
<button id="upload-btn" class="btn btn-secondary">导入txt
8997
<input type="file" id="file-input" accept=".txt" >

0 commit comments

Comments
 (0)