Update README.md
Browse files
README.md
CHANGED
|
@@ -1,46 +1,36 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
language:
|
| 6 |
-
|
| 7 |
- zh
|
| 8 |
-
|
| 9 |
tags:
|
| 10 |
-
|
| 11 |
- speech
|
| 12 |
-
|
| 13 |
- asr
|
| 14 |
-
|
| 15 |
-
frameworks:
|
| 16 |
-
|
| 17 |
-
- pytorch
|
| 18 |
-
|
| 19 |
---
|
| 20 |
|
| 21 |
-
# Dolphin-
|
| 22 |
|
| 23 |
[Paper](https://arxiv.org/abs/2503.20212)
|
| 24 |
[Github](https://github.com/DataoceanAI/Dolphin)
|
| 25 |
[Huggingface](https://huggingface.co/DataoceanAI)
|
| 26 |
[Modelscope](https://www.modelscope.cn/organization/DataoceanAI)
|
| 27 |
-
[Openi](https://openi.pcl.ac.cn/DataoceanAI/Dolphin)
|
| 28 |
-
[Wisemodel](https://wisemodel.cn/models/lijp22/dolphin-base)
|
| 29 |
|
| 30 |
-
**Dolphin-
|
| 31 |
|
| 32 |
-
The model supports Mandarin Chinese and 22 Chinese dialects, while also maintaining multilingual ASR capability inherited from Dolphin. Dolphin-
|
| 33 |
|
| 34 |
|
| 35 |
## Approach
|
| 36 |
|
| 37 |
-
Dolphin-
|
| 38 |
|
| 39 |
* Encoder: E-Branchformer
|
| 40 |
* Decoder: Transformer Decoder
|
| 41 |
* Training Objective: Joint CTC + Attention loss
|
| 42 |
|
| 43 |
-
Compared to Dolphin, Dolphin-
|
| 44 |
|
| 45 |
* Temperature-based data sampling for balancing standard Mandarin and low-resource dialects
|
| 46 |
* Redesigned tokenizer with:
|
|
@@ -52,13 +42,13 @@ Compared to Dolphin, Dolphin-Fangyan introduces several important improvements:
|
|
| 52 |
* encoder-level contextual biasing
|
| 53 |
* prompt-based decoder biasing
|
| 54 |
|
| 55 |
-
Experimental results show that Dolphin-
|
| 56 |
|
| 57 |
* 38% improvement in dialect recognition accuracy
|
| 58 |
* 16.3% relative CER reduction over Dolphin
|
| 59 |
* Competitive performance with recent large-scale ASR systems while maintaining a smaller model size
|
| 60 |
|
| 61 |
-
.
|
|
@@ -66,7 +56,7 @@ See details in the [Paper](https://arxiv.org/abs/2503.20212).
|
|
| 66 |
|
| 67 |
## Setup
|
| 68 |
|
| 69 |
-
Dolphin-
|
| 70 |
|
| 71 |
```shell
|
| 72 |
# Ubuntu / Debian
|
|
@@ -91,20 +81,20 @@ pip install git+https://github.com/DataoceanAI/Dolphin.git
|
|
| 91 |
|
| 92 |
## Available Models
|
| 93 |
|
| 94 |
-
Currently, Dolphin-
|
| 95 |
|
| 96 |
| Model | Parameters | Hotwords |
|
| 97 |
|:------:|:----------:|:----------:|
|
| 98 |
-
| base.
|
| 99 |
-
| base.
|
| 100 |
-
| small.
|
| 101 |
-
| small.
|
| 102 |
-
| small.
|
| 103 |
|
| 104 |
|
| 105 |
## Hotword Biasing
|
| 106 |
|
| 107 |
-
Dolphin-
|
| 108 |
|
| 109 |
**Encoder-Level Contextual Biasing**
|
| 110 |
|
|
@@ -124,7 +114,7 @@ Experimental results show significant reductions in hotword error rates while ma
|
|
| 124 |
|
| 125 |
## Supported Languages and Dialects
|
| 126 |
|
| 127 |
-
Dolphin-
|
| 128 |
|
| 129 |
* Mandarin Chinese
|
| 130 |
* 22 Chinese dialects
|
|
@@ -172,16 +162,16 @@ To run Dolphin on Ascend NPU, you need to install the corresponding `torch_npu`
|
|
| 172 |
dolphin audio.wav
|
| 173 |
|
| 174 |
# Download model and specify the model path
|
| 175 |
-
dolphin audio.wav --model small.
|
| 176 |
|
| 177 |
# Specify language and region
|
| 178 |
-
dolphin audio.wav --model small.
|
| 179 |
|
| 180 |
# Specify the hotwords file with Encoder-biased method
|
| 181 |
-
dolphin audio.wav --model small.
|
| 182 |
|
| 183 |
# Using prompt-based model
|
| 184 |
-
dolphin audio.wav --model small.
|
| 185 |
|
| 186 |
```
|
| 187 |
|
|
@@ -191,8 +181,8 @@ dolphin audio.wav --model small.fangyan.prompt --model_dir /data/models/dolphin/
|
|
| 191 |
import dolphin
|
| 192 |
from dolphin import transcribe
|
| 193 |
|
| 194 |
-
model_name = 'small.
|
| 195 |
-
model = dolphin.load_model(model_name,
|
| 196 |
|
| 197 |
result = transcribe(model, 'audio.wav')
|
| 198 |
print(result.text)
|
|
@@ -207,8 +197,8 @@ print(result.text)
|
|
| 207 |
|
| 208 |
## prompt-based hotwords
|
| 209 |
|
| 210 |
-
model_name = 'small.
|
| 211 |
-
model = dolphin.load_model(model_name,
|
| 212 |
|
| 213 |
result = transcribe(model, 'audio.wav', hotwords=['诺香丹青牌科研胶囊'], use_prompt_hotword=True, use_two_stage_filter=True, decoding_method='attention')
|
| 214 |
|
|
@@ -219,4 +209,4 @@ print(result.text)
|
|
| 219 |
|
| 220 |
## License
|
| 221 |
|
| 222 |
-
Dolphin-
|
|
|
|
| 1 |
---
|
| 2 |
+
frameworks:
|
| 3 |
+
- ""
|
|
|
|
| 4 |
language:
|
|
|
|
| 5 |
- zh
|
| 6 |
+
license: apache-2.0
|
| 7 |
tags:
|
|
|
|
| 8 |
- speech
|
|
|
|
| 9 |
- asr
|
| 10 |
+
tasks: []
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Dolphin-CN-Dialect
|
| 14 |
|
| 15 |
[Paper](https://arxiv.org/abs/2503.20212)
|
| 16 |
[Github](https://github.com/DataoceanAI/Dolphin)
|
| 17 |
[Huggingface](https://huggingface.co/DataoceanAI)
|
| 18 |
[Modelscope](https://www.modelscope.cn/organization/DataoceanAI)
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
**Dolphin-CN-Dialect** is a multi-dialect ASR model developed by Dataocean AI and Tsinghua University, with a strong focus on Chinese dialect recognition and real-world deployment scenarios. Compared with the previous Dolphin series, Dolphin-CN-Dialect introduces significant improvements in tokenizer design, dialect-balanced training, streaming capability, hotword biasing, and deployment efficiency.
|
| 21 |
|
| 22 |
+
The model supports Mandarin Chinese and 22 Chinese dialects, while also maintaining multilingual ASR capability inherited from Dolphin. Dolphin-CN-Dialect supports both streaming and non-streaming inference, enabling practical deployment in latency-sensitive applications such as real-time transcription and industrial speech recognition systems.
|
| 23 |
|
| 24 |
|
| 25 |
## Approach
|
| 26 |
|
| 27 |
+
Dolphin-CN-Dialect is built upon the Dolphin architecture and follows a joint CTC-Attention framework with:
|
| 28 |
|
| 29 |
* Encoder: E-Branchformer
|
| 30 |
* Decoder: Transformer Decoder
|
| 31 |
* Training Objective: Joint CTC + Attention loss
|
| 32 |
|
| 33 |
+
Compared to Dolphin, Dolphin-CN-Dialect introduces several important improvements:
|
| 34 |
|
| 35 |
* Temperature-based data sampling for balancing standard Mandarin and low-resource dialects
|
| 36 |
* Redesigned tokenizer with:
|
|
|
|
| 42 |
* encoder-level contextual biasing
|
| 43 |
* prompt-based decoder biasing
|
| 44 |
|
| 45 |
+
Experimental results show that Dolphin-CN-Dialect achieves:
|
| 46 |
|
| 47 |
* 38% improvement in dialect recognition accuracy
|
| 48 |
* 16.3% relative CER reduction over Dolphin
|
| 49 |
* Competitive performance with recent large-scale ASR systems while maintaining a smaller model size
|
| 50 |
|
| 51 |
+

|
| 52 |
|
| 53 |
|
| 54 |
See details in the [Paper](https://arxiv.org/abs/2503.20212).
|
|
|
|
| 56 |
|
| 57 |
## Setup
|
| 58 |
|
| 59 |
+
Dolphin-CN-Dialect requires FFmpeg to convert audio files into WAV format. Please install FFmpeg first if it is not already installed on your system.
|
| 60 |
|
| 61 |
```shell
|
| 62 |
# Ubuntu / Debian
|
|
|
|
| 81 |
|
| 82 |
## Available Models
|
| 83 |
|
| 84 |
+
Currently, Dolphin-CN-Dialect provides multiple model sizes optimized for different deployment scenarios.
|
| 85 |
|
| 86 |
| Model | Parameters | Hotwords |
|
| 87 |
|:------:|:----------:|:----------:|
|
| 88 |
+
| base.cn | 0.1 B | ❌ |
|
| 89 |
+
| base.cn.streaming | 0.1 B |❌ |
|
| 90 |
+
| small.cn | 0.4 B | Encoder-biased Hotwords |
|
| 91 |
+
| small.cn.streaming | 0.4 B | Encoder-biased Hotwords |
|
| 92 |
+
| small.cn.prompt | 0.4 B | Prompt-based Hotwords |
|
| 93 |
|
| 94 |
|
| 95 |
## Hotword Biasing
|
| 96 |
|
| 97 |
+
Dolphin-CN-Dialect supports two hotword biasing approaches.
|
| 98 |
|
| 99 |
**Encoder-Level Contextual Biasing**
|
| 100 |
|
|
|
|
| 114 |
|
| 115 |
## Supported Languages and Dialects
|
| 116 |
|
| 117 |
+
Dolphin-CN-Dialect primarily focuses on:
|
| 118 |
|
| 119 |
* Mandarin Chinese
|
| 120 |
* 22 Chinese dialects
|
|
|
|
| 162 |
dolphin audio.wav
|
| 163 |
|
| 164 |
# Download model and specify the model path
|
| 165 |
+
dolphin audio.wav --model small.cn --model_dir /data/models/dolphin/
|
| 166 |
|
| 167 |
# Specify language and region
|
| 168 |
+
dolphin audio.wav --model small.cn --model_dir /data/models/dolphin/ --lang_sym "zh" --region_sym "CN"
|
| 169 |
|
| 170 |
# Specify the hotwords file with Encoder-biased method
|
| 171 |
+
dolphin audio.wav --model small.cn --model_dir /data/models/dolphin/ --hotword_list_path hotwords.txt --use_deep_biasing true
|
| 172 |
|
| 173 |
# Using prompt-based model
|
| 174 |
+
dolphin audio.wav --model small.cn.prompt --model_dir /data/models/dolphin/ --hotword_list_path hotwords.txt --use_prompt_hotword true --use_two_stage_filter true
|
| 175 |
|
| 176 |
```
|
| 177 |
|
|
|
|
| 181 |
import dolphin
|
| 182 |
from dolphin import transcribe
|
| 183 |
|
| 184 |
+
model_name = 'small.cn'
|
| 185 |
+
model = dolphin.load_model(model_name, device="cuda")
|
| 186 |
|
| 187 |
result = transcribe(model, 'audio.wav')
|
| 188 |
print(result.text)
|
|
|
|
| 197 |
|
| 198 |
## prompt-based hotwords
|
| 199 |
|
| 200 |
+
model_name = 'small.cn.prompt'
|
| 201 |
+
model = dolphin.load_model(model_name, device="cuda")
|
| 202 |
|
| 203 |
result = transcribe(model, 'audio.wav', hotwords=['诺香丹青牌科研胶囊'], use_prompt_hotword=True, use_two_stage_filter=True, decoding_method='attention')
|
| 204 |
|
|
|
|
| 209 |
|
| 210 |
## License
|
| 211 |
|
| 212 |
+
Dolphin-CN-Dialect is released under the Apache 2.0 License.
|