Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
MooER_pytorch
Commits
56479105
Commit
56479105
authored
Oct 31, 2024
by
dcuai
Browse files
Update README.md
parent
b97afd54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
30 deletions
+30
-30
README.md
README.md
+30
-30
No files found.
README.md
View file @
56479105
# MooER
_pytorch
# MooER
## 论文
## 论文
-
https://arxiv.org/abs/2408.05101
-
https://arxiv.org/abs/2408.05101
...
@@ -33,12 +33,12 @@ pip install -r requirements.txt
...
@@ -33,12 +33,12 @@ pip install -r requirements.txt
### Anaconda(方法三)
### Anaconda(方法三)
关于本项目DCU显卡所需的特殊深度学习库可从光合开发者社区下载安装: https://developer.hpccube.com/tool/
关于本项目DCU显卡所需的特殊深度学习库可从光合开发者社区下载安装: https://developer.hpccube.com/tool/
```
```
DTK软件栈:dtk24
,
04
,
2
DTK软件栈:dtk24
.
04
.
2
Python:3.10
Python:3.10
to
u
ch:2.3.0
to
r
ch:2.3.0
torchaudio:2.1.2
torchaudio:2.1.2
```
```
Tips:以上dtk驱动、python、p
addle
等DCU相关工具版本需要严格一一对应
Tips:以上dtk驱动、python、p
ytorch
等DCU相关工具版本需要严格一一对应
其它非深度学习库参照requirements.txt安装:
其它非深度学习库参照requirements.txt安装:
```
```
pip install -r requirements.txt
pip install -r requirements.txt
...
@@ -48,7 +48,7 @@ pip install -r requirements.txt
...
@@ -48,7 +48,7 @@ pip install -r requirements.txt
## 训练
## 训练
无
无
## 推理
## 推理
1:
首先从
[
ModelScope
](
https://modelscope.cn/models/MooreThreadsSpeech/MooER-MTL-5K
)
或者
[
HF-Mirror
](
https://hf-mirror.com/mtspeech/MooER-MTL-5K
)
下载官方提供的预训练模型
。
1:
下载预训练模型MooER-MTL-5K,推荐使用scnet快速下载链接
[
MooER-MTL-5K
](
),官方下载地址
[ModelScope](https://modelscope.cn/models/MooreThreadsSpeech/MooER-MTL-5K)或者[HF-Mirror](https://hf-mirror.com/mtspeech/MooER-MTL-5K)。
```
```
# 使用ModelScope
# 使用ModelScope
git lfs clone https://modelscope.cn/models/MooreThreadsSpeech/MooER-MTL-5K
git lfs clone https://modelscope.cn/models/MooreThreadsSpeech/MooER-MTL-5K
...
@@ -57,19 +57,10 @@ git lfs clone https://modelscope.cn/models/MooreThreadsSpeech/MooER-MTL-5K
...
@@ -57,19 +57,10 @@ git lfs clone https://modelscope.cn/models/MooreThreadsSpeech/MooER-MTL-5K
git lfs clone https://hf-mirror.com/mtspeech/MooER-MTL-5K
git lfs clone https://hf-mirror.com/mtspeech/MooER-MTL-5K
```
```
将下载后的文件放置在
`pretrained_models`
文件夹中。
将下载后的文件放置在
`pretrained_models`
文件夹中。
```
shell
```
shell
cp
MooER-MTL-5K/
*
pretrained_models
cp
MooER-MTL-5K/
*
pretrained_models
```
```
2:下载
[
`Qwen2-7B-Instruct`
](
https://modelscope.cn/models/qwen/qwen2-7b-instruct
)
:
2:下载Qwen2-7B-Instruct,推荐使用scnet快速下载链接
[
`Qwen2-7B-Instruct`
](
http://113.200.138.88:18080/aimodels/Qwen2-7B-Instruct
)
官方下载地址
[
ModelScope
](
https://modelscope.cn/models/qwen/qwen2-7b-instruct
)
或者
[
HF-Mirror
](
https://hf-mirror.com/Qwen/Qwen2-7B-Instruct
)
。
```
# 使用ModelScope
git lfs clone https://modelscope.cn/models/qwen/qwen2-7b-instruct
# 使用HuggingFace
git lfs clone https://hf-mirror.com/Qwen/Qwen2-7B-Instruct
```
将下载后的文件放在
`pretrained_models/Qwen2-7B-Instruct`
文件夹中。
将下载后的文件放在
`pretrained_models/Qwen2-7B-Instruct`
文件夹中。
...
@@ -126,15 +117,13 @@ export PYTHONIOENCODING=UTF-8
...
@@ -126,15 +117,13 @@ export PYTHONIOENCODING=UTF-8
export LC_ALL=C
export LC_ALL=C
export PYTHONPATH=$PWD/src:$PYTHONPATH
export PYTHONPATH=$PWD/src:$PYTHONPATH
```
```
-
同时进行ASR和AST:
**
同时进行ASR和AST:
**
```
```
# 使用指定的音频文件
# 使用指定的音频文件
python inference.py --wav_path /path/to/your_audio_file
python inference.py --wav_path /path/to/your_audio_file
```
```
上述命令会调用一个多任务Mooer大模型,同时输出语音识别和语音翻译的结果。如果运行成功,将在终端看到如下结果。
<br>
<br>

**指定语音识别模型,仅输出识别结果:**
-
指定语音识别模型,仅输出识别结果:
```
```
python inference.py --task asr \
python inference.py --task asr \
--cmvn_path pretrained_models/paraformer_encoder/am.mvn \
--cmvn_path pretrained_models/paraformer_encoder/am.mvn \
...
@@ -144,10 +133,8 @@ python inference.py --task asr \
...
@@ -144,10 +133,8 @@ python inference.py --task asr \
--lora_dir pretrained_models/asr/lora_weights \
--lora_dir pretrained_models/asr/lora_weights \
--wav_path /path/to/your_audio_file
--wav_path /path/to/your_audio_file
```
```
上述命令会仅输出语音识别的结果。如果运行成功,将在终端看到如下结果。
<br>
<br>

**指定语音翻译模型,仅输出中译英结果**
-
指定语音翻译模型,仅输出中译英结果
```
```
python inference.py --task ast \
python inference.py --task ast \
--cmvn_path pretrained_models/paraformer_encoder/am.mvn \
--cmvn_path pretrained_models/paraformer_encoder/am.mvn \
...
@@ -157,18 +144,31 @@ python inference.py --task ast \
...
@@ -157,18 +144,31 @@ python inference.py --task ast \
--lora_dir pretrained_models/ast/lora_weights \
--lora_dir pretrained_models/ast/lora_weights \
--wav_path /path/to/your_audio_file
--wav_path /path/to/your_audio_file
```
```
上述命令会仅输出语音翻译的结果。如果运行成功,将在终端看到如下结果。
<br>
## result

**ASR和AST**
```
ASR: 欢迎使用由摩尔线程开发的基于大语言模型的语音识别及语音翻译系统
AST: Welcome to use the voice recognition and voice translation system based on the large language model developed by Moore Threads.
```
**ASR**
```
ASR: 欢迎使用由摩尔线程开发的基于大语言模型的语音识别及语音翻译系统
```
**AST**
```
AST: Welcome to use the voice recognition and voice translation system based on the large language model developed by Moore Threads.
```
### 精度
无
## 应用场景
## 应用场景
### 算法分类
### 算法分类
语音识别、语音翻译
`语音识别,语音翻译`
### 热点应用行业
### 热点应用行业
语音识别、语音翻译、
教育
、
医疗
`
教育
,
医疗
,科研`
## 源码仓库及问题反馈
## 源码仓库及问题反馈
https://developer.sourcefind.cn/codes/modelzoo/mooer_pytorch
https://developer.sourcefind.cn/codes/modelzoo/mooer_pytorch
## 参考资料
## 参考资料
https://github.com/MooreThreads/MooER
https://github.com/MooreThreads/MooER
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment