iGTTS(Gemini TTS)
iGTTS(Gemini TTS) 开源免费的文本转语音(TTS)的命令行工具。
iGTTS(Gemini TTS) 是通过调用 Gemini TTS 的接口,实现文本转语音(TTS)的命令行工具。
添加 API key
# 编辑 .zshrc:
vim ~/.zshrc
# 添加信息(导入环境变量):
export GEMINI_API_KEY=<YOUR_API_KEY_HERE>
# 保存后应用更改:
source ~/.zshrc
安装 iGTTS
pip install igtts
运行 iGTTS
igtts -h
usage: igtts [-h] [-i INPUT_FILE] [-l] [-v VOICE] [-o OUTPUT_FILE] [text]
Gemini TTS 文本转语音(TTS)命令行工具。
positional arguments:
text 指定语音文本的内容。如果未提供,请使用 --input-file。
options:
-h, --help show this help message and exit
-i, --input-file INPUT_FILE
指定语音文本的文件。
-l, --list-voices 列出语音的语音名称。
-v, --voice VOICE 指定语音的语音名称(默认:Zephyr)。
-o, --output-file OUTPUT_FILE
指定音频保存的文件(默认:output.wav)。
实例
# 指定语音文本的内容
igtts "Hello, my name is iChochy."
# 指定语音文本的文件 -i "input.txt"
igtts -i "input.txt"
# 指定语音文本的文件 -i "input.txt"
# 指定语音保存的文件 -o "output.wav"
igtts -i "input.txt" -o "output.mp3"
# 指定语音文本的文件 -i "input.txt"
# 指定语音的语音名称 -v "Zephyr"
# 指定音频保存的文件 -o "output.wav"
igtts -i "input.txt" -v "Zephyr" -o "output.mp3"
# 列出语音的语音名称 -l
igtts -l
模型
gemini-2.5-flash-preview-tts
获取 API key
API key:https://aistudio.google.com/apikey
额度参数:
每分钟请求数 (RPM)
每分钟 token 数(输入)(TPM)
每日请求数 (RPD)
免费额度:
RPM:3
TPM:10000
RPD:15
额度详情:https://ai.google.dev/gemini-api/docs/rate-limits?hl=zh-cn
接口详情:https://ai.google.dev/gemini-api/docs/speech-generation?hl=zh-cn
软件信息
网站
GitHub
https://github.com/ichochy/igtts
PYPI
https://pypi.org/project/igtts
音频预览
Metadata
Release files for iGTTS 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| igtts-0.1.2.tar.gz | 4.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| igtts-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 kB
Release files / igtts-0.1.2.tar.gz
| Download URL | igtts-0.1.2.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
453f38905c86841601b5dfb044c26e05a9d3e95ff095eceece5a8aa2dcaee80d
|
|
BLAKE2b-256 checksum How to use checksums |
c840b0175690af721a5e325661fc57de242a0dd6aaa921fde846b55d80cfde25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.13.7 Darwin/24.6.0
|
Release files / igtts-0.1.2-py3-none-any.whl
| Download URL | igtts-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ec1a008e71e85a987818a3bb67b450a44b67b4203e47b7738f102a1556bd3018
|
|
BLAKE2b-256 checksum How to use checksums |
b4eae537e13a41892dce3ca4dbe84a5f0d038ec9d6acdd9b447cb2a56702118b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.13.7 Darwin/24.6.0
|
Security for iGTTS 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.