File size: 1,703 Bytes
08f99bf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19d3e46
08f99bf
 
 
 
 
 
 
 
 
 
 
 
 
 
19d3e46
08f99bf
 
 
 
 
19d3e46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
license: mit
language:
- en
- zh
base_model:
- VoxCPM
pipeline_tag: text-to-speech
library_name: transformers
tags:
- VoxCPM
- Speech
---

# VoxCPM  
This version of VoxCPM has been converted to run on the Axera NPU using **w8a16** quantization.
Compatible with Pulsar2 version: 4.2

## Convert tools links:
For those who are interested in model conversion, you can try to export axmodel through the original repo : 
[VoxCPM offical](https://github.com/OpenBMB/VoxCPM/)

[Pulsar2 Link, How to Convert LLM from Huggingface to axmodel](https://pulsar2-docs.readthedocs.io/en/latest/appendix/build_llm.html) 

[AXera NPU HOST LLM Runtime](https://github.com/AXERA-TECH/VoxCPM.Axera) 

## Support Platform

- AX650
  - AX650N DEMO Board
  - [M4N-Dock(爱芯派Pro)](https://wiki.sipeed.com/hardware/zh/maixIV/m4ndock/m4ndock.html)
  - [M.2 Accelerator card](https://axcl-docs.readthedocs.io/zh-cn/latest/doc_guide_hardware.html)



## How to use

Download all files from this repository to the device  
### 1. Run python demo  

#### 1. Install voxcpm axinfer package  
```
git clone -b 1.0.4-axmode_infer https://github.com/techshoww/VoxCPM.git 
cd VoxCPM
pip3 install .
```

#### 2. Download zipenhancer
```
pip3 install modelscope  
modelscope download --model iic/speech_zipenhancer_ans_multiloss_16k_base --local_dir iic/speech_zipenhancer_ans_multiloss_16k_base
```

#### 3. Run on Axera Device    
Go to the root directory of this project.  run:  
```
python3 run_ax650.py
```

### 2. Run c++ demo  

#### 1. Install transformers
```
pip3 install transformers>=4.56.2
```

#### 2. Start tokenizer server  
```
python3 tokenizer.py --port 9999
```

#### 3. Run c++ demo  
```
bash run_ax650.sh
```