Gemini TTS CLI
Project description
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
音频预览
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file igtts-0.1.1.tar.gz.
File metadata
- Download URL: igtts-0.1.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.7 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f1ccdb321e3a785a395678640df0ab62da40ce1a62ff1f0071765fb986a4627
|
|
| MD5 |
9b5d5157e7a9e6809614505ce46d8ff9
|
|
| BLAKE2b-256 |
baf01fa6dbc1d5fd0029e5eded788271c5ffbf2400ea4f6a9e613a883f7c93a3
|
File details
Details for the file igtts-0.1.1-py3-none-any.whl.
File metadata
- Download URL: igtts-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.7 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
373e349e67b2d02e08726596f7c62e348680a8fb2ba169cb5811c645d6f03af7
|
|
| MD5 |
67de793e53dc942f7b3e82f6400bab20
|
|
| BLAKE2b-256 |
68e8f3514df4228cb7ac44e7739d9f26a74805b9c0cf0a54410065dc456ce7be
|