knox ревизий этого фрагмента . К ревизии
1 file changed, 15 insertions
ChatTTS-14.py(файл создан)
@@ -0,0 +1,15 @@ | |||
1 | + | inputs_en = """ | |
2 | + | chat T T S is a text to speech model designed for dialogue applications. | |
3 | + | [uv_break]it supports mixed language input [uv_break]and offers multi speaker | |
4 | + | capabilities with precise control over prosodic elements like | |
5 | + | [uv_break]laughter[uv_break][laugh], [uv_break]pauses, [uv_break]and intonation. | |
6 | + | [uv_break]it delivers natural and expressive speech,[uv_break]so please | |
7 | + | [uv_break] use the project responsibly at your own risk.[uv_break] | |
8 | + | """.replace('\n', '') # English is still experimental. | |
9 | + | ||
10 | + | params_refine_text = ChatTTS.Chat.RefineTextParams( | |
11 | + | prompt='[oral_2][laugh_0][break_4]', | |
12 | + | ) | |
13 | + | ||
14 | + | audio_array_en = chat.infer(inputs_en, params_refine_text=params_refine_text) | |
15 | + | torchaudio.save("self_introduction_output.wav", torch.from_numpy(audio_array_en[0]), 24000) |
Новее
Позже