Giter Site home page Giter Site logo

jiangluping1994 / parrots Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shibing624/parrots

0.0 0.0 0.0 9.23 MB

Automatic Speech Recognition(ASR), Text-To-Speech(TTS) engine for Chinese. 中文语音识别、文字转语音,基于语音库实现,易扩展。

License: Apache License 2.0

Python 100.00%

parrots's Introduction

parrots

parrots, Automatic Speech Recognition(ASR), Text-To-Speech(TTS) engine.

install

brew install portaudio
pip3 install -r requirements.txt

这里请注意,python37不支持pyaudio的pip安装,直接下载whl文件,然后pip安装,参考这里

如果安装失败:

sudo apt install python3-dev -y sudo apt-get install portaudio19-dev python-all-dev

  • pip3 install parrots
  • Or
git clone https://github.com/shibing624/parrots.git
cd parrots
python3 setup.py install

usage

speech recognition

打开 "tests/speech_reco_test.py",运行

output:

北津科技过了(北京科技馆)

tts

input:

import parrots

audio_file_path = parrots.synthesize('北京图书馆')
print(audio_file_path)

output:

北京图书馆 语音文件路径

update

语音库

从SourceForge下载语音库syllables.zip,并解压到parrots/data目录下

录制新的语音库

  • 按阴平、阳平、上声、去声、轻声的顺序录下 mapping.json 里每一个音节的五个声调
  • 按开头字母(letter)分组, 将文件存在 ./recording/{letter}.wav下
  • 运行 python process.py {letter} 将{letter}.wav 完整的录音分成独立的拼音
  • 检查核对./pre文件夹中的拼音.wav后导入文件夹./syllables

parrots's People

Contributors

shibing624 avatar daxiongpro avatar nuck555 avatar sonictl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.