google-tts

Convert text and documents to audio using Google Cloud Text-to-Speech API.

432|47|Updated Dec 22, 2025
Ready to run
npx skills add https://github.com/sanjay3290/ai-skills --skill google-tts-sanjay3290
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: google-tts
Source: https://github.com/sanjay3290/ai-skills/tree/main/skills/google-tts
Command: npx skills add https://github.com/sanjay3290/ai-skills --skill google-tts-sanjay3290

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PyPDF2, python-docx, ffmpeg, and includes scripts (resource) components.

What problem does it solve? Turning written documents, analysis, or documentation into listenable audio normally requires recording equipment and manual narration. This Skill automates text-to-speech conversion through the Google Cloud TTS API, producing MP3, WAV, or OGG audio from text, PDF, DOCX, Markdown, or plain text files. ## Core Features & Use Cases - Document Narration: Extract and clean text from PDF, DOCX, MD, and TXT files, then synthesize speech with Neural2, WaveNet, Studio, or Standard voices across 40+ languages. - Podcast Generation: Create two-host conversational podcasts from a JSON script, assigning different voices to each speaker and concatenating segments automatically. - Voice Discovery & Tuning: List available voices by language and type, and control speaking rate (0.25-4.0), pitch, and audio encoding. - Use Case: You finish a long technical report and want to review it during your commute. Point the Skill at the PDF, and it extracts the text, chunks it at sentence boundaries, synthesizes each chunk, and merges the result into a single MP3 in your Downloads folder. ## Quick Start Use the google-tts skill to convert the attached report.pdf into an MP3 narration saved to my Downloads folder.

Frequently Asked Questions about google-tts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a PDF document to audio with Google Text-to-Speech?▼

Run the tts command with --file pointing to your PDF and --output for the destination MP3. The script extracts text with PyPDF2, cleans markdown artifacts, chunks it at sentence boundaries, and synthesizes each chunk through the Google Cloud TTS API.

How to generate a two-voice podcast from a document?▼

Extract the document text, write a JSON script with alternating host1 and host2 segments, then run the podcast command with --script and --output. Each speaker is synthesized with a different voice and all segments are concatenated with ffmpeg.

What voices does Google Cloud Text-to-Speech support?▼

The API offers Neural2, WaveNet, Studio, and Standard voices across 40+ languages. Use the voices command with --language and --type filters to list options, such as en-US-Neural2-D for a male English voice.

Why does text-to-speech conversion fail on long documents?▼

The Google TTS API limits requests to 5000 bytes, so long documents are split into chunks that must be merged with ffmpeg. If ffmpeg is not installed, multi-chunk conversion fails; install it via brew or apt.

Can I use Google TTS without an API key?▼

No, a Google Cloud API key is mandatory. Set it via the GOOGLE_TTS_API_KEY environment variable or a config.json file, and enable the Cloud Text-to-Speech API in the Google Cloud console first.