# Pywayne Tts

> Text-to-speech conversion tool. Use when converting text to speech audio files (opus or mp3 format). Supports macOS native 'say' command and Google TTS (gTTS) service with ffmpeg audio conversion.

- **Type:** Skill
- **Install:** `agentstack add skill-wangyendt-wayne-skills-tts`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [wangyendt](https://agentstack.voostack.com/s/wangyendt)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [wangyendt](https://github.com/wangyendt)
- **Source:** https://github.com/wangyendt/wayne-skills/tree/main/pywayne/tts

## Install

```sh
agentstack add skill-wangyendt-wayne-skills-tts
```

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

## About

# Pywayne TTS

Text-to-speech (TTS) tool that converts text to audio files (opus or mp3 format).

## Functions

### text_to_speech_output_opus - Convert text to Opus format

```python
from pywayne.tts import text_to_speech_output_opus

# Output: test.opus
text_to_speech_output_opus("你好，世界", "test.opus")
```

**Parameters:**
- `text` - Text to convert
- `opus_filename` - Output .opus filename
- `use_say` - If True, use macOS 'say' command; otherwise use gTTS (default True)

**Behavior:**
- On macOS, prefers native 'say' command when `use_say=True`
- On other platforms, uses Google TTS (gTTS) service
- Uses ffmpeg to convert audio to opus format (16kHz, mono channel)
- Automatically cleans up temporary files

### text_to_speech_output_mp3 - Convert text to MP3 format

```python
from pywayne.tts import text_to_speech_output_mp3

# Output: test.mp3
text_to_speech_output_mp3("你好，世界", "test.mp3")
```

**Parameters:**
- `text` - Text to convert
- `mp3_filename` - Output .mp3 filename
- `use_say` - If True, use macOS 'say' command; otherwise use gTTS (default True)

**Behavior:**
- On macOS, prefers native 'say' command when `use_say=True`
- On other platforms, uses Google TTS (gTTS) service
- Uses ffmpeg to convert audio to mp3 format
- Automatically cleans up temporary files

## Quick Start

```bash
# Convert text to Opus format (default: macOS uses 'say')
text_to_speech_output_opus "你好，世界" "test.opus"

# Convert text to MP3 format
text_to_speech_output_mp3 "你好，世界" "test.mp3"

# Force use gTTS instead of macOS 'say'
text_to_speech_output_mp3 "你好，世界" "test.mp3" use_say=False
```

## Requirements

- **ffmpeg**: Required for audio conversion
  - macOS: `brew install ffmpeg`
  - Windows: Download from https://ffmpeg.org and add to PATH
  - Linux: `sudo apt install ffmpeg` or package manager
- **gtts**: Python library for Google TTS service

## Platform Detection

Module automatically detects platform and prompts for ffmpeg installation if missing.

## Audio Formats

- **Opus**: Better quality, smaller file size, suitable for voice calls
- **MP3**: Better compatibility, suitable for multimedia playback

## Notes

- Requires network connection for gTTS service
- Temporary files are automatically cleaned up
- Ensure output directory has write permissions

## Source & license

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

- **Author:** [wangyendt](https://github.com/wangyendt)
- **Source:** [wangyendt/wayne-skills](https://github.com/wangyendt/wayne-skills)
- **License:** MIT

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-wangyendt-wayne-skills-tts
- Seller: https://agentstack.voostack.com/s/wangyendt
- 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%.
