speech-use
Original:🇺🇸 English
Translated
3 scriptsChecked / no sensitive code detected
Generate (TTS), Transcribe (STT), and Clone voices using Google's GenAI and Cloud Speech SDKs. Supports Gemini-TTS, Chirp 3, and Instant Custom Voice.
19installs
Added on
NPX Install
npx skill4agent add cnemri/google-genai-skills speech-useTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Speech Use
Use this skill to perform Text-to-Speech (TTS), Speech-to-Text (STT), and Voice Cloning operations.
This skill uses portable Python scripts managed by .
uvPrerequisites
-
Environment Variables:
- (for TTS via Gemini)
GOOGLE_API_KEY - (Required for STT and Voice Cloning)
GOOGLE_CLOUD_PROJECT - (Recommended for STT/Voice Cloning)
GOOGLE_APPLICATION_CREDENTIALS
-
APIs Enabled:
- Text-to-Speech API ()
texttospeech.googleapis.com - Speech-to-Text API ()
speech.googleapis.com
- Text-to-Speech API (
Usage
1. Generate Speech (TTS)
Generate audio from text using Gemini-TTS.
Standard Voice:
bash
uv run skills/speech-use/scripts/generate_speech.py "Hello world, this is a test." --voice Puck --output hello.wavCustom Voice (Cloned):
bash
uv run skills/speech-use/scripts/generate_speech.py "This is my custom voice speaking." --voice-cloning-key "YOUR_KEY_HERE" --output custom.wav2. Create Custom Voice (Voice Cloning)
Generate a from a reference audio file and a consent file.
voiceCloningKeyRequirements:
- : 10-30s of clear speech (the voice to clone).
reference.wav - : The speaker saying: "I am the owner of this voice and I consent to Google using this voice to create a synthetic voice model."
consent.wav
bash
uv run skills/speech-use/scripts/create_custom_voice.py --reference-audio reference.wav --consent-audio consent.wavSave the output key to use with .
generate_speech.py3. Transcribe Audio (STT)
Transcribe audio files using Chirp 3.
bash
uv run skills/speech-use/scripts/transcribe_audio.py audio.wav --language en-US --output transcript.txtOptions
generate_speech.py
- : Prebuilt voice (e.g.,
--voice,Kore,Puck,Fenrir).Aoede - : Key from
--voice-cloning-key.create_custom_voice.py - : Default
--model.gemini-2.5-flash-preview-tts
transcribe_audio.py
- : Default
--model.chirp_3 - : Default
--language.auto - : Cloud region (default
--location).us
References
Before running scripts, review the reference guides for available voices and options.
- Voices Guide - 30+ voice options with styles (Puck, Kore, Fenrir, Aoede, etc.)