Update README.md
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243445 unmodified lines505152535455565758596061621 unmodified line6465666768697018 unmodified lines899091929394959697989910010110210310410510610710813 unmodified lines12212312412512612712841 unmodified lines1701711721731741751761771781791801811821831841853 unmodified lines1891901911921931941951968 unmodified lines2052062072082092102112124 unmodified lines217218219220---license: apache-2.0language:- zhtags:- speech- asrframeworks:- pytorch---# Dolphin-Fangyan[Paper](https://arxiv.org/abs/2503.20212)[Github](https://github.com/DataoceanAI/Dolphin)[Huggingface](https://huggingface.co/DataoceanAI)[Modelscope](https://www.modelscope.cn/organization/DataoceanAI)**Dolphin-Fangyan** 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-Fangyan introduces significant improvements in tokenizer design, dialect-balanced training, streaming capability, hotword biasing, and deployment efficiency.The model supports Mandarin Chinese and 22 Chinese dialects, while also maintaining multilingual ASR capability inherited from Dolphin. Dolphin-Fangyan supports both streaming and non-streaming inference, enabling practical deployment in latency-sensitive applications such as real-time transcription and industrial speech recognition systems.## ApproachDolphin-Fangyan is built upon the Dolphin architecture and follows a joint CTC-Attention framework with:* Encoder: E-Branchformer* Decoder: Transformer Decoder* Training Objective: Joint CTC + Attention lossCompared to Dolphin, Dolphin-Fangyan introduces several important improvements:* Temperature-based data sampling for balancing standard Mandarin and low-resource dialects* Redesigned tokenizer with:5 unmodified lines* encoder-level contextual biasing* prompt-based decoder biasingExperimental results show that Dolphin-Fangyan achieves:* 38% improvement in dialect recognition accuracy* 16.3% relative CER reduction over Dolphin* Competitive performance with recent large-scale ASR systems while maintaining a smaller model sizeSee details in the [Paper](https://arxiv.org/abs/2503.20212).1 unmodified line## SetupDolphin-Fangyan requires FFmpeg to convert audio files into WAV format. Please install FFmpeg first if it is not already installed on your system.```shell# Ubuntu / Debian18 unmodified lines## Available ModelsCurrently, Dolphin-Fangyan provides multiple model sizes optimized for different deployment scenarios.| Model | Parameters | Hotwords ||:------:|:----------:|:----------:|| base.fangyan | 0.1 B | ❌ || base.fangyan.streaming | 0.1 B |❌ || small.fangyan | 0.4 B | Encoder-biased Hotwords || small.fangyan.streaming | 0.4 B | Encoder-biased Hotwords || small.fangyan.prompt | 0.4 B | Prompt-based Hotwords |## Hotword BiasingDolphin-Fangyan supports two hotword biasing approaches.**Encoder-Level Contextual Biasing**13 unmodified lines## Supported Languages and DialectsDolphin-Fangyan primarily focuses on:* Mandarin Chinese* 22 Chinese dialects41 unmodified linesdolphin audio.wav# Download model and specify the model pathdolphin audio.wav --model small.fangyan --model_dir /data/models/dolphin/# Specify language and regiondolphin audio.wav --model small.fangyan --model_dir /data/models/dolphin/ --lang_sym "zh" --region_sym "CN"# Specify the hotwords file with Encoder-biased methoddolphin audio.wav --model small.fangyan --model_dir /data/models/dolphin/ --hotword_list_path hotwords.txt --use_deep_biasing true# Using prompt-based modeldolphin audio.wav --model small.fangyan.prompt --model_dir /data/models/dolphin/ --hotword_list_path hotwords.txt --use_prompt_hotword true --use_two_stage_filter true```3 unmodified linesimport dolphinfrom dolphin import transcribemodel_name = 'small.fangyan'model = dolphin.load_model(model_name, f"/data/models/dolphin/{model_name}", "cuda")result = transcribe(model, 'audio.wav')print(result.text)8 unmodified lines## prompt-based hotwordsmodel_name = 'small.fangyan.prompt'model = dolphin.load_model(model_name, f"/data/models/dolphin/{model_name}", "cuda")result = transcribe(model, 'audio.wav', hotwords=['诺香丹青牌科研胶囊'], use_prompt_hotword=True, use_two_stage_filter=True, decoding_method='attention')4 unmodified lines## LicenseDolphin-Fangyan is released under the Apache 2.0 License.1234567891011121314151617181920212223242526272829303132333435365 unmodified lines424344454647484950515253541 unmodified line5657585960616218 unmodified lines8182838485868788899091929394959697989910013 unmodified lines11411511611711811912041 unmodified lines1621631641651661671681691701711721731741751761773 unmodified lines1811821831841851861871888 unmodified lines1971981992002012022032044 unmodified lines209210211212---frameworks:- ""language:- zhlicense: apache-2.0tags:- speech- asrtasks: []---# Dolphin-CN-Dialect[Paper](https://arxiv.org/abs/2503.20212)[Github](https://github.com/DataoceanAI/Dolphin)[Huggingface](https://huggingface.co/DataoceanAI)[Modelscope](https://www.modelscope.cn/organization/DataoceanAI)**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.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.## ApproachDolphin-CN-Dialect is built upon the Dolphin architecture and follows a joint CTC-Attention framework with:* Encoder: E-Branchformer* Decoder: Transformer Decoder* Training Objective: Joint CTC + Attention lossCompared to Dolphin, Dolphin-CN-Dialect introduces several important improvements:* Temperature-based data sampling for balancing standard Mandarin and low-resource dialects* Redesigned tokenizer with:5 unmodified lines* encoder-level contextual biasing* prompt-based decoder biasingExperimental results show that Dolphin-CN-Dialect achieves:* 38% improvement in dialect recognition accuracy* 16.3% relative CER reduction over Dolphin* Competitive performance with recent large-scale ASR systems while maintaining a smaller model sizeSee details in the [Paper](https://arxiv.org/abs/2503.20212).1 unmodified line## SetupDolphin-CN-Dialect requires FFmpeg to convert audio files into WAV format. Please install FFmpeg first if it is not already installed on your system.```shell# Ubuntu / Debian18 unmodified lines## Available ModelsCurrently, Dolphin-CN-Dialect provides multiple model sizes optimized for different deployment scenarios.| Model | Parameters | Hotwords ||:------:|:----------:|:----------:|| base.cn | 0.1 B | ❌ || base.cn.streaming | 0.1 B |❌ || small.cn | 0.4 B | Encoder-biased Hotwords || small.cn.streaming | 0.4 B | Encoder-biased Hotwords || small.cn.prompt | 0.4 B | Prompt-based Hotwords |## Hotword BiasingDolphin-CN-Dialect supports two hotword biasing approaches.**Encoder-Level Contextual Biasing**13 unmodified lines## Supported Languages and DialectsDolphin-CN-Dialect primarily focuses on:* Mandarin Chinese* 22 Chinese dialects41 unmodified linesdolphin audio.wav# Download model and specify the model pathdolphin audio.wav --model small.cn --model_dir /data/models/dolphin/# Specify language and regiondolphin audio.wav --model small.cn --model_dir /data/models/dolphin/ --lang_sym "zh" --region_sym "CN"# Specify the hotwords file with Encoder-biased methoddolphin audio.wav --model small.cn --model_dir /data/models/dolphin/ --hotword_list_path hotwords.txt --use_deep_biasing true# Using prompt-based modeldolphin 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```3 unmodified linesimport dolphinfrom dolphin import transcribemodel_name = 'small.cn'model = dolphin.load_model(model_name, device="cuda")result = transcribe(model, 'audio.wav')print(result.text)8 unmodified lines## prompt-based hotwordsmodel_name = 'small.cn.prompt'model = dolphin.load_model(model_name, device="cuda")result = transcribe(model, 'audio.wav', hotwords=['诺香丹青牌科研胶囊'], use_prompt_hotword=True, use_two_stage_filter=True, decoding_method='attention')4 unmodified lines## LicenseDolphin-CN-Dialect is released under the Apache 2.0 License.
README.md+29-37