lich99 commited on
Commit
30132a7
1 Parent(s): c0aa913

update readme

Browse files
Files changed (1) hide show
  1. README.md +46 -4
README.md CHANGED
@@ -2,10 +2,52 @@
2
  license: cc-by-nc-4.0
3
  ---
4
 
5
- Disclaimer: For Academic Purposes Only
6
 
7
- The information provided in this document is for academic purposes only. It is intended for educational and research use, and should not be used for any commercial or legal purposes. The authors do not guarantee the accuracy, completeness, or reliability of the information.
8
 
9
- 免责声明:仅供学术交流
 
 
 
 
10
 
11
- 本文件中的信息仅供学术交流使用。其目的是用于教育和研究,不得用于任何商业或法律目的。作者不保证信息的准确性、完整性或可靠性。
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: cc-by-nc-4.0
3
  ---
4
 
 
5
 
6
+ **We are also training larger-scale models and need computational power and data support. If you can provide assistance, please contact OPEN-SOURCE@2NOISE.COM. Thank you very much.**
7
 
8
+ ## Clone the Repository
9
+ First, clone the Git repository:
10
+ ```bash
11
+ git clone https://github.com/2noise/ChatTTS.git
12
+ ```
13
 
14
+ ## Model Inference
15
+
16
+
17
+ ```python
18
+ # Import necessary libraries and configure settings
19
+ import torch
20
+ import torchaudio
21
+ torch._dynamo.config.cache_size_limit = 64
22
+ torch._dynamo.config.suppress_errors = True
23
+ torch.set_float32_matmul_precision('high')
24
+
25
+ import ChatTTS
26
+ from IPython.display import Audio
27
+
28
+ # Initialize and load the model:
29
+ chat = ChatTTS.Chat()
30
+ chat.load_models(compile=False) # Set to True for better performanceperformance
31
+
32
+ # Define the text input for inference (Support Batching)
33
+ texts = [
34
+ "So we found being competitive and collaborative was a huge way of staying motivated towards our goals, so one person to call when you fall off, one person who gets you back on then one person to actually do the activity with.",
35
+ ]
36
+
37
+ # Perform inference and play the generated audio
38
+ wavs = chat.infer(texts)
39
+ Audio(wavs[0], rate=24_000, autoplay=True)
40
+
41
+ # Save the generated audio
42
+ torchaudio.save("output.wav", torch.from_numpy(wavs[0]), 24000)
43
+ ```
44
+ **For more usage examples, please refer to the [example notebook](https://github.com/2noise/ChatTTS/blob/main/example.ipynb), which includes parameters for finer control over the generated speech, such as specifying the speaker, adjusting speech speed, and adding laughter.**
45
+
46
+
47
+
48
+
49
+
50
+
51
+ ### Disclaimer: For Academic Purposes Only
52
+
53
+ The information provided in this document is for academic purposes only. It is intended for educational and research use, and should not be used for any commercial or legal purposes. The authors do not guarantee the accuracy, completeness, or reliability of the information.