Skip to content

qiwsir/HanTTS

 
 

Repository files navigation

HanTTS Build Status

Chinese Text-to-Speech(TTS)

汉字 => ["han4", "zi4"] => .wav audio

Read this page in 简体中文

Libraries Used

For turning Chinese characters into pinyin

For processing .wav files

Web backend

A list of all Chinese characters is obtained from 倉頡平台2012, a Chinese input software.

Build and Run

git clone https://github.com/junzew/HanTTS.git
cd HanTTS
pip install --user -r requires.txt

Download syllables.zip from SourceForge, and decompress under the directory HanTTS.

  • Either run locally: python main.py
  • Or through web interface: cd into the server folder
     npm install
     node app.js
    
    Navigate to localhost:3000 in a browser

Use your own voice

  • Record five tones of each pinyin listed in mapping.json
  • Group them by the first letter (a,b,c,d, etc.), and save under folder ./recording as {letter}.wav
  • Then run python process.py {letter}for each letter to split recordings into individual pinyin
  • Move valid .wav files from ./pre to the folder ./syllables

Based on the text-to-speech-sample project by @alexram1313

About

Chinese Text-to-Speech service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.3%
  • JavaScript 7.4%
  • HTML 5.0%
  • CSS 0.3%