Running onnx-optimized text-to-speech models, language models, and speech-to-text models on android
This repository contains the code for running onnx-optimized text-to-speech models, language models, and speech-to-text models on android. The code is based on the sherpa-onnx framework.
This module contains the code for running onnx tts models on android.
The models are located in app/src/main/assets
.
Currently, there are three models: vits-ljs
, vits-piper-en_US-lessac-low
, and vits-vctk
.
- Clone the repository using the command
git clone https://github.com/gadm21/AndroidML.git
. - Navigate to the project directory using
cd AndroidML
. - In the
app/src/main/java/com/k2fsa/sherpa/onnx/MainActivity.kt
file, change themodelDir
,modelName
, andlexicon
variables according to the model you want to use. For example, to use thevits-ljs
model, set themodelDir
variable tovits-ljs
, themodelName
variable tovits-ljs.onnx
, and thelexicon
variable tolexicon.txt
. - Using Android Studio, build and run the app.