bert-vits2-utils
This commit is contained in:
1 parent
3f78fcb12c
commit
33c952d327
37 files changed
+137723
-1
No files matched your search
@@ -0,0 +1,13 @@
|
||||
from utils.bert_vits2_utils import TextToSpeech
|
||||
import soundfile as sf
|
||||
tts = TextToSpeech()
|
||||
tts.print_speakers_info()
|
||||
|
||||
audio, sample_rate= tts.synthesize("你好,我好开心", # 文本
|
||||
0, # 说话人 id
|
||||
style_text="我很难过!!!!呜呜呜!!!", # 情绪prompt,当language=="ZH" 才有效
|
||||
style_weight=0.9, # 情绪prompt权重
|
||||
language="mix", # 语言类型,包括 "ZH" "EN" "mix"
|
||||
en_ratio=1.) # mix语言类型下,英文文本速度,越大速度越慢
|
||||
save_path = "./tmp2.wav"
|
||||
sf.write(save_path, audio, sample_rate)
|
||||
Reference in new issue
Block a user