Safetensors
Chinese
qwen2
zwxl commited on
Commit
8ff404a
1 Parent(s): 1ba8677

Add README.md

Browse files
Files changed (2) hide show
  1. README.md +131 -3
  2. post.webp +0 -0
README.md CHANGED
@@ -1,3 +1,131 @@
1
- ---
2
- license: cc-by-nc-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # <center>ViiTor-Voice</center>
2
+ ### <center>An LLM based TTS Engine</center>
3
+
4
+ <p align="center">
5
+ <img src="post.webp" alt="Viitor-Voice Cover">
6
+ </p>
7
+
8
+ ## Features
9
+
10
+ - **Lightweight Design**
11
+
12
+ The model is simple and efficient, compatible with most LLM inference engines. With only 0.5B parameters, it achieves extreme optimization of computational resources while maintaining high performance. This design allows the model to be deployed not only on servers but also on mobile devices and edge computing environments, meeting diverse deployment needs.
13
+
14
+ - **Real-time Streaming Output, Low Latency Experience**
15
+
16
+ The model supports real-time speech generation, suitable for applications that demand low latency. On the Tesla T4 platform, it achieves an industry-leading first-frame latency of 200ms, providing users with nearly imperceptible instant feedback, ideal for interactive applications requiring quick response.
17
+
18
+ - **Rich Voice Library**
19
+
20
+ Offers more than 300 different voice options, allowing you to choose the most suitable speech style according to your needs and preferences. Whether it’s a formal business presentation or casual entertainment content, the model provides perfect voice matching.
21
+
22
+ - **Flexible Speech Rate Adjustment**
23
+
24
+ The model supports natural variations in speech rate, allowing users to easily adjust it based on content requirements and audience preferences. Whether speeding up for efficient information delivery or slowing down to enhance emotional depth, it maintains natural speech fluency.
25
+
26
+ - **Zero-shot Voice Cloning (Under Research)**
27
+
28
+ Decoder-only architecture naturally supports Zero-shot cloning, with future support for rapid voice cloning based on minimal voice samples.
29
+
30
+ ---
31
+
32
+ ## Output Samples
33
+
34
+ Below are examples of speech generated by this project:
35
+
36
+ ### English Female Voice 1:
37
+
38
+ https://github.com/user-attachments/assets/395bcdeb-1899-43b2-aff9-358bdc5f1c29
39
+
40
+ ### English Male Voice 1:
41
+
42
+ https://github.com/user-attachments/assets/d373f2fd-4b35-4b42-983f-3a5f0c25779d
43
+
44
+ ### Chinese Female Voice 1:
45
+
46
+ https://github.com/user-attachments/assets/94d6da03-bc71-4f7c-8453-9312a1eb6d1e
47
+
48
+ ### Chinese Male Voice 1:
49
+
50
+ https://github.com/user-attachments/assets/8a03785b-8100-48fe-8d64-fd98406aab1d
51
+
52
+
53
+ ---
54
+
55
+ ## Environment Setup
56
+
57
+ ```commandline
58
+ conda create -n viitor_voice python=3.10
59
+ conda activate viitor_voice
60
+ pip install -r requirements.txt
61
+
62
+ ### Due to the issue with vllm's tokenizer length calculation, the token limit cannot take effect.
63
+ python_package_path=`pip show pip | egrep Location | awk -F ' ' '{print $2}'`
64
+ cp viitor_voice/utils/patch.py $python_package_path/vllm/entrypoints/openai/logits_processors.py
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Inference
70
+ ### Pretrained Models
71
+ - [English](https://huggingface.co/ZzWater/viitor-voice-en)
72
+ - [Chinese](https://huggingface.co/ZzWater/viitor-voice-chs)
73
+ ### Offline Inference
74
+
75
+ ```python
76
+ from viitor_voice.utils.offline_inference import OfflineInference
77
+ import torchaudio
78
+
79
+ ## English
80
+ tts_engine = OfflineInference(model_path='ZzWater/viitor-voice-en',
81
+ config_path='viitor_voice/inference_configs/en.json')
82
+ text_list = [
83
+ "Isn't it fascinating to think about the endless possibilities that lie within the pages of a book. every time you turn a page, you're diving into a new world ripe with potential for discovery, and wonder what stories will you uncover today."]
84
+ # list valid speakers
85
+
86
+ print(tts_engine.prompt_map.keys())
87
+ audios = tts_engine.batch_infer(text_list=text_list, speaker=['1'], speed=2)
88
+ torchaudio.save('test.wav', audios[0], 24000)
89
+
90
+ ## Chinese
91
+ tte_engine_chs = OfflineInference(model_path='ZzWater/viitor-voice-chs',
92
+ config_path='viitor_voice/inference_configs/chs.json')
93
+ text_list_chs = [
94
+ "我觉得我还是可以抢救一下的。"]
95
+ audios = tte_engine_chs.batch_infer(text_list=text_list, speaker=['female1'], speed=1)
96
+ torchaudio.save('test_chs.wav', audios[0], 24000)
97
+
98
+
99
+
100
+
101
+
102
+ ```
103
+
104
+ ### Demo Inference
105
+ - [ViiTor AI](https://www.viitor.io/text-to-speech)
106
+ ### Streaming Inference (TODO)
107
+
108
+ ---
109
+ ## Training (TODO)
110
+ ## Join Our Community
111
+ [![Join Discord](https://img.shields.io/discord/your-discord-id?logo=discord&style=for-the-badge)](https://discord.gg/MbxgFn7BN8)
112
+
113
+ Have questions about the project? Want to discuss new features, report bugs, or just chat with other contributors? Join our Discord community!
114
+ ## References
115
+
116
+ - [SNAC](https://github.com/hubertsiuzdak/snac)
117
+ - [mini-omni](https://github.com/gpt-omni/mini-omni)
118
+ - [open-gpt-4-o](https://laion.ai/notes/open-gpt-4-o/)
119
+
120
+ ## License
121
+
122
+ This project is licensed under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/).
123
+ You are free to share and modify the code of this project for non-commercial purposes, under the following conditions:
124
+
125
+ 1. **Attribution**: You must give appropriate credit, provide a link to the license, and indicate if changes were made.
126
+ 2. **Non-Commercial**: You may not use the material for commercial purposes.
127
+
128
+ **Copyright Notice:**
129
+ © 2024 Livedata. All Rights Reserved.
130
+
131
+
post.webp ADDED