# glm_tts **Repository Path**: xywhsoft/glm_tts ## Basic Information - **Project Name**: glm_tts - **Description**: 一个调用 GLM TTS 文本转声音的小工具 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: https://xywhsoft.com - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-06 - **Last Updated**: 2026-05-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # glm_tts Small Windows tool for generating local speech files with the GLM-TTS API. ## Build ```powershell cmd /c .\build.bat build ``` The executable is written to `build\glm_tts.exe`. ## Configuration Set your Zhipu API key before calling the API: ```powershell $env:GLM_API_KEY="your api key" ``` You can also pass `--api-key` on the command line. ## CLI Generate one file from a text file: ```powershell build\glm_tts.exe --file input.txt --voice tongtong --format wav --out out.wav ``` Generate one file with GLM-TTS Clone from a local voice sample: ```powershell build\glm_tts.exe --file input.txt --clone-sample voice.wav --format wav --out cloned.wav ``` Reuse an already uploaded clone sample file id: ```powershell build\glm_tts.exe --file input.txt --clone-file-id file_xxx --out cloned.wav ``` Generate one file from inline text: ```powershell build\glm_tts.exe --text "hello" --out out.wav ``` Generate audio for every `.txt` file under a folder: ```powershell build\glm_tts.exe --dir texts --out audio --voice tongtong --format wav ``` If `--voice` is omitted, `tongtong` is used. If `--format` is omitted, `wav` is used. ## GUI Run `build\glm_tts.exe` without arguments. The GUI has one large text input, one API key input, one output path input, a single-file generate button, and a batch TXT folder button. To use voice clone in the GUI, enter a local voice sample audio path in the optional clone sample field. The batch button uploads that sample once and reuses it for every TXT file.