{"id":20457861,"url":"https://github.com/pythainlp/pythaitts","last_synced_at":"2026-01-30T18:06:09.668Z","repository":{"id":57880734,"uuid":"523635210","full_name":"PyThaiNLP/PyThaiTTS","owner":"PyThaiNLP","description":"Open Source Thai Text-to-speech library in Python","archived":false,"fork":false,"pushed_at":"2026-01-15T18:58:04.000Z","size":3968,"stargazers_count":51,"open_issues_count":2,"forks_count":10,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2026-01-15T20:55:39.377Z","etag":null,"topics":["hacktoberfest","speech-synthesis","tts"],"latest_commit_sha":null,"homepage":"https://pythainlp.github.io/PyThaiTTS/","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-11T07:59:21.000Z","updated_at":"2026-01-15T19:06:34.000Z","dependencies_parsed_at":"2024-11-15T12:09:33.948Z","dependency_job_id":"59d7ded2-e4ec-4885-9057-514b7c91d7eb","html_url":"https://github.com/PyThaiNLP/PyThaiTTS","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"d8839c1e9835bdc4c395a0adf5ea0a2eb43cdc73"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/PyThaiNLP/PyThaiTTS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2FPyThaiTTS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2FPyThaiTTS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2FPyThaiTTS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2FPyThaiTTS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyThaiNLP","download_url":"https://codeload.github.com/PyThaiNLP/PyThaiTTS/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2FPyThaiTTS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28846769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["hacktoberfest","speech-synthesis","tts"],"created_at":"2024-11-15T12:09:30.291Z","updated_at":"2026-01-28T16:04:35.394Z","avatar_url":"https://github.com/PyThaiNLP.png","language":"Jupyter Notebook","readme":"# PyThaiTTS\nOpen Source Thai Text-to-speech library in Python\n\n[Google Colab](https://colab.research.google.com/github/PyThaiNLP/PyThaiTTS/blob/dev/notebook/use_lunarlist_model.ipynb) | [Docs](https://pythainlp.github.io/PyThaiTTS/) | [Notebooks](https://github.com/PyThaiNLP/PyThaiTTS/tree/dev/notebook)\n\u003ca href=\"https://pepy.tech/project/pythaitts\"\u003e\u003cimg alt=\"Download\" src=\"https://pepy.tech/badge/pythaitts/month\"/\u003e\u003c/a\u003e\n\nLicense: [Apache-2.0 License](https://github.com/PyThaiNLP/pythaitts/blob/main/LICENSE)\n\n## Install\n\nInstall by pip:\n\n\u003e pip install pythaitts\n\n## Usage\n\n### Basic Usage\n\n```python\nfrom pythaitts import TTS\n\ntts = TTS()\nfile = tts.tts(\"ภาษาไทย ง่าย มาก มาก\", filename=\"cat.wav\") # It will get wav file path.\nwave = tts.tts(\"ภาษาไทย ง่าย มาก มาก\",return_type=\"waveform\") # It will get waveform.\n```\n\n### Using Different TTS Models\n\nPyThaiTTS supports multiple TTS models. You can specify which model to use:\n\n```python\nfrom pythaitts import TTS\n\n# Use VachanaTTS (default voices: th_f_1, th_m_1, th_f_2, th_m_2)\ntts = TTS(pretrained=\"vachana\")\nfile = tts.tts(\"สวัสดีครับ\", speaker_idx=\"th_f_1\", filename=\"output.wav\")\n\n# Use Lunarlist ONNX (default)\ntts = TTS(pretrained=\"lunarlist_onnx\")\nfile = tts.tts(\"ภาษาไทย ง่าย มาก\", filename=\"output.wav\")\n\n# Use KhanomTan\ntts = TTS(pretrained=\"khanomtan\")\nfile = tts.tts(\"ภาษาไทย\", speaker_idx=\"Linda\", filename=\"output.wav\")\n```\n\n### Text Preprocessing\n\nPyThaiTTS includes automatic text preprocessing to improve TTS quality:\n- **Number to Thai text conversion**: Converts digits (e.g., \"123\") to Thai text (e.g., \"หนึ่งร้อยยี่สิบสาม\")\n- **Mai yamok (ๆ) expansion**: Expands the Thai repetition character (e.g., \"ดีๆ\" becomes \"ดีดี\")\n\nPreprocessing is enabled by default:\n\n```python\nfrom pythaitts import TTS\n\ntts = TTS()\n# Automatic preprocessing: \"มี 5 คนๆ\" becomes \"มี ห้า คนคน\"\nfile = tts.tts(\"มี 5 คนๆ\", filename=\"output.wav\")\n```\n\nYou can disable preprocessing if needed:\n\n```python\nfile = tts.tts(\"มี 5 คนๆ\", preprocess=False, filename=\"output.wav\")\n```\n\nYou can also use preprocessing functions directly:\n\n```python\nfrom pythaitts import num_to_thai, expand_maiyamok, preprocess_text\n\n# Convert numbers to Thai text\nprint(num_to_thai(\"123\"))  # Output: หนึ่งร้อยยี่สิบสาม\n\n# Expand mai yamok\nprint(expand_maiyamok(\"ดีๆ\"))  # Output: ดีดี\n\n# Full preprocessing\nprint(preprocess_text(\"มี 5 คนๆ\"))  # Output: มี ห้า คนคน\n```\n\nYou can see more at [https://pythainlp.github.io/PyThaiTTS/](https://pythainlp.github.io/PyThaiTTS/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythainlp%2Fpythaitts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythainlp%2Fpythaitts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythainlp%2Fpythaitts/lists"}