Skip to main content

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

./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

网站

https://tts.ichochy.com

音频预览

audio.wav

下载(macOS)

https://file.ichochy.com/igtts.zip

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

igtts-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

igtts-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file igtts-0.1.0.tar.gz.

File metadata

  • Download URL: igtts-0.1.0.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

Hashes for igtts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 53139424d37cd7414c9adc1c8e4cdbc567671152af388778baf7a3e7277ebd34
MD5 ed64941d65a11ca95bc41541db8442f1
BLAKE2b-256 a44a30a12af9f53981aa0c191a8bdfa622da2c6edea5a3560c19729f75d46f16

See more details on using hashes here.

File details

Details for the file igtts-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: igtts-0.1.0-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

Hashes for igtts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b232714e8cad23b12cbc8e5ff0eb9c8097cf746477acc01e9fae748ef5975b1
MD5 c21dfd059df1ae90bd82a4a3dec22f4e
BLAKE2b-256 a45f15374b8ff0a1d14d50d4f80c1e5cd5631428b29ec37e3529437d4da4ae5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page