The TTS engine developed using Kotlin + JetPack Compose + Tensorflow Lite can be used completely offline.
Two optional models: FastSpeech and Tacotron, both of which are from TensorFlowTTS
The method of text to pinyin comes from: TensorflowTTS_chinese
Because it is real-time inference output audio, there are certain requirements for device performance.
Among them, FastSpeech is faster, but the generated audio has poor anthropomorphism effect and can be used on ordinary mid-range or above mobile phones.
Tacotron has high performance requirements. Although the overall effect is better, it is very slow, so it is currently of little practical value and is only for testing.
├─app/src/main/assets
│ baker_mapper.json
│ fastspeech2_quan.tflite
│ mb_melgan.tflite
│ tacotron2_quan.tflite
./gradlew assembleReleaseDownload address
netron
Reduce the TensorFlow Lite binary file size
Download aar after cropping
Comparison of arr file sizes before and after cropping:
TensorFlowTTS
TensorflowTTS_chinese
Tensorflow Guide
Reference tf test
Reference tflite conversion
Google Pico TTS Source
$ git clone https://github.com/TensorSpeech/TensorFlowTTS.git
$ cd TensorFlowTTS
$ pip install .
$ pip install git+https://github.com/repodiac/german_transliterate.git$ cd models-tf
$ python test-h5.py$ python convert-tflite.py