Skip to content

Commit 17c4ff7

Browse files
committed
Rename files to more descriptive names
1 parent 41eda70 commit 17c4ff7

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

clients/aws-sdk-polly/examples/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@ Each script is a self-contained [uv](https://docs.astral.sh/uv/getting-started/i
44

55
| Script | What it shows | Extra dependencies |
66
| --- | --- | --- |
7-
| [`simple_file.py`](simple_file.py) | Stream synthesized audio and save it to an MP3 file. | None |
8-
| [`simple_speaker.py`](simple_speaker.py) | Real-time MP3 playback through your speakers as audio arrives. The MP3 decoder handles buffering. | `miniaudio` |
7+
| [`stream_speech_to_file.py`](stream_speech_to_file.py) | Stream synthesized audio and save it to an MP3 file. | None |
8+
| [`stream_speech_to_speakers.py`](stream_speech_to_speakers.py) | Real-time MP3 playback through your speakers as audio arrives. The MP3 decoder handles buffering. | `miniaudio` |
99

1010
## Prerequisites
1111

1212
- AWS credentials available via environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, optionally `AWS_SESSION_TOKEN`).
1313
- Python 3.12+.
1414
- `uv` installed.
15-
- For `simple_speaker.py`: a working audio output device.
15+
- For `stream_speech_to_speakers.py`: a working audio output device.
1616

1717
## Running
1818

1919
All examples accept text as a positional argument, from stdin via `-`, or fall back to a built-in default:
2020

2121
```sh
2222
# Default text
23-
uv run simple_file.py
23+
uv run stream_speech_to_file.py
2424

2525
# Inline text
26-
uv run simple_file.py "Hello from Polly."
26+
uv run stream_speech_to_file.py "Hello from Polly."
2727

2828
# From stdin
29-
cat story.txt | uv run simple_file.py -
29+
cat story.txt | uv run stream_speech_to_file.py -
3030
```
3131

3232
Common flags:
3333

3434
- `--voice` — Polly voice ID (default `Matthew`)
3535
- `--region` — AWS region (default `us-east-1`)
36-
- `--output` (`simple_file.py` only) — MP3 output path
36+
- `--output` (`stream_speech_to_file.py` only) — MP3 output path
3737

3838
The bidi API only supports the `generative` engine, so engine selection is not exposed.

clients/aws-sdk-polly/examples/simple_file.py renamed to clients/aws-sdk-polly/examples/stream_speech_to_file.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
- [uv](https://docs.astral.sh/uv/getting-started/installation/) installed
2121
2222
Usage:
23-
- `uv run simple_file.py`
24-
- `uv run simple_file.py "Hello from Polly."`
25-
- `cat story.txt | uv run simple_file.py -`
26-
- `uv run simple_file.py --voice Ruth --output hello.mp3 "Hi."`
23+
- `uv run stream_speech_to_file.py`
24+
- `uv run stream_speech_to_file.py "Hello from Polly."`
25+
- `cat story.txt | uv run stream_speech_to_file.py -`
26+
- `uv run stream_speech_to_file.py --voice Ruth --output hello.mp3 "Hi."`
2727
"""
2828

2929
import argparse

clients/aws-sdk-polly/examples/simple_speaker.py renamed to clients/aws-sdk-polly/examples/stream_speech_to_speakers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
- [uv](https://docs.astral.sh/uv/getting-started/installation/) installed
2323
2424
Usage:
25-
- `uv run simple_speaker.py`
26-
- `uv run simple_speaker.py "Hello from Polly."`
27-
- `cat story.txt | uv run simple_speaker.py -`
28-
- `uv run simple_speaker.py --voice Ruth "Hi."`
25+
- `uv run stream_speech_to_speakers.py`
26+
- `uv run stream_speech_to_speakers.py "Hello from Polly."`
27+
- `cat story.txt | uv run stream_speech_to_speakers.py -`
28+
- `uv run stream_speech_to_speakers.py --voice Ruth "Hi."`
2929
"""
3030

3131
import argparse

0 commit comments

Comments
 (0)