# Google Tts

> |

- **Type:** Skill
- **Install:** `agentstack add skill-sanjay3290-ai-skills-google-tts`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [sanjay3290](https://agentstack.voostack.com/s/sanjay3290)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [sanjay3290](https://github.com/sanjay3290)
- **Source:** https://github.com/sanjay3290/ai-skills/tree/main/skills/google-tts

## Install

```sh
agentstack add skill-sanjay3290-ai-skills-google-tts
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Google Cloud Text-to-Speech

Converts text and documents into audio using Google Cloud TTS API. Supports Neural2, WaveNet, Studio, and Standard voices across 40+ languages.

## Setup

API key via `GOOGLE_TTS_API_KEY` env var or `skills/google-tts/config.json` with `{"api_key": "..."}`.
Requires `ffmpeg` for multi-chunk documents. Optional: `pip install PyPDF2 python-docx` for PDF/DOCX.

## Commands

### List Voices

```bash
python skills/google-tts/scripts/google_tts.py voices --language en-US --type Neural2
python skills/google-tts/scripts/google_tts.py voices --json
```

### Text-to-Speech

```bash
# From text or document (PDF, DOCX, MD, TXT)
python skills/google-tts/scripts/google_tts.py tts --text "Hello world" --output ~/Downloads/hello.mp3
python skills/google-tts/scripts/google_tts.py tts --file /path/to/doc.pdf --output ~/Downloads/narration.mp3

# With voice, rate, pitch, encoding options
python skills/google-tts/scripts/google_tts.py tts --file doc.md --voice en-US-Neural2-F --rate 0.9 --encoding MP3 --output ~/Downloads/out.mp3
```

### Podcast Generation

Takes a JSON script with alternating speakers, synthesizes each with a different voice.

```json
[
  {"speaker": "host1", "text": "Welcome to our podcast!"},
  {"speaker": "host2", "text": "Thanks for having me..."}
]
```

```bash
python skills/google-tts/scripts/google_tts.py podcast --script /tmp/script.json --output ~/Downloads/podcast.mp3
python skills/google-tts/scripts/google_tts.py podcast --script /tmp/script.json --voice1 en-US-Neural2-J --voice2 en-US-Neural2-H --rate 0.9 --output ~/Downloads/podcast.mp3
```

## Workflow

### Single-Voice Narration

1. If user provides a file path, use `--file`. For generated content, write clean prose to `/tmp/tts_input.md` first.
2. Default voice: `en-US-Neural2-D` (male) or `en-US-Neural2-F` (female). Use Neural2 for best quality/cost balance.
3. Generate: `python skills/google-tts/scripts/google_tts.py tts --file /tmp/tts_input.md --output ~/Downloads/recording.mp3`
4. Report file location and size. Default output to `~/Downloads/`.

### Podcast from Document

1. Extract text: `python skills/google-tts/scripts/extract.py /path/to/document.pdf`
2. Generate a two-host conversation script as JSON:
   - Natural discussion, not verbatim reading. Host 1 leads, Host 2 reacts/analyzes.
   - Include intro and outro. Vary turn lengths. Keep turns under 4000 chars.
3. Write script to `/tmp/podcast_script.json`
4. Generate: `python skills/google-tts/scripts/google_tts.py podcast --script /tmp/podcast_script.json --output ~/Downloads/podcast.mp3`
5. Clean up temp files.

## Reference

- **Recommended voice type**: Neural2 (~$4/1M chars, high quality)
- **Speaking rate**: 0.25-4.0 (0.85-0.95 good for technical content)
- **Pitch**: -20.0 to 20.0 semitones
- **Encodings**: MP3 (default), LINEAR16 (.wav), OGG_OPUS (.ogg)
- API limit: 5000 bytes/request. Script auto-chunks at sentence boundaries.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [sanjay3290](https://github.com/sanjay3290)
- **Source:** [sanjay3290/ai-skills](https://github.com/sanjay3290/ai-skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-sanjay3290-ai-skills-google-tts
- Seller: https://agentstack.voostack.com/s/sanjay3290
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
