Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:23:08 +08:00
commit 87cad5646f
11 changed files with 1043 additions and 0 deletions

39
commands/billing.md Normal file
View File

@@ -0,0 +1,39 @@
---
description: Query AWS billing for Polly usage costs
argument-hint:
---
Query AWS Cost Explorer for actual Amazon Polly usage costs with engine breakdown.
## Usage
```bash
aws-polly-tts-tool billing [OPTIONS]
```
## Options
- `--days INT` / `-d INT`: Number of days to query (default: 30)
- `--start-date TEXT`: Custom start date (YYYY-MM-DD)
- `--end-date TEXT`: Custom end date (YYYY-MM-DD)
- `--region TEXT` / `-r TEXT`: AWS region for Cost Explorer
- `-V/-VV/-VVV`: Verbosity (INFO/DEBUG/TRACE)
## Examples
```bash
# Last 30 days of Polly costs
aws-polly-tts-tool billing
# Last 7 days
aws-polly-tts-tool billing --days 7
# Custom date range
aws-polly-tts-tool billing --start-date 2025-01-01 --end-date 2025-01-31
```
## Output
Returns total cost and breakdown by engine (Standard, Neural, Generative, Long-form).
Requires IAM permission: `ce:GetCostAndUsage`

36
commands/completion.md Normal file
View File

@@ -0,0 +1,36 @@
---
description: Generate shell completion scripts
argument-hint: shell
---
Generate shell completion script for bash, zsh, or fish to enable tab completion.
## Usage
```bash
aws-polly-tts-tool completion [bash|zsh|fish]
```
## Arguments
- `SHELL`: Shell type (bash, zsh, or fish) - required
## Examples
```bash
# Generate bash completion
aws-polly-tts-tool completion bash
# Install for bash (add to ~/.bashrc)
eval "$(aws-polly-tts-tool completion bash)"
# Install for zsh (add to ~/.zshrc)
eval "$(aws-polly-tts-tool completion zsh)"
# Install for fish
aws-polly-tts-tool completion fish > ~/.config/fish/completions/aws-polly-tts-tool.fish
```
## Output
Returns shell-specific completion script. After installation, restart shell or source config file.

30
commands/info.md Normal file
View File

@@ -0,0 +1,30 @@
---
description: Display AWS credentials and tool config
argument-hint:
---
Display AWS Polly tool configuration, credentials status, and helpful command references.
## Usage
```bash
aws-polly-tts-tool info
```
## Examples
```bash
# Show configuration and verify credentials
aws-polly-tts-tool info
```
## Output
Returns:
- AWS credential status (Valid/Invalid)
- AWS Account ID, User ID, ARN
- Available engines (standard, neural, generative, long-form)
- Output formats (mp3, ogg_vorbis, pcm)
- Useful command examples
Use this to verify AWS authentication and discover tool capabilities.

29
commands/list-engines.md Normal file
View File

@@ -0,0 +1,29 @@
---
description: Display voice engines with pricing and features
argument-hint:
---
Display all available AWS Polly voice engines with technology, pricing, and use cases.
## Usage
```bash
aws-polly-tts-tool list-engines
```
## Examples
```bash
# Show all engines with details
aws-polly-tts-tool list-engines
```
## Output
Returns table with Engine, Technology, Price/1M chars, Char Limit, and Best For columns.
Includes:
- Standard ($4/1M) - Traditional TTS
- Neural ($16/1M) - Natural voices
- Generative ($30/1M) - Highest quality
- Long-form ($100/1M) - Audiobooks

43
commands/list-voices.md Normal file
View File

@@ -0,0 +1,43 @@
---
description: List available Polly voices with filters
argument-hint:
---
List all available AWS Polly voices with optional filtering by engine, language, and gender.
## Usage
```bash
aws-polly-tts-tool list-voices [OPTIONS]
```
## Options
- `--engine TEXT` / `-e TEXT`: Filter by engine (standard, neural, generative, long-form)
- `--language TEXT` / `-l TEXT`: Filter by language code (e.g., en-US, es-ES)
- `--gender TEXT` / `-g TEXT`: Filter by gender (Female, Male)
- `--region TEXT` / `-r TEXT`: AWS region override
- `-V/-VV/-VVV`: Verbosity (INFO/DEBUG/TRACE)
## Examples
```bash
# List all voices
aws-polly-tts-tool list-voices
# Filter by engine
aws-polly-tts-tool list-voices --engine neural
# Filter by language
aws-polly-tts-tool list-voices --language en-US
# Combine filters
aws-polly-tts-tool list-voices --engine neural --language en --gender Female
# Search with grep
aws-polly-tts-tool list-voices | grep British
```
## Output
Returns table with Voice, Gender, Language, Engines, Description.

31
commands/pricing.md Normal file
View File

@@ -0,0 +1,31 @@
---
description: Show Polly pricing and cost examples
argument-hint:
---
Display AWS Polly pricing information for all engines with cost examples.
## Usage
```bash
aws-polly-tts-tool pricing
```
## Examples
```bash
# Show pricing table
aws-polly-tts-tool pricing
```
## Output
Returns pricing table with:
- Engine name and cost per 1M characters
- Technology type (Concatenative/Neural/Generative)
- Quality level
- Character limit per request
- Concurrent request limits
- Free tier information
- Best use cases
- Cost examples (1,000 words, audiobooks)

48
commands/synthesize.md Normal file
View File

@@ -0,0 +1,48 @@
---
description: Convert text to speech using AWS Polly
argument-hint: text
---
Convert text to speech using Amazon Polly with support for multiple engines and voices.
## Usage
```bash
aws-polly-tts-tool synthesize "TEXT" [OPTIONS]
```
## Arguments
- `TEXT`: Text to synthesize (required, or use `--stdin`)
- `--stdin` / `-s`: Read text from stdin (for piping)
- `--voice TEXT`: Voice ID (default: Joanna)
- `--output PATH` / `-o PATH`: Save to file instead of playing
- `--format TEXT` / `-f TEXT`: Audio format (mp3, ogg_vorbis, pcm)
- `--engine TEXT` / `-e TEXT`: Engine (standard, neural, generative, long-form)
- `--ssml`: Treat input as SSML markup
- `--show-cost`: Display character count and cost estimate
- `--region TEXT` / `-r TEXT`: AWS region override
- `-V/-VV/-VVV`: Verbosity (INFO/DEBUG/TRACE)
## Examples
```bash
# Play with default voice (Joanna, neural)
aws-polly-tts-tool synthesize "Hello world"
# Use different voice and engine
aws-polly-tts-tool synthesize "Hello" --voice Matthew --engine generative
# Save to file
aws-polly-tts-tool synthesize "Hello world" --output speech.mp3
# Read from stdin
echo "Hello world" | aws-polly-tts-tool synthesize --stdin
# SSML with pause
aws-polly-tts-tool synthesize '<speak>Hello <break time="500ms"/> world</speak>' --ssml
```
## Output
Audio played through speakers or saved to file with character count.