{"id":31328092,"url":"https://github.com/nay-cat/livekit-pipertts-plugin","last_synced_at":"2026-05-16T11:33:10.465Z","repository":{"id":312758160,"uuid":"1048641369","full_name":"nay-cat/LiveKit-PiperTTS-Plugin","owner":"nay-cat","description":"Quick integration of Piper TTS (super lightweight, high-quality model) with LiveKit","archived":false,"fork":false,"pushed_at":"2025-09-01T20:02:05.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-01T21:24:32.587Z","etag":null,"topics":["agents","ai","livekit","piper","piper-tts","tts"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nay-cat.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-01T19:25:27.000Z","updated_at":"2025-09-01T20:02:08.000Z","dependencies_parsed_at":"2025-09-01T21:24:37.607Z","dependency_job_id":"ec100193-797c-472b-bfc6-3853d73c8b71","html_url":"https://github.com/nay-cat/LiveKit-PiperTTS-Plugin","commit_stats":null,"previous_names":["nay-cat/livekit-pipertts-plugin"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/nay-cat/LiveKit-PiperTTS-Plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nay-cat%2FLiveKit-PiperTTS-Plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nay-cat%2FLiveKit-PiperTTS-Plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nay-cat%2FLiveKit-PiperTTS-Plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nay-cat%2FLiveKit-PiperTTS-Plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nay-cat","download_url":"https://codeload.github.com/nay-cat/LiveKit-PiperTTS-Plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nay-cat%2FLiveKit-PiperTTS-Plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276999694,"owners_count":25742814,"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","status":"online","status_checked_at":"2025-09-25T02:00:09.612Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["agents","ai","livekit","piper","piper-tts","tts"],"created_at":"2025-09-25T23:52:07.011Z","updated_at":"2025-09-25T23:52:11.104Z","avatar_url":"https://github.com/nay-cat.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [piper1-gpl](https://github.com/OHF-Voice/piper1-gpl/tree/main) (piper-tts) LiveKit Integration\n\n\u003e This plugin is a quick implementation created in a short time to achieve LiveKit + PiperTTS functionality.\n\n## Two ways to use it:\n- Using Piper as subprocess ([PiperTTSPluginLocal.py](https://github.com/nay-cat/LiveKit-PiperTTS-Plugin/blob/main/src/custom_tts/PiperTTSPluginLocal.py))\n- Using piper-tts python package ([PiperTTSPlugin.py](https://github.com/nay-cat/LiveKit-PiperTTS-Plugin/blob/main/src/custom_tts/PiperTTSPlugin.py))\n\n## You should know\n- Streaming is disabled, so the plugin will generate all the audio before playing it, which may add a few milliseconds of delay. You can look at [piper1-gpl python api docs](https://github.com/OHF-Voice/piper1-gpl/blob/main/docs/API_PYTHON.md) and **PiperVoice.synthesise** to see how it could be implemented.\n- This plugin was made quickly and is intended to be used for small things and to serve as a reference for developing your own implementations.\n***\n\n## Plugin settings\n\n### PiperTTSPluginLocal.py\n ```py\n# Executable must be included in the path\ntts=PiperTTSPlugin(\"piper_executable_path/piper\", \"models_path/model\", speed, sample_rate),\n```\n---\n\n### PiperTTSPlugin.py\n\n```py\ntts=PiperTTSPlugin(\n    model=\"es_ES-carlfm-x_low.onnx\",\n    speed=1.2,    \n    volume=0.8,    \n    noise_scale=0.5,\n    noise_w=0.6,   \n    use_cuda=False  # onnxruntime-gpu package needed for CUDA\n)\n```\n---\n\n# HOW TO USE\n***\n\n## Using Piper as subprocess (PiperTTSPluginLocal.py)\n\n**To implement Piper as subprocess, you must install Piper on your system and the model you are going to use**\n\n1. Install Piper TTS executable (https://github.com/rhasspy/piper/releases) ¹\n    - You must download the version corresponding to your operating system, unzip the files, and save them in a location you know.\n2. Download a Piper TTS model (https://huggingface.co/rhasspy/piper-voices/tree/main)\n    - You need to save the .onnx and the .onnx.json files in a location you know\n3. Download [PiperTTSPluginLocal.py](https://github.com/nay-cat/LiveKit-PiperTTS-Plugin/blob/main/src/custom_tts/PiperTTSPluginLocal.py) and place it within your project, for example, within a custom_tts/PiperTTSPluginLocal.py folder.\n4. Import the TTS Plugin and implement it in your Agent\n```py\nfrom custom_tts.PiperTTSPluginLocal import PiperTTSPlugin\n\nload_dotenv(dotenv_path=\".env.local\")\nlogger = logging.getLogger(\"voice-agent\")\n\nclass Assistant(Agent):\n    def __init__(self) -\u003e None:\n        super().__init__(\n            instructions=\"sample assistant to test piper\",\n            stt=deepgram.STT(model=\"nova-2\",  language=\"es\"),\n            llm=openai.LLM.with_deepseek(model=\"deepseek-chat\",  temperature=0.7),\n            # (Examples) Piper executable in piper/ folder, models in models/ folder \n            tts=PiperTTSPlugin(\"piper/piper.exe\", \"models/es_ES-carlfm-x_low.onnx\", 1, 22500),\n        )\n```\n***\n## Using Piper TTS Plugin with Piper Package\n**Implement Piper TTS Plugin with Piper Python Package**\n\n1. Install piper-tts python package\n    ```py \n    pip install piper-tts\n    ```\n2. Download a Piper TTS model (https://huggingface.co/rhasspy/piper-voices/tree/main)\n    ```py\n    python -m piper.download_voices es_ES-carlfm-x_low\n    ```\n3. Download [PiperTTSPlugin.py](https://github.com/nay-cat/LiveKit-PiperTTS-Plugin/blob/main/src/custom_tts/PiperTTSPlugin.py) and place it within your project, for example, within a custom_tts/PiperTTSPlugin.py folder.\n4. Import the TTS Plugin and implement it in your Agent\n\n    ```py\n    from custom_tts.PiperTTSPlugin import PiperTTSPlugin\n\n    load_dotenv(dotenv_path=\".env.local\")\n    logger = logging.getLogger(\"voice-agent\")\n    \n    class Assistant(Agent):\n        def __init__(self) -\u003e None:\n            super().__init__(\n                instructions=\"sample assistant to test piper\",\n                stt=deepgram.STT(model=\"nova-2\",  language=\"es\"),\n                llm=openai.LLM.with_deepseek(model=\"deepseek-chat\",  temperature=0.7),\n                tts=PiperTTSPlugin(\n                    model=\"es_ES-carlfm-x_low.onnx\",\n                    speed=1.2,    \n                    volume=0.8,    \n                    noise_scale=0.5,\n                    noise_w=0.6,   \n                    use_cuda=False   \n                )\n            )\n    ```\n***\n#### Information\n\n**¹** These are the releases from Piper's old repository. I have tested the plugin with them.\n\u003e (I know it's a bit redundant because they're both local.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnay-cat%2Flivekit-pipertts-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnay-cat%2Flivekit-pipertts-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnay-cat%2Flivekit-pipertts-plugin/lists"}