You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clients/aws-sdk-polly/examples/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,35 +4,35 @@ Each script is a self-contained [uv](https://docs.astral.sh/uv/getting-started/i
4
4
5
5
| Script | What it shows | Extra dependencies |
6
6
| --- | --- | --- |
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`|
9
9
10
10
## Prerequisites
11
11
12
12
- AWS credentials available via environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, optionally `AWS_SESSION_TOKEN`).
13
13
- Python 3.12+.
14
14
-`uv` installed.
15
-
- For `simple_speaker.py`: a working audio output device.
15
+
- For `stream_speech_to_speakers.py`: a working audio output device.
16
16
17
17
## Running
18
18
19
19
All examples accept text as a positional argument, from stdin via `-`, or fall back to a built-in default:
20
20
21
21
```sh
22
22
# Default text
23
-
uv run simple_file.py
23
+
uv run stream_speech_to_file.py
24
24
25
25
# Inline text
26
-
uv run simple_file.py "Hello from Polly."
26
+
uv run stream_speech_to_file.py "Hello from Polly."
0 commit comments