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 355 forks source link

Import Piper / VITS as iOS Custom System Voices for TTS using AVSpeechSynthesisProviderAudioUnit Extension in Swift #984

Open S-Ali-Zaidi opened 3 months ago

S-Ali-Zaidi commented 3 months ago

In recent iOS updates, Apple now allows for any speech synthesizers brought into iOS via an App to become a part of the custom options for the iOS system voices for TTS, using the AVSpeechSynthesisProviderVoice and AVSpeechSynthesisProviderAudioUnit:

See:

This functionality has been implemented by the official espeak-ng iOS app, you can see how it was done in extensions directory of their iOS app source code

There is also a repo that has built out a similar functionality around espeak-ng and piper for iOS here

Wondering if we can see this implemented within Sherpa-onnx too?

csukuangfj commented 3 months ago

Would you like to contribute?

We have done that for Android.

willwade commented 1 month ago

I think you’d be better forking that iOS piper code. I built something similar and scrapped it because of that code. As piper is vits we should be able to largely use the same thing. We need this too