{"id":20457865,"url":"https://github.com/pythainlp/thaitts-onnx","last_synced_at":"2025-09-24T19:31:59.749Z","repository":{"id":218285349,"uuid":"746038019","full_name":"PyThaiNLP/thaitts-onnx","owner":"PyThaiNLP","description":"Thai Text-to-speech by ONNX runtime","archived":false,"fork":false,"pushed_at":"2024-01-21T06:06:58.000Z","size":210,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-15T12:09:26.133Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PyThaiNLP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-20T22:01:08.000Z","updated_at":"2024-07-29T07:50:16.000Z","dependencies_parsed_at":"2024-01-21T00:25:34.934Z","dependency_job_id":"889c3a31-8358-4d60-b002-c37dec4c58ae","html_url":"https://github.com/PyThaiNLP/thaitts-onnx","commit_stats":null,"previous_names":["pythainlp/thaitts-onnx"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2Fthaitts-onnx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2Fthaitts-onnx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2Fthaitts-onnx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2Fthaitts-onnx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyThaiNLP","download_url":"https://codeload.github.com/PyThaiNLP/thaitts-onnx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234120082,"owners_count":18782774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T12:09:31.796Z","updated_at":"2025-09-24T19:31:59.382Z","avatar_url":"https://github.com/PyThaiNLP.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# thaitts-onnx\nThai Text-to-speech by ONNX runtime\n\nGoogle colab: [https://colab.research.google.com/github/PyThaiNLP/thaitts-onnx/blob/main/demo.ipynb](https://colab.research.google.com/github/PyThaiNLP/thaitts-onnx/blob/main/demo.ipynb)\n\n\nToday, Thai Text-to-speech doesn't have any onnx model for onnxruntime. We use TTS model from [lunarlist/tts-thai-last-step](https://huggingface.co/lunarlist/tts-thai-last-step) but the model is lockout that needs has NeMo (and NeMo doesn't support [export Tacotron2 to ONNX model since 2020](https://github.com/NVIDIA/NeMo/issues/531)). We found the way to export Thai TTS model to ONNX model. It will create the way to use Thai TTS model in many devices.\n\n## How to export\n\nWe use [lunarlist/tts-thai-last-step](https://huggingface.co/lunarlist/tts-thai-last-step) model for export Thai TTS model.\n\nWe use the patch from [#7366 at NVIDIA/NeMo](https://github.com/NVIDIA/NeMo/pull/7466) and fixed a bug in the patch.\n\n### Install\n\n```sh\npip install -r https://github.com/RobinDong/NeMo/raw/add_onnx_export/requirements/requirements_tts.txt\npip install hydra-core\npip install youtokentome webdataset\npip install pyannote.audio\npip install pytorch-lightning==2.0.9\n```\n\n### Export\n\nRun onnx-export.ipynb and vocoder-export.ipynb.\n\nYou will found the patch has a bug. It is wrong for setting high number at the line 100 in https://github.com/RobinDong/NeMo/blob/0113c8268594fa0e61901409235ff33ea5d39beb/nemo/collections/tts/models/tacotron2.py#L98 (Path: /usr/local/lib/python3.10/dist-packages/nemo/collections/tts/models/tacotron2.py) and fixed by config high number https://github.com/PyThaiNLP/thaitts-onnx/blob/main/tacotron2.py#L100.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythainlp%2Fthaitts-onnx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythainlp%2Fthaitts-onnx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythainlp%2Fthaitts-onnx/lists"}