Naposledy aktivní 1730823849

Revize 52f58157f3b8d41c1de93046077a44f5af33a917

ChatTTS-14.py Raw
1inputs_en = """
2chat 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
4capabilities 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
10params_refine_text = ChatTTS.Chat.RefineTextParams(
11 prompt='[oral_2][laugh_0][break_4]',
12)
13
14audio_array_en = chat.infer(inputs_en, params_refine_text=params_refine_text)
15torchaudio.save("self_introduction_output.wav", torch.from_numpy(audio_array_en[0]), 24000)