Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Automatic Speech Recognition(ASR), Text-To-Speech(TTS) engine. 中英语音识别、多角色语音合成,支持多语言,准确率高
| Date | Stars |
|---|---|
| 2026-07-24 | 525 |
| 2026-07-25 | 525 |
| 2026-07-28 | 525 |
| 2026-07-30 | 525 |
| 2026-07-31 | 526 |
| 2026-08-06 | 526 |
Today
— stars today
This week
+1 stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.19%/day
[**🇨🇳中文**](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)
<div align="center">
<a href="https://github.com/shibing624/parrots">
<img src="https://github.com/shibing624/parrots/blob/master/docs/parrots_icon.png" alt="Logo" height="156">
</a>
<br/>
<br/>
<a href="https://huggingface.co/spaces/shibing624/parrots" target="_blank"> Online Demo </a>
<br/>
<img width="100%" src="https://github.com/shibing624/parrots/blob/master/docs/hf.jpg">
</div>
-----------------
# Parrots: ASR and TTS toolkit
[](https://badge.fury.io/py/parrots)
[](https://pepy.tech/project/parrots)
[](CONTRIBUTING.md)
[](https://github.com/shibing624/parrots/graphs/contributors)
[](LICENSE)
[](requirements.txt)
[](https://github.com/shibing624/parrots/issues)
[](#Contact)
## Introduction
Parrots, Automatic Speech Recognition(**ASR**), Text-To-Speech(**TTS**) toolkit, support Chinese, English, Japanese, etc.
**parrots**实现了语音识别和语音合成模型一键调用,开箱即用,支持中英文。
## Features
1. **ASR**:基于`distilwhisper`实现的中文语音识别(ASR)模型,支持中、英等多种语言
2. **TTS**:基于`GPT-SoVITS`训练的语音合成(TTS)模型,支持中、英、日等多种语言
3. **IndexTTS2**:集成了 IndexTTS2 模型,支持情感表达和时长控制的零样本语音合成
- 精确的语音时长控制
- 情感与说话人身份解耦,独立控制音色和情感
- 支持多种情感控制方式:音频参考、情感向量、文本描述
- 高度表现力的情感语音合成
4. **流式TTS**:支持流式语音合成,实现低延迟的实时语音输出
## Install
```shell
pip install torch # or conda install pytorch
pip install -r requirements.txt
pip install parrots
```
or
```shell
pip install torch # or conda install pytorch
git clone https://github.com/shibing624/parrots.git
cd parrots
python setup.py install
```
## Demo
- HuggingFace Demo: https://huggingface.co/spaces/shibing624/parrots
<img width="85%" src="https://github.com/shibing624/parrots/blob/master/docs/hf.png">
run example: [examples/tts_gradio_demo.py](https://github.com/shibing624/parrots/blob/master/examples/tts_gradio_demo.py) to see the demo:
```shell
python examples/tts_gradio_demo.py
```
## Usage
### ASR(Speech Recognition)
example: [examples/demo_asr.py](https://github.com/shibing624/parrots/blob/master/examples/demo_asr.py)
```python
import os
import sys
sys.path.append('..')
from parrots import SpeechRecognition
pwd_path = os.path.abspath(os.path.dirname(__file__))
if __name__ == '__main__':
m = SpeechRecognition()
r = m.recognize_speech_from_file(os.path.join(pwd_path, 'tushuguan.wav'))
print('[提示] 语音识别结果:', r)
```
output:
```
{'text': '北京图书馆'}
```
### TTS(Speech Synthesis)
#### GPT-SoVITS 基础用法
example: [examples/demo_tts.py](https://github.com/shibing624/parrots/blob/master/examples/demo_tts.py)
```python
from parrots import TextToSpeech
# 初始化 TTS 模型(无需手动配置路径)
m = TextToSpeech(
speaker_model_path="shibing624/parrots-gpt-sovits-speaker-maimai",
speaker_name="MaiMai",
device="cpu", # 或 "cuda" 使用 GPU
half=False # 设置为 True 使用半精度加速
)
# 生成语音
m.predict(
text="你好,欢迎来到北京。这是一个合成录音文件的演示。Welcome to Beijing!",
text_language="auto", # 自动检测语言,也可指定 "zh", "en", "ja"
output_path="output_audio.wav"
)
```
output:
```
Save audio to output_audio.wav
```
#### 流式 TTS(低延迟)
支持流式语音合成,适用于实时对话场景:
```python
from parrots import TextToSpeech
import soundfile as sf
import numpy as np
m = TextToSpeech(
speaker_model_path="shibing6Excerpt of 11,374 characters
Read on GitHubMing Xu (徐明) · @tencent · China
160
5
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:479fd65c74e79e5a, topic:speech-recognition, topic:tts, desc:speech recognition