---
name: telnyx-tts-1fddd158ef0c
description: Generate speech audio from text using Telnyx Text-to-Speech API. Use when you need to convert text to spoken audio, create voice messages, or generate audio content.
metadata: {"openclaw":{"emoji":"🔊","requires":{"bins":["python3"],"env":["TELNYX_API_KEY"]},"primaryEnv":"TELNYX_API_KEY"}}
---

# Telnyx Text-to-Speech

Generate high-quality speech audio from text using the Telnyx TTS API.

## Usage

To convert text to speech, run the script:

```bash
{baseDir}/scripts/telnyx-tts.py "Your text here" -o /tmp/output.mp3
```

The script outputs the path to the generated audio file on success.

## Options

- `-o, --output PATH`: Output file path (default: output.mp3)
- `--voice VOICE`: Voice ID (default: Telnyx.NaturalHD.astra)

## Available Voices

Telnyx provides multiple voice options:

- **Telnyx NaturalHD**: Premium voices with refined prosody
  - `Telnyx.NaturalHD.astra` (default)
  - `Telnyx.NaturalHD.luna`
  - `Telnyx.NaturalHD.andersen_johan`
- **Telnyx KokoroTTS**: Budget-friendly for high-volume
  - `Telnyx.KokoroTTS.af`
  - `Telnyx.KokoroTTS.am`

## Example

Generate speech and return as media:

```bash
{baseDir}/scripts/telnyx-tts.py "Hello! This is a test of Telnyx text to speech." -o /tmp/tts-output.mp3
```

Then return the audio file:
```
MEDIA: /tmp/tts-output.mp3
```

For Telegram voice notes, the audio will be sent as a voice message.

## Environment

Requires `TELNYX_API_KEY` environment variable to be set.


---
Source attribution: team-telnyx
Original project: https://github.com/team-telnyx/telnyx-toolkit/blob/0c752ffbcc141c0311175c79c169b9e31a19d4db/tools/tts/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Telnyx

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: team-telnyx
Original project: https://github.com/team-telnyx/telnyx-toolkit/blob/0c752ffbcc141c0311175c79c169b9e31a19d4db/tools/tts/SKILL.md
Attribution basis: Source repository record

Fields of work: Marketing, Customer Support
Roles: Content Marketer, Customer Experience, Influencer Marketer, Marketing Analyst, Social Media Manager
Specialties: Specialty not specified
Tools: Telnyx
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 2e74d5b473ab30550d61148592004f7369d645c9ee0afca8867ea335381d4f41
