GeminiTtsCli 0.1.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global GeminiTtsCli --version 0.1.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local GeminiTtsCli --version 0.1.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=GeminiTtsCli&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package GeminiTtsCli --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Gemini TTS CLI
A command-line interface tool for text-to-speech conversion using Google's Gemini TTS API.
Features
- Convert text to speech using Google Gemini TTS API
- Multiple voice options (male and female voices)
- Support for custom instructions
- Output to WAV format
- Cross-platform support (Windows, Linux, macOS)
Installation
Via .NET Global Tool (Recommended)
dotnet tool install -g GeminiTtsCli
Manual Installation
Download the appropriate binary for your platform from the releases page.
Prerequisites
- Google AI Studio API Key: You need to obtain an API key from Google AI Studio
- Environment Variable: Set the
GEMINI_API_KEY
environment variable with your API key
Setting up the API Key
Windows (PowerShell)
$env:GEMINI_API_KEY = "your-api-key-here"
Windows (Command Prompt)
set GEMINI_API_KEY=your-api-key-here
Linux/macOS
export GEMINI_API_KEY="your-api-key-here"
To make it permanent, add the export line to your shell profile (.bashrc
, .zshrc
, etc.).
Usage
gemini-tts --instructions "Your instructions" --speaker1 <voice-name> --text "Text to convert" [--outputfile output.wav]
Parameters
--instructions
(required): Instructions for the TTS conversion--speaker1
(required): Voice name for the speaker--text
(required): Text to convert to speech--outputfile
(optional): Output WAV filename (default: output.wav)
Available Voices
Female Voices
- achernar, aoede, autonoe, callirrhoe, despina, erinome, gacrux, kore
- laomedeia, leda, sulafat, zephyr, pulcherrima, vindemiatrix
Male Voices
- achird, algenib, algieba, alnilam, charon, enceladus, fenrir, iapetus
- orus, puck, rasalgethi, sadachbia, sadaltager, schedar, umbriel, zubenelgenubi
Example
gemini-tts --instructions "Please speak clearly and naturally" --speaker1 zephyr --text "Hello, this is a test of the Gemini TTS system" --outputfile greeting.wav
Development
Building from Source
- Clone the repository
- Restore dependencies:
dotnet restore
- Build:
dotnet build
- Run:
dotnet run -- --instructions "test" --speaker1 zephyr --text "Hello world"
Publishing
The project supports two types of builds:
1. Global Tool (for NuGet distribution)
dotnet pack --configuration Release
This creates a .NET global tool package that can be installed via dotnet tool install -g GeminiTtsCli
.
2. Self-Contained Executables (for standalone distribution)
For Windows x64:
dotnet publish --configuration Release --self-contained true --runtime win-x64 -p:PublishSelfContained=true
For Linux x64:
dotnet publish --configuration Release --self-contained true --runtime linux-x64 -p:PublishSelfContained=true
For macOS x64:
dotnet publish --configuration Release --self-contained true --runtime osx-x64 -p:PublishSelfContained=true
For macOS ARM64:
dotnet publish --configuration Release --self-contained true --runtime osx-arm64 -p:PublishSelfContained=true
The project includes automated GitHub Actions workflows for:
- Building cross-platform binaries
- Publishing to NuGet Gallery
- Creating GitHub releases
To trigger a release, create and push a git tag:
git tag v0.1.0
git push origin v0.1.0
License
MIT License - see LICENSE file for details.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Support
If you encounter any issues or have questions, please open an issue on GitHub.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.