k2-fsa / sherpa-onnx

Speech-to-text, text-to-speech, speaker recognition, and VAD using next-gen Kaldi with onnxruntime without Internet connection. Support embedded systems, Android, iOS, Raspberry Pi, RISC-V, x86_64 servers, websocket server/client, C/C++, Python, Kotlin, C#, Go, NodeJS, Java, Swift, Dart, JavaScript, Flutter, Object Pascal, Lazarus, Rust
https://k2-fsa.github.io/sherpa/onnx/index.html
Apache License 2.0
3.08k stars 354 forks source link

Add Persian language apk for android #524

Closed karim23657 closed 7 months ago

karim23657 commented 7 months ago

@csukuangfj Here are metadata added onnx models for vits Piper,for persian: https://huggingface.co/karim23657/persian-tts-vits/tree/main/mimic3-haaniye_low

Please add tts engine pre-built Persian language apk for android to releases

csukuangfj commented 7 months ago

@karim23657

Is the above hugging face repo indeed from piper?

Its generator.onnx.json is different from other models from piper.

karim23657 commented 7 months ago

@csukuangfj Actually it wasn't for piper , I got it from https://github.com/MycroftAI/mimic3-voices Then added metedata to work with piper , an i tested it ,it works finely without any error, I recommend you to add pre-built apk for all mimic3-voices onnx models, they are compatible with piper.

csukuangfj commented 7 months ago

Then added metedata to work with piper , an i tested it ,it works finely without any error,

Could you share the code to show how you test it?

csukuangfj commented 7 months ago

please try it at https://huggingface.co/spaces/k2-fsa/text-to-speech

Screenshot 2024-01-14 at 16 01 40

You can download the model at https://github.com/k2-fsa/sherpa-onnx/releases/tag/tts-models

https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-fa-haaniye_low.tar.bz2

csukuangfj commented 7 months ago

Added!

Please see

standalone tts tts engine
Screenshot 2024-01-14 at 19 30 07 Screenshot 2024-01-14 at 19 31 00
gyroing commented 7 months ago

@csukuangfj @karim23657
The Mimic3 tts engine uses Persian NLP Toolkit "Hazm" https://github.com/roshan-research/hazm which plays an important role in POSTagger and Tokenize of Persian language(pre-processing). This job has been done in the Mimic3 tts engine. https://github.com/MycroftAI/mimic3/blob/be72c185e471e3ef939147679df9e1d00262c513/mimic3_tts/voice.py#L602

Saying that we just convert the model is not enough for the Persian language and the Adducts(ترکیب اضافی) in the text are not read correctly. We should pay attention to this important issue.”

Here is the modeled solution from mimic3 Github page with a minor changes, I hope it will be used. https://huggingface.co/spaces/gyroing/PersianTextCorrection_Hazm

karim23657 commented 7 months ago

@csukuangfj , thank you for adding fa-haaniye_low, please Also add prebuilt apk for vits-piper-fa_IR-amir-medium . And also please add https://huggingface.co/facebook/mms-tts-fas to models with prebuilt apk .

csukuangfj commented 7 months ago

Also add prebuilt apk for vits-piper-fa_IR-amir-medium .

That has already been added. I have commented at https://github.com/rhasspy/piper/issues/17#issuecomment-1891300244

csukuangfj commented 7 months ago

And also please add https://huggingface.co/facebook/mms-tts-fas to models with prebuilt apk .

Could you follow https://k2-fsa.github.io/sherpa/onnx/tts/mms.html to add it by yourself?

This is an open-source project and we need your contribution.

csukuangfj commented 7 months ago

@csukuangfj @karim23657 The Mimic3 tts engine uses Persian NLP Toolkit "Hazm" https://github.com/roshan-research/hazm which plays an important role in POSTagger and Tokenize of Persian language(pre-processing). This job has been done in the Mimic3 tts engine. https://github.com/MycroftAI/mimic3/blob/be72c185e471e3ef939147679df9e1d00262c513/mimic3_tts/voice.py#L602

Saying that we just convert the model is not enough for the Persian language and the Adducts(ترکیب اضافی) in the text are not read correctly. We should pay attention to this important issue.”

Here is the modeled solution from mimic3 Github page with a minor changes, I hope it will be used. https://huggingface.co/spaces/gyroing/PersianTextCorrection_Hazm

Since hazm is a Python package, it is not possible to use it in C++. Hope that users familiar with Persian can contribute based on what we have provided.

gyroing commented 7 months ago

Hi new Persian Piper model is ready to convert to android Apk: Persian TTS model for piper

Persian Piper TTS space : Persian Piper TTS space based on persian-tts-dataset-male dataset voice model training is under progress for finetune

csukuangfj commented 7 months ago

Hi new Persian Piper model is ready to convert to android apk: [Persian TTS model for piper](https://huggingface.co/gyroing/Persian-Piper-Model-gyro Persian Piper TTS spapce : ) Persian Piper TTS space based on persian-tts-dataset-male dataset voice model training is under progress for finetune

@gyroing

Added!

Please see https://github.com/k2-fsa/sherpa-onnx/pull/555

gyroing commented 7 months ago

Hi new Persian Piper model is ready to convert to android apk: [Persian TTS model for piper](https://huggingface.co/gyroing/Persian-Piper-Model-gyro Persian Piper TTS spapce : ) Persian Piper TTS space based on persian-tts-dataset-male dataset voice model training is under progress for finetune

@gyroing

Added!

Please see #555

Thanks