cydxg commited on
Commit
f4c5967
·
verified ·
1 Parent(s): 7b724b9

Create README_en.md

Browse files
Files changed (1) hide show
  1. README_en.md +74 -0
README_en.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model:
3
+ - THUDM/glm-4-voice-9b
4
+ base_model_relation: quantized
5
+ ---
6
+ # GLM-4-Voice-9B (INT4 Quantized)
7
+
8
+ [中文](README.md) | [English](README_en.md)
9
+
10
+ ## Model Overview
11
+ GLM-4-Voice is an end-to-end speech model developed by Zhipu AI. It can directly understand and generate speech in both Chinese and English, facilitating real-time voice conversations. The model can also modify voice attributes such as emotion, tone, speech rate, and dialect based on user instructions. This repository features the INT8 quantized version of GLM-4-Voice-9B.
12
+
13
+ ## Usage Instructions
14
+
15
+ ### Creating a Virtual Environment
16
+ First, ensure you are using Python 3.10, and create a virtual environment:
17
+ ```bash
18
+ # Confirmed not compatible with python3.8/3.9/3.12 due to library compatibility issues
19
+ conda create -n GLM-4-Voice python=3.10
20
+ ```
21
+
22
+ ### Activate the Virtual Environment and Clone the Model
23
+ After activating the virtual environment, clone the model and code:
24
+ ```bash
25
+ conda activate GLM-4-Voice
26
+ git clone https://huggingface.co/cydxg/glm-4-voice-9b-int8
27
+ ```
28
+ For users in mainland China, you can use the following command to clone:
29
+ ```bash
30
+ git clone https://hf-mirror.com/cydxg/glm-4-voice-9b-int8
31
+ ```
32
+
33
+ ### Install Dependencies
34
+ Navigate to the model directory and install the required dependencies:
35
+ ```bash
36
+ cd glm-4-voice-9b-int8
37
+ conda install -c conda-forge openfst
38
+ conda install -c conda-forge pynini==2.1.5
39
+ pip install -r requirements.txt
40
+ mkdir third_party
41
+ cd third_party
42
+ git clone https://github.com/shivammehta25/Matcha-TTS Matcha-TTS
43
+ # Choose the appropriate version of torch based on your CUDA version
44
+ conda install pytorch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 pytorch-cuda=12.4 -c pytorch -c nvidia
45
+ ```
46
+
47
+ ### Start the Model Service
48
+ First, start the model service:
49
+ ```bash
50
+ python model_server.py
51
+ ```
52
+
53
+ ### Run the Web Demo
54
+ Next, run the web demo to access the model:
55
+ ```bash
56
+ python web_demo.py
57
+ ```
58
+ You can then access the model by visiting `http://localhost:8888`.
59
+
60
+ ### Additional Dependencies
61
+ If running the web_demo prompts that `matcha.models` is missing, you might see the following error:
62
+
63
+ ```bash
64
+ ModuleNotFoundError: No module named 'matcha.models'; 'matcha' is not a package
65
+ ```
66
+
67
+ In this case, you need to install `matcha-tts`:
68
+
69
+ ```bash
70
+ # First, uninstall gradio and diffusers to avoid version conflicts
71
+ pip uninstall gradio
72
+ pip uninstall diffusers
73
+ pip install matcha-tts
74
+ ```