--- license: cc-by-nc-4.0 library_name: phoonnx pipeline_tag: text-to-speech language: - en - zh tags: - phoonnx - llasa --- # llasa-multi-1b-unicode A Llasa model by HKUST Audio, from [HKUSTAudio/Llasa-1B](https://huggingface.co/HKUSTAudio/Llasa-1B), packaged for [phoonnx](https://github.com/TigreGotico/phoonnx), our ONNX text-to-speech library. ## Model details | | | |---|---| | Architecture | [Llasa](https://huggingface.co/collections/Phoonnx/llasa-6af8ecb8fa16ab398b601b36) | | Upstream | [HKUSTAudio/Llasa-1B](https://huggingface.co/HKUSTAudio/Llasa-1B) | | Author | HKUST Audio | | Languages | `en-US`, `zh-CN` | | Text input | Unicode codepoints of the text | ## How to use ```bash pip install --pre phoonnx ``` ```python import wave from phoonnx.model_manager import TTSModelManager manager = TTSModelManager() manager.load() manager.merge_default_voices() voice = manager.voices["llasa/HKUST/en/en_female_a"].load() with wave.open("output.wav", "wb") as wav_file: text = "..." # a sentence in en-US voice.synthesize_wav(text, wav_file) ``` In OVOS, phoonnx installs the `ovos-tts-plugin-phoonnx` plugin. Select the voice in `mycroft.conf`: ```json {"tts": {"module": "ovos-tts-plugin-phoonnx", "ovos-tts-plugin-phoonnx": {"voice": "llasa/HKUST/en/en_female_a"}}} ``` ## Text front end phoonnx hands the text to [scriptconv](https://github.com/TigreGotico/scriptconv), our text conversion library, which normalises it and turns it into the model's input: - `unicode`: `UnicodeCodepointPhonemizer` from `scriptconv.phonemizers.base`, in scriptconv itself. ## phoonnx voices - `llasa/HKUST/en/en_female_a` - `llasa/HKUST/en/en_male_a` - `llasa/HKUST/zh/zh_female_a` - `llasa/HKUST/zh/zh_male_a` ## Licence The upstream declares the licence `cc-by-nc-4.0` in the model card of HKUSTAudio/Llasa-1B. ## Related projects - [phoonnx](https://github.com/TigreGotico/phoonnx): runs this model, in Python and in OVOS. - [scriptconv](https://github.com/TigreGotico/scriptconv): text normalisation, script conversion and phonemizers for phoonnx. - The [Llasa](https://huggingface.co/collections/Phoonnx/llasa-6af8ecb8fa16ab398b601b36) collection: every Llasa model packaged for phoonnx.