Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
🇨🇳中文 | 🌐English | 📖文档/Docs | 🤖模型/Models
Parrots, Automatic Speech Recognition(ASR), Text-To-Speech(TTS) toolkit, support Chinese, English, Japanese, etc.
parrots实现了语音识别和语音合成模型一键调用,开箱即用,支持中英文。
distilwhisper
实现的中文语音识别(ASR)模型,支持中、英等多种语言GPT-SoVITS
训练的语音合成(TTS)模型,支持中、英、日等多种语言pip install torch # or conda install pytorch
pip install -r requirements.txt
pip install parrots
or
pip install torch # or conda install pytorch
git clone https://github.com/shibing624/parrots.git
cd parrots
python setup.py install
run example: examples/tts_gradio_demo.py to see the demo:
python examples/tts_gradio_demo.py
example: examples/demo_asr.py
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': '北京图书馆'}
example: examples/demo_tts.py
import sys
sys.path.append('..')
from parrots import TextToSpeech
m = TextToSpeech(
speaker_model_path="shibing624/parrots-gpt-sovits-speaker-maimai",
speaker_name="MaiMai",
device="cpu",
half=False
)
m.predict(
text="你好,欢迎来北京。welcome to the city.",
text_language="auto",
output_path="output_audio.wav"
)
output:
Save audio to output_audio.wav
支持通过命令行方式执行ARS和TTS任务,代码:cli.py
> parrots -h
NAME
parrots
SYNOPSIS
parrots COMMAND
COMMANDS
COMMAND is one of the following:
asr
Entry point of asr, recognize speech from file
tts
Entry point of tts, generate speech audio from text
run:
pip install parrots -U
# asr example
parrots asr -h
parrots asr examples/tushuguan.wav
# tts example
parrots tts -h
parrots tts "你好,欢迎来北京。welcome to the city." output_audio.wav
asr
、tts
是二级命令,asr是语音识别,tts是语音合成,默认使用的模型是中文模型parrots asr -h
examples/tushuguan.wav
是asr
方法的audio_file_path
参数,输入的音频文件(required)如果你在研究中使用了parrots,请按如下格式引用:
@misc{parrots,
title={parrots: ASR and TTS Tool},
author={Ming Xu},
year={2024},
howpublished={\url{https://github.com/shibing624/parrots}},
}
授权协议为 The Apache License 2.0,可免费用做商业用途。请在产品说明中附加parrots的链接和授权协议。
项目代码还很粗糙,如果大家对代码有所改进,欢迎提交回本项目,在提交之前,注意以下两点:
tests
添加相应的单元测试python -m pytest
来运行所有单元测试,确保所有单测都是通过的之后即可提交PR。
FAQs
Parrots, Automatic Speech Recognition(**ASR**), Text-To-Speech(**TTS**) toolkit
We found that parrots demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.