/FunASR

A Fundamental End-to-End Speech Recognition Toolkit

Primary LanguagePythonMIT LicenseMIT

FunASR: A Fundamental End-to-End Speech Recognition Toolkit

FunASR hopes to build a bridge between academic research and industrial applications on speech recognition. By supporting the training & finetuning of the industrial-grade speech recognition model released on ModelScope, researchers and developers can conduct research and production of speech recognition models more conveniently, and promote the development of speech recognition ecology. ASR for Fun!

News | Highlights | Installation | Docs_CN | Docs_EN | Tutorial | Papers | Runtime | Model Zoo | Contact

What's new:

2023.2.17, funasr-0.2.0, modelscope-1.3.0

  • We support a new feature, export paraformer models into onnx and torchscripts from modelscope. The local finetuned models are also supported.
  • We support a new feature, onnxruntime, you could deploy the runtime without modelscope or funasr, for the paraformer-large model, the rtf of onnxruntime is 3x speedup(0.110->0.038) on cpu, details.
  • We support a new feature, grpc, you could build the ASR service with grpc, by deploying the modelscope pipeline or onnxruntime.
  • We release a new model paraformer-large-contextual, which supports the hotword customization based on the incentive enhancement, and improves the recall and precision of hotwords.
  • We optimize the timestamp alignment of Paraformer-large-long, the prediction accuracy of timestamp is much improved, and achieving accumulated average shift (aas) of 74.7ms, details.
  • We release a new model, 8k VAD model, which could predict the duration of none-silence speech. It could be freely integrated with any ASR models in modelscope.
  • We release a new model, MFCCA, a multi-channel multi-speaker model which is independent of the number and geometry of microphones and supports Mandarin meeting transcription.
  • We release several new UniASR model: Southern Fujian Dialect model, French model, German model, Vietnamese model, Persian model.
  • We release a new model, paraformer-data2vec model, an unsupervised pretraining model on AISHELL-2, which is inited for paraformer model and then finetune on AISHEL-1.
  • We release a new feature, the VAD, ASR and PUNC models could be integrated freely, which could be models from modelscope, or the local finetine models. The demo.
  • We optimized the punctuation common model, enhance the recall and precision, fix the badcases of missing punctuation marks.
  • Various new types of audio input types are now supported by modelscope inference pipeline, including: mp3、flac、ogg、opus...

2023.1.16, funasr-0.1.6, modelscope-1.2.0

  • We release a new version model Paraformer-large-long, which integrate the VAD model, ASR, Punctuation model and timestamp together. The model could take in several hours long inputs.
  • We release a new model, 16k VAD model, which could predict the duration of none-silence speech. It could be freely integrated with any ASR models in modelscope.
  • We release a new model, Punctuation, which could predict the punctuation of ASR models's results. It could be freely integrated with any ASR models in Model Zoo.
  • We release a new model, Data2vec, an unsupervised pretraining model which could be finetuned on ASR and other downstream tasks.
  • We release a new model, Paraformer-Tiny, a lightweight Paraformer model which supports Mandarin command words recognition.
  • We release a new model, SV, which could extract speaker embeddings and further perform speaker verification on paired utterances. It will be supported for speaker diarization in the future version.
  • We improve the pipeline of modelscope to speedup the inference, by integrating the process of build model into build pipeline.
  • Various new types of audio input types are now supported by modelscope inference pipeline, including wav.scp, wav format, audio bytes, wave samples...

Highlights

  • Many types of typical models are supported, e.g., Tranformer, Conformer, Paraformer.
  • We have released large number of academic and industrial pretrained models on ModelScope
  • The pretrained model Paraformer-large obtains the best performance on many tasks in SpeechIO leaderboard
  • FunASR supplies a easy-to-use pipeline to finetune pretrained models from ModelScope
  • Compared to Espnet framework, the training speed of large-scale datasets in FunASR is much faster owning to the optimized dataloader.

Installation

pip install "modelscope[audio_asr]" --upgrade -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
git clone https://github.com/alibaba/FunASR.git && cd FunASR
pip install --editable ./

For more details, please ref to installation

Usage

For users who are new to FunASR and ModelScope, please refer to FunASR Docs(CN / EN)

Contact

If you have any questions about FunASR, please contact us by

Dingding group Wechat group

Contributors

Acknowledge

  1. We borrowed a lot of code from Kaldi for data preparation.
  2. We borrowed a lot of code from ESPnet. FunASR follows up the training and finetuning pipelines of ESPnet.
  3. We referred Wenet for building dataloader for large scale data training.
  4. We acknowledge DeepScience for contributing the grpc service.

License

This project is licensed under the The MIT License. FunASR also contains various third-party components and some code modified from other repos under other open source licenses.

Citations

@inproceedings{gao2020universal,
  title={Universal ASR: Unifying Streaming and Non-Streaming ASR Using a Single Encoder-Decoder Model},
  author={Gao, Zhifu and Zhang, Shiliang and Lei, Ming and McLoughlin, Ian},
  booktitle={arXiv preprint arXiv:2010.14099},
  year={2020}
}

@inproceedings{gao2022paraformer,
  title={Paraformer: Fast and Accurate Parallel Transformer for Non-autoregressive End-to-End Speech Recognition},
  author={Gao, Zhifu and Zhang, Shiliang and McLoughlin, Ian and Yan, Zhijie},
  booktitle={INTERSPEECH},
  year={2022}
}
@inproceedings{Shi2023AchievingTP,
  title={Achieving Timestamp Prediction While Recognizing with Non-Autoregressive End-to-End ASR Model},
  author={Xian Shi and Yanni Chen and Shiliang Zhang and Zhijie Yan},
  booktitle={arXiv preprint arXiv:2301.12343}
  year={2023}
}