{"id":26119853,"url":"https://github.com/SparkAudio/Spark-TTS","last_synced_at":"2025-03-10T13:03:09.206Z","repository":{"id":279769157,"uuid":"938453471","full_name":"SparkAudio/Spark-TTS","owner":"SparkAudio","description":"Spark-TTS Inference Code","archived":false,"fork":false,"pushed_at":"2025-02-27T10:57:30.000Z","size":5498,"stargazers_count":37,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-27T13:41:05.737Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/SparkAudio.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":"2025-02-25T01:29:36.000Z","updated_at":"2025-02-27T13:40:49.000Z","dependencies_parsed_at":"2025-02-27T13:41:13.291Z","dependency_job_id":"37afe49a-a3a8-46be-ab9a-38f1fac8c955","html_url":"https://github.com/SparkAudio/Spark-TTS","commit_stats":null,"previous_names":["sparkaudio/spark-tts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkAudio%2FSpark-TTS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkAudio%2FSpark-TTS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkAudio%2FSpark-TTS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkAudio%2FSpark-TTS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SparkAudio","download_url":"https://codeload.github.com/SparkAudio/Spark-TTS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242856020,"owners_count":20196358,"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":"2025-03-10T13:01:36.029Z","updated_at":"2025-03-10T13:03:09.196Z","avatar_url":"https://github.com/SparkAudio.png","language":"Python","funding_links":[],"categories":["Python","others","TTS (Text-to-Speech) | 文本转语音","语音合成","TTS Models"],"sub_categories":["Open Source TTS Models | 开源 TTS 模型","资源传输下载"],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003e\n    Spark-TTS\n    \u003c/h1\u003e\n    \u003cp\u003e\n    Official PyTorch code for inference of \u003cbr\u003e\n    \u003cb\u003e\u003cem\u003eSpark-TTS: An Efficient LLM-Based Text-to-Speech Model with Single-Stream Decoupled Speech Tokens\u003c/em\u003e\u003c/b\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\n    \u003cimg src=\"src/logo/SparkTTS.jpg\" alt=\"Spark-TTS Logo\" style=\"width: 200px; height: 200px;\"\u003e\n    \u003c/p\u003e\n        \u003cp\u003e\n        \u003cimg src=\"src/logo/HKUST.jpg\" alt=\"Institution 1\" style=\"width: 200px; height: 60px;\"\u003e\n        \u003cimg src=\"src/logo/mobvoi.jpg\" alt=\"Institution 2\" style=\"width: 200px; height: 60px;\"\u003e\n        \u003cimg src=\"src/logo/SJU.jpg\" alt=\"Institution 3\" style=\"width: 200px; height: 60px;\"\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\n        \u003cimg src=\"src/logo/NTU.jpg\" alt=\"Institution 4\" style=\"width: 200px; height: 60px;\"\u003e\n        \u003cimg src=\"src/logo/NPU.jpg\" alt=\"Institution 5\" style=\"width: 200px; height: 60px;\"\u003e\n        \u003cimg src=\"src/logo/SparkAudio2.jpg\" alt=\"Institution 6\" style=\"width: 200px; height: 60px;\"\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\n    \u003c/p\u003e\n    \u003ca href=\"https://arxiv.org/pdf/2503.01710\"\u003e\u003cimg src=\"https://img.shields.io/badge/Paper-ArXiv-red\" alt=\"paper\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://sparkaudio.github.io/spark-tts/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Demo-Page-lightgrey\" alt=\"version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://huggingface.co/SparkAudio/Spark-TTS-0.5B\"\u003e\u003cimg src=\"https://img.shields.io/badge/Hugging%20Face-Model%20Page-yellow\" alt=\"Hugging Face\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/SparkAudio/Spark-TTS\"\u003e\u003cimg src=\"https://img.shields.io/badge/Platform-linux-lightgrey\" alt=\"version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/SparkAudio/Spark-TTS\"\u003e\u003cimg src=\"https://img.shields.io/badge/Python-3.12+-orange\" alt=\"version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/SparkAudio/Spark-TTS\"\u003e\u003cimg src=\"https://img.shields.io/badge/PyTorch-2.5+-brightgreen\" alt=\"python\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/SparkAudio/Spark-TTS\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\" alt=\"mit\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\n## Spark-TTS 🔥\n\n### Overview\n\nSpark-TTS is an advanced text-to-speech system that uses the power of large language models (LLM) for highly accurate and natural-sounding voice synthesis. It is designed to be efficient, flexible, and powerful for both research and production use.\n\n### Key Features\n\n- **Simplicity and Efficiency**: Built entirely on Qwen2.5, Spark-TTS eliminates the need for additional generation models like flow matching. Instead of relying on separate models to generate acoustic features, it directly reconstructs audio from the code predicted by the LLM. This approach streamlines the process, improving efficiency and reducing complexity.\n- **High-Quality Voice Cloning**: Supports zero-shot voice cloning, which means it can replicate a speaker's voice even without specific training data for that voice. This is ideal for cross-lingual and code-switching scenarios, allowing for seamless transitions between languages and voices without requiring separate training for each one.\n- **Bilingual Support**: Supports both Chinese and English, and is capable of zero-shot voice cloning for cross-lingual and code-switching scenarios, enabling the model to synthesize speech in multiple languages with high naturalness and accuracy.\n- **Controllable Speech Generation**: Supports creating virtual speakers by adjusting parameters such as gender, pitch, and speaking rate.\n\n---\n\n\u003ctable align=\"center\"\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cb\u003eInference Overview of Voice Cloning\u003c/b\u003e\u003cbr\u003e\u003cimg src=\"src/figures/infer_voice_cloning.png\" width=\"80%\" /\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cb\u003eInference Overview of Controlled Generation\u003c/b\u003e\u003cbr\u003e\u003cimg src=\"src/figures/infer_control.png\" width=\"80%\" /\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n## 🚀 News\n\n- **[2025-03-04]** Our paper on this project has been published! You can read it here: [Spark-TTS](https://arxiv.org/pdf/2503.01710). \n\n\n## Install\n**Clone and Install**\n\n  Here are instructions for installing on Linux. If you're on Windows, please refer to the [Windows Installation Guide](https://github.com/SparkAudio/Spark-TTS/issues/5).  \n*(Thanks to [@AcTePuKc](https://github.com/AcTePuKc) for the detailed Windows instructions!)*\n\n\n- Clone the repo\n``` sh\ngit clone https://github.com/SparkAudio/Spark-TTS.git\ncd Spark-TTS\n```\n\n- Install Conda: please see https://docs.conda.io/en/latest/miniconda.html\n- Create Conda env:\n\n``` sh\nconda create -n sparktts -y python=3.12\nconda activate sparktts\npip install -r requirements.txt\n# If you are in mainland China, you can set the mirror as follows:\npip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com\n```\n\n**Model Download**\n\nDownload via python:\n```python\nfrom huggingface_hub import snapshot_download\n\nsnapshot_download(\"SparkAudio/Spark-TTS-0.5B\", local_dir=\"pretrained_models/Spark-TTS-0.5B\")\n```\n\nDownload via git clone:\n```sh\nmkdir -p pretrained_models\n\n# Make sure you have git-lfs installed (https://git-lfs.com)\ngit lfs install\n\ngit clone https://huggingface.co/SparkAudio/Spark-TTS-0.5B pretrained_models/Spark-TTS-0.5B\n```\n\n**Basic Usage**\n\nYou can simply run the demo with the following commands:\n``` sh\ncd example\nbash infer.sh\n```\n\nAlternatively, you can directly execute the following command in the command line to perform inference：\n\n``` sh\npython -m cli.inference \\\n    --text \"text to synthesis.\" \\\n    --device 0 \\\n    --save_dir \"path/to/save/audio\" \\\n    --model_dir pretrained_models/Spark-TTS-0.5B \\\n    --prompt_text \"transcript of the prompt audio\" \\\n    --prompt_speech_path \"path/to/prompt_audio\"\n```\n\n**Web UI Usage**\n\nYou can start the UI interface by running `python webui.py --device 0`, which allows you to perform Voice Cloning and Voice Creation. Voice Cloning supports uploading reference audio or directly recording the audio.\n\n\n| **Voice Cloning** | **Voice Creation** |\n|:-------------------:|:-------------------:|\n| ![Image 1](src/figures/gradio_TTS.png) | ![Image 2](src/figures/gradio_control.png) |\n\n\n**Optional Methods**\n\nFor additional CLI and Web UI methods, including alternative implementations and extended functionalities, you can refer to:\n\n- [CLI and UI by AcTePuKc](https://github.com/SparkAudio/Spark-TTS/issues/10)\n\n\n## **Demos**\n\nHere are some demos generated by Spark-TTS using zero-shot voice cloning. For more demos, visit our [demo page](https://sparkaudio.github.io/spark-tts/).\n\n---\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n    \n**Donald Trump**\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n    \n**Zhongli (Genshin Impact)**\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n\n[Donald Trump](https://github.com/user-attachments/assets/fb225780-d9fe-44b2-9b2e-54390cb3d8fd)\n\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n    \n[Zhongli](https://github.com/user-attachments/assets/80eeb9c7-0443-4758-a1ce-55ac59e64bd6)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n\u003ctable\u003e\n\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n    \n**陈鲁豫 Chen Luyu**\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n    \n**杨澜 Yang Lan**\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n    \n[陈鲁豫Chen_Luyu.webm](https://github.com/user-attachments/assets/5c6585ae-830d-47b1-992d-ee3691f48cf4)\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n    \n[Yang_Lan.webm](https://github.com/user-attachments/assets/2fb3d00c-abc3-410e-932f-46ba204fb1d7)\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n    \n**余承东 Richard Yu**\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n    \n**马云 Jack Ma**\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n\n[Yu_Chengdong.webm](https://github.com/user-attachments/assets/78feca02-84bb-4d3a-a770-0cfd02f1a8da)\n\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n    \n[Ma_Yun.webm](https://github.com/user-attachments/assets/2d54e2eb-cec4-4c2f-8c84-8fe587da321b)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n    \n**刘德华 Andy Lau**\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n\n**徐志胜 Xu Zhisheng**\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n\n[Liu_Dehua.webm](https://github.com/user-attachments/assets/195b5e97-1fee-4955-b954-6d10fa04f1d7)\n\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n    \n[Xu_Zhisheng.webm](https://github.com/user-attachments/assets/dd812af9-76bd-4e26-9988-9cdb9ccbb87b)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\n---\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n    \n**哪吒 Nezha**\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n    \n**李靖 Li Jing**\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n\n[Ne_Zha.webm](https://github.com/user-attachments/assets/8c608037-a17a-46d4-8588-4db34b49ed1d)\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n\n[Li_Jing.webm](https://github.com/user-attachments/assets/aa8ba091-097c-4156-b4e3-6445da5ea101)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\n## To-Do List\n\n- [x] Release the Spark-TTS paper.\n- [ ] Release the training code.\n- [ ] Release the training dataset, VoxBox.\n\n\n## Citation\n\n```\n@misc{wang2025sparktts,\n      title={Spark-TTS: An Efficient LLM-Based Text-to-Speech Model with Single-Stream Decoupled Speech Tokens}, \n      author={Xinsheng Wang and Mingqi Jiang and Ziyang Ma and Ziyu Zhang and Songxiang Liu and Linqin Li and Zheng Liang and Qixi Zheng and Rui Wang and Xiaoqin Feng and Weizhen Bian and Zhen Ye and Sitong Cheng and Ruibin Yuan and Zhixian Zhao and Xinfa Zhu and Jiahao Pan and Liumeng Xue and Pengcheng Zhu and Yunlin Chen and Zhifei Li and Xie Chen and Lei Xie and Yike Guo and Wei Xue},\n      year={2025},\n      eprint={2503.01710},\n      archivePrefix={arXiv},\n      primaryClass={cs.SD},\n      url={https://arxiv.org/abs/2503.01710}, \n}\n```\n\n\n## ⚠️ Usage Disclaimer\n\nThis project provides a zero-shot voice cloning TTS model intended for academic research, educational purposes, and legitimate applications, such as personalized speech synthesis, assistive technologies, and linguistic research.\n\nPlease note:\n\n- Do not use this model for unauthorized voice cloning, impersonation, fraud, scams, deepfakes, or any illegal activities.\n\n- Ensure compliance with local laws and regulations when using this model and uphold ethical standards.\n\n- The developers assume no liability for any misuse of this model.\n\nWe advocate for the responsible development and use of AI and encourage the community to uphold safety and ethical principles in AI research and applications. If you have any concerns regarding ethics or misuse, please contact us.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSparkAudio%2FSpark-TTS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSparkAudio%2FSpark-TTS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSparkAudio%2FSpark-TTS/lists"}