All Projects β†’ amadeomano β†’ persian-tts

amadeomano / persian-tts

Licence: GPL-3.0 License
πŸ”Š A simple human-based text-to-speach synthesiser and ReactNative app for Persian language.

Programming Languages

javascript
184084 projects - #8 most used programming language
objective c
16641 projects - #2 most used programming language
java
68154 projects - #9 most used programming language
python
139335 projects - #7 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to persian-tts

sam
SAM: Software Automatic Mouth (Ported from https://github.com/vidarh/SAM)
Stars: ✭ 33 (+83.33%)
Mutual labels:  text-to-speech, tts, tts-engine
FastSpeech2
PyTorch Implementation of FastSpeech 2 : Fast and High-Quality End-to-End Text to Speech
Stars: ✭ 163 (+805.56%)
Mutual labels:  text-to-speech, tts
bingspeech-api-client
Microsoft Bing Speech API client in node.js
Stars: ✭ 32 (+77.78%)
Mutual labels:  text-to-speech, tts
talkie
Text-to-speech browser extension button. Select text on any web page, and have the computer read it out loud for you by simply clicking the Talkie button.
Stars: ✭ 43 (+138.89%)
Mutual labels:  text-to-speech, tts
WaveGrad2
PyTorch Implementation of Google Brain's WaveGrad 2: Iterative Refinement for Text-to-Speech Synthesis
Stars: ✭ 55 (+205.56%)
Mutual labels:  text-to-speech, tts
SpeakIt Vietnamese TTS
Vietnamese Text-to-Speech on Windows Project (zalo-speech)
Stars: ✭ 81 (+350%)
Mutual labels:  text-to-speech, tts
TTS tf
WIP Tensorflow implementation of https://github.com/mozilla/TTS
Stars: ✭ 14 (-22.22%)
Mutual labels:  text-to-speech, tts
open-speech-corpora
πŸ’Ž A list of accessible speech corpora for ASR, TTS, and other Speech Technologies
Stars: ✭ 841 (+4572.22%)
Mutual labels:  text-to-speech, tts
tts dataset maker
A gui to help make a text to speech dataset.
Stars: ✭ 20 (+11.11%)
Mutual labels:  text-to-speech, tts
Parallel-Tacotron2
PyTorch Implementation of Google's Parallel Tacotron 2: A Non-Autoregressive Neural TTS Model with Differentiable Duration Modeling
Stars: ✭ 149 (+727.78%)
Mutual labels:  text-to-speech, tts
dctts-pytorch
The pytorch implementation of DC-TTS
Stars: ✭ 73 (+305.56%)
Mutual labels:  text-to-speech, tts
Daft-Exprt
PyTorch Implementation of Daft-Exprt: Robust Prosody Transfer Across Speakers for Expressive Speech Synthesis
Stars: ✭ 41 (+127.78%)
Mutual labels:  text-to-speech, tts
golang-tts
Text-to-Speach golang package based in Amazon Polly service
Stars: ✭ 19 (+5.56%)
Mutual labels:  text-to-speech, tts
STYLER
Official repository of STYLER: Style Factor Modeling with Rapidity and Robustness via Speech Decomposition for Expressive and Controllable Neural Text to Speech, INTERSPEECH 2021
Stars: ✭ 105 (+483.33%)
Mutual labels:  text-to-speech, tts
voices
macOS CLI for changing the default TTS (text-to-speech) voice and printing information about and speaking text with multiple voices.
Stars: ✭ 53 (+194.44%)
Mutual labels:  text-to-speech, tts
laravel-text-to-speech
πŸ’¬ A wrapper for popular TTS services to create a more simple & uniform API. Currently, only AWS Polly is supported.
Stars: ✭ 26 (+44.44%)
Mutual labels:  text-to-speech, tts
ttslearn
ttslearn: Library for Pythonで学ぢ音声合成 (Text-to-speech with Python)
Stars: ✭ 158 (+777.78%)
Mutual labels:  text-to-speech, tts
VAENAR-TTS
PyTorch Implementation of VAENAR-TTS: Variational Auto-Encoder based Non-AutoRegressive Text-to-Speech Synthesis.
Stars: ✭ 66 (+266.67%)
Mutual labels:  text-to-speech, tts
AdaSpeech
AdaSpeech: Adaptive Text to Speech for Custom Voice
Stars: ✭ 108 (+500%)
Mutual labels:  text-to-speech, tts
Tacotron2-PyTorch
Yet another PyTorch implementation of Tacotron 2 with reduction factor and faster training speed.
Stars: ✭ 118 (+555.56%)
Mutual labels:  text-to-speech, tts

Persian Text-to-Speach synthesizer

PersianTTS is GPLv3 licensed.

Persian TTS is a simple text-to-speach synthesizing engine and ReactNative app that I have initially developed as my Bachelor's degree graduation project.

The project is however meant to get gradual improvements over time.

Contents

βœ… Requirements

Persian-TTS apps are powered by React Native so you will need it for compiling the apps properly. To compile android version, having a proper Android SDK on your machine is a must and evidently compiling iOS varient needs you to have a working Xcode copy and a functional Cocoapods dependency management tool on a MacOS operating system powered machine.

You will also need to have a dependency management tool for accessing NPM and download project's dependencies. Yarn is used in this project but NPM or other tools could also be used.

πŸ—Ί Installation guide

First you can get the source code by cloning it

git clone [email protected]:amfolio/persian-tts.git

iOS dependencies installation (Optional)

cd ios
pod install

Then move to the package's directory and install it's dependencies using yarn install or npm install

πŸš€ Launching apps

To launch apps in emulators of Android and/or iOS operating systems, you can use following commands:

Android

react-native run-android

iOS

react-native run-ios

πŸ— Project structure

This project's structure is just identical to many other ReactNative project structures. below is just a big picture of the main structure:

  • __tests__ : Jest powered unit tests
  • android : ReactNative android source files
  • ios : ReactNative ios source files
  • src : Main project root
    • components : Reusable React components
      • ComponentName : A CamelCase named folder wrapping over component files
        • index.js : The component entry point, exporting it's contents using ES6 modules
        • styles.js (optional): component's ReactNative style-sheets
    • screen : Application screen components
    • utils : Synthesizer algorithms & other language processing tools
    • App.js : Main application entry
    • Router.js : React-Navigation component configurations
    • voices.json : Application wide available voices configs

πŸ›  How it works

Shortly the project uses a "concatnative synthesizing" apprach to achieve it's goal. In persian language, an unlimited set of words could be constructed by concatnating "consonant+vowel" pairs. For bravity here we call these pairs simply "Syllables".

To make the synthesizing work, the project has initially a set of 169 syllable voices, recoded from my own voice (so it's not a professional narration πŸ˜…). this number is devided as bellow:

Voice type Corresponding files count
vowels 6
silent consonants 23
syllable (consonant+vowel) 138
spaces 2
Total 169

The synthesizing process is then feasable by concatnating syllables using FFmpeg library and it's react-native-ffmpeg wrapper. Here is a quick schema of what happens.

1️⃣ Step 1

In the first step, the phonetic corresponding for of persian input is created using TextToPhonems utility function.

const input = "Ψ³Ω„Ψ§Ω…"; // means "Hello" in persian
const output = textToPhonems(input); // ["sa", "lā", "m"];

2️⃣ Step 2

The result of step 1 passes through PhonemsToFFMpeg utility function and gets a valid ffmpeg concatnation command:

const ffmpeg = phonemsToFFMpeg(output);

and the result would be:

ffmpeg \
  -I sa.wav -I lā.wav -I m.wav \
  -filter_complex β€˜[0:0][1:0][2:0]concat=n=3:v=0:a=1[out]’ \
  -map β€˜[out]’ output.wav

3️⃣ Step 3

The application calls ffmpeg using react-native-ffmpeg and the following steps get done behind the scenes:

Before concatnation
sa.wav lā.wav m.wav
After concatnation
output.wav

4️⃣ Step 4

The output audio file gets played over both iOS and Android platforms thanks to react-native-sound library. Reading bundle resources and transfering them to sandbox/SD-card location is also possible thanks to react-native-fs

πŸ™πŸ» Acknowledgments

The special thank you goes to my project's director, Dr. Mohammad Taheri who gave me the confidence of approaching this subject and guided me through the best steps to make it possible. Without him I would have probably never get into such academic researches.

The next big thanks goes to the developers community who generousely share the cutting edge technology with others. It's just thanks to this community that reinventing the wheels is not anymore necessary.

Here is a short list of libraries who helped me infinitely in my development path:

🀝 Contribution

This repository is initially constructed as a minimum effort for a Persian language open-source Text-To-Speech solution. I would be highly grateful of any contribution from issues reporting to bugfixes and improvements.

Contribution by adding more voices to the project is also highly welcomed and you can also mention your name in voices.json.

Please feel free to send pull requests in case of feeling any necessity.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].