{"id":13824836,"url":"https://github.com/shibing624/parrots","last_synced_at":"2025-05-15T02:07:08.040Z","repository":{"id":44377849,"uuid":"146166796","full_name":"shibing624/parrots","owner":"shibing624","description":" Automatic Speech Recognition(ASR), Text-To-Speech(TTS) engine. 中英语音识别、多角色语音合成，支持多语言，准确率高","archived":false,"fork":false,"pushed_at":"2024-12-04T08:53:22.000Z","size":12833,"stargazers_count":490,"open_issues_count":7,"forks_count":92,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-15T00:47:24.683Z","etag":null,"topics":["chinese-speech-recognition","chinese-speech-synthesis","parrot","pinyin2hanzi","speech-recognition","text-to-speech-python3","tts"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shibing624.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-26T09:12:09.000Z","updated_at":"2025-04-13T07:26:50.000Z","dependencies_parsed_at":"2024-01-02T13:59:04.334Z","dependency_job_id":"7a6d818e-135b-4aea-8c3d-9120eb9d701a","html_url":"https://github.com/shibing624/parrots","commit_stats":{"total_commits":121,"total_committers":6,"mean_commits":"20.166666666666668","dds":"0.23966942148760328","last_synced_commit":"d43766ffdae369e42be57feec079f95df058158d"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibing624%2Fparrots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibing624%2Fparrots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibing624%2Fparrots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibing624%2Fparrots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shibing624","download_url":"https://codeload.github.com/shibing624/parrots/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254259383,"owners_count":22040820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chinese-speech-recognition","chinese-speech-synthesis","parrot","pinyin2hanzi","speech-recognition","text-to-speech-python3","tts"],"created_at":"2024-08-04T09:01:10.246Z","updated_at":"2025-05-15T02:07:08.018Z","avatar_url":"https://github.com/shibing624.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"[**🇨🇳中文**](https://github.com/shibing624/parrots/blob/master/README.md) | [**🌐English**](https://github.com/shibing624/parrots/blob/master/README_EN.md) | [**📖文档/Docs**](https://github.com/shibing624/parrots/wiki) | [**🤖模型/Models**](https://huggingface.co/shibing624) \n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://github.com/shibing624/parrots\"\u003e\n    \u003cimg src=\"https://github.com/shibing624/parrots/blob/master/docs/parrots_icon.png\" alt=\"Logo\" height=\"156\"\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://huggingface.co/spaces/shibing624/parrots\" target=\"_blank\"\u003e Online Demo \u003c/a\u003e\n    \u003cbr/\u003e\n    \u003cimg width=\"100%\" src=\"https://github.com/shibing624/parrots/blob/master/docs/hf.jpg\"\u003e\n\u003c/div\u003e\n\n\n-----------------\n\n# Parrots: ASR and TTS toolkit\n[![PyPI version](https://badge.fury.io/py/parrots.svg)](https://badge.fury.io/py/parrots)\n[![Downloads](https://static.pepy.tech/badge/parrots)](https://pepy.tech/project/parrots)\n[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](CONTRIBUTING.md)\n[![GitHub contributors](https://img.shields.io/github/contributors/shibing624/parrots.svg)](https://github.com/shibing624/parrots/graphs/contributors)\n[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n[![python_vesion](https://img.shields.io/badge/Python-3.7%2B-green.svg)](requirements.txt)\n[![GitHub issues](https://img.shields.io/github/issues/shibing624/parrots.svg)](https://github.com/shibing624/parrots/issues)\n[![Wechat Group](https://img.shields.io/badge/wechat-group-green.svg?logo=wechat)](#Contact)\n\n## Introduction\nParrots, Automatic Speech Recognition(**ASR**), Text-To-Speech(**TTS**) toolkit, support Chinese, English, Japanese, etc.\n\n**parrots**实现了语音识别和语音合成模型一键调用，开箱即用，支持中英文。\n\n## Features\n1. ASR：基于`distilwhisper`实现的中文语音识别（ASR）模型，支持中、英等多种语言\n2. TTS：基于`GPT-SoVITS`训练的语音合成（TTS）模型，支持中、英、日等多种语言\n\n\n\n## Install\n```shell\npip install torch # or conda install pytorch\npip install -r requirements.txt\npip install parrots\n```\nor\n```shell\npip install torch # or conda install pytorch\ngit clone https://github.com/shibing624/parrots.git\ncd parrots\npython setup.py install\n```\n\n## Demo\n- Offical Demo: https://www.mulanai.com/product/tts/\n- HuggingFace Demo: https://huggingface.co/spaces/shibing624/parrots\n\n\u003cimg width=\"85%\" src=\"https://github.com/shibing624/parrots/blob/master/docs/hf.png\"\u003e\n\nrun example: [examples/tts_gradio_demo.py](https://github.com/shibing624/parrots/blob/master/examples/tts_gradio_demo.py) to see the demo:\n```shell\npython examples/tts_gradio_demo.py\n```\n\n## Usage\n### ASR(Speech Recognition)\nexample: [examples/demo_asr.py](https://github.com/shibing624/parrots/blob/master/examples/demo_asr.py)\n```python\nimport os\nimport sys\n\nsys.path.append('..')\nfrom parrots import SpeechRecognition\n\npwd_path = os.path.abspath(os.path.dirname(__file__))\n\nif __name__ == '__main__':\n    m = SpeechRecognition()\n    r = m.recognize_speech_from_file(os.path.join(pwd_path, 'tushuguan.wav'))\n    print('[提示] 语音识别结果：', r)\n\n```\n\noutput:\n```\n{'text': '北京图书馆'}\n```\n\n### TTS(Speech Synthesis)\nexample: [examples/demo_tts.py](https://github.com/shibing624/parrots/blob/master/examples/demo_tts.py)\n```python\nimport sys\nsys.path.append('..')\nimport parrots\nfrom parrots.tts import TextToSpeech\nparrots_path = parrots.__path__[0]\nsys.path.append(parrots_path)\n\nm = TextToSpeech(\n    speaker_model_path=\"shibing624/parrots-gpt-sovits-speaker-maimai\",\n    speaker_name=\"MaiMai\",\n)\nm.predict(\n    text=\"你好，欢迎来北京。welcome to the city.\",\n    text_language=\"auto\",\n    output_path=\"output_audio.wav\"\n)\n```\n\noutput:\n```\nSave audio to output_audio.wav\n```\n\n\n### 命令行模式（CLI）\n\n支持通过命令行方式执行ARS和TTS任务，代码：[cli.py](https://github.com/shibing624/parrots/blob/master/parrots/cli.py)\n\n```\n\u003e parrots -h                                    \n\nNAME\n    parrots\n\nSYNOPSIS\n    parrots COMMAND\n\nCOMMANDS\n    COMMAND is one of the following:\n\n     asr\n       Entry point of asr, recognize speech from file\n\n     tts\n       Entry point of tts, generate speech audio from text\n\n```\n\nrun：\n\n```shell\npip install parrots -U\n# asr example\nparrots asr -h\nparrots asr examples/tushuguan.wav\n\n# tts example\nparrots tts -h\nparrots tts \"你好，欢迎来北京。welcome to the city.\" output_audio.wav\n```\n\n- `asr`、`tts`是二级命令，asr是语音识别，tts是语音合成，默认使用的模型是中文模型\n- 各二级命令使用方法见`parrots asr -h`\n- 上面示例中`examples/tushuguan.wav`是`asr`方法的`audio_file_path`参数，输入的音频文件（required）\n\n## Release Models\n\n### ASR\n- [BELLE-2/Belle-distilwhisper-large-v2-zh](https://huggingface.co/BELLE-2/Belle-distilwhisper-large-v2-zh)\n### TTS\n\n- [shibing624/parrots-gpt-sovits-speaker](https://huggingface.co/shibing624/parrots-gpt-sovits-speaker)\n\n| speaker name | 说话人名 | character | 角色特点 | language | 语言 |\n|--|--|--|--|--|--|\n| KuileBlanc | 葵·勒布朗 | lady | 标准美式女声 | en | 英 |\n| LongShouRen | 龙守仁 | gentleman | 标准美式男声 | en | 英 |\n| MaiMai | 卖卖| singing female anchor | 唱歌女主播声 | zh | 中 |\n| XingTong | 星瞳 | singing ai girl | 活泼女声 | zh | 中 |\n| XuanShen | 炫神 | game male anchor | 游戏男主播声 | zh | 中 |\n| KusanagiNene | 草薙寧々 | loli | 萝莉女学生声 | ja | 日 |\n\n- [shibing624/parrots-gpt-sovits-speaker-maimai](https://huggingface.co/shibing624/parrots-gpt-sovits-speaker-maimai)\n\n| speaker name | 说话人名 | character | 角色特点 | language | 语言 |\n|--|--|--|--|--|--|\n| MaiMai | 卖卖| singing female anchor | 唱歌女主播声 | zh | 中 |\n\n## Contact\n\n- Issue(建议)：[![GitHub issues](https://img.shields.io/github/issues/shibing624/parrots.svg)](https://github.com/shibing624/parrots/issues)\n- 邮件我：xuming: xuming624@qq.com\n- 微信我：加我*微信号：xuming624*, 进Python-NLP交流群，备注：*姓名-公司名-NLP*\n\n\u003cimg src=\"docs/wechat.jpeg\" width=\"200\" /\u003e\n\n\n## Citation\n\n如果你在研究中使用了parrots，请按如下格式引用：\n\n```latex\n@misc{parrots,\n  title={parrots: ASR and TTS Tool},\n  author={Ming Xu},\n  year={2024},\n  howpublished={\\url{https://github.com/shibing624/parrots}},\n}\n```\n\n## License\n\n\n授权协议为 [The Apache License 2.0](/LICENSE)，可免费用做商业用途。请在产品说明中附加parrots的链接和授权协议。\n\n\n## Contribute\n项目代码还很粗糙，如果大家对代码有所改进，欢迎提交回本项目，在提交之前，注意以下两点：\n\n - 在`tests`添加相应的单元测试\n - 使用`python -m pytest`来运行所有单元测试，确保所有单测都是通过的\n\n之后即可提交PR。\n\n\n## Reference\n#### ASR(Speech Recognition)\n- [EAT: Enhanced ASR-TTS for Self-supervised Speech Recognition](https://arxiv.org/abs/2104.07474)\n- [PaddlePaddle/PaddleSpeech](https://github.com/PaddlePaddle/PaddleSpeech)\n- [NVIDIA/NeMo](https://github.com/NVIDIA/NeMo)\n#### TTS(Speech Synthesis)\n- [coqui-ai/TTS](https://github.com/coqui-ai/TTS)\n- [keonlee9420/Expressive-FastSpeech2](https://github.com/keonlee9420/Expressive-FastSpeech2)\n- [TensorSpeech/TensorflowTTS](https://github.com/TensorSpeech/TensorflowTTS)\n- [RVC-Boss/GPT-SoVITS](https://github.com/RVC-Boss/GPT-SoVITS)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshibing624%2Fparrots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshibing624%2Fparrots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshibing624%2Fparrots/lists"}