Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@
"title": "Credit",
"type": "string"
},
"cumulative_top_up": {
"title": "Cumulative Top Up",
"type": "string"
},
"created_at": {
"format": "date-time",
"title": "Created At",
Expand Down Expand Up @@ -400,6 +404,7 @@
"_id",
"user_id",
"credit",
"cumulative_top_up",
"created_at",
"updated_at",
"has_phone_sha256"
Expand Down
2 changes: 1 addition & 1 deletion developer-guide/integrations/pipecat.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Pipecat"
description: "Build voice AI agents with Fish Audio and Pipecat"

Check warning on line 3 in developer-guide/integrations/pipecat.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

developer-guide/integrations/pipecat.mdx#L3

Did you really mean 'Pipecat'?
icon: "/images/pipecat-logo.png"
icon: "/images/pipecat-logo.svg"
---
import { AudioTranscript } from '/snippets/audio-transcript.jsx';

Expand All @@ -11,9 +11,9 @@
</Visibility>


[Pipecat](https://github.com/pipecat-ai/pipecat) is an open source framework for building voice and multimodal conversational AI. It handles the orchestration of audio, AI services, and conversation pipelines so you can focus on what makes your agent unique.

Check warning on line 14 in developer-guide/integrations/pipecat.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

developer-guide/integrations/pipecat.mdx#L14

Did you really mean 'multimodal'?

Fish Audio integrates with Pipecat through `FishAudioTTSService`, which provides real-time text-to-speech synthesis using WebSocket streaming for low-latency conversational applications.

Check warning on line 16 in developer-guide/integrations/pipecat.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

developer-guide/integrations/pipecat.mdx#L16

Did you really mean 'Pipecat'?

## Prerequisites

Expand All @@ -22,7 +22,7 @@

## Installation

Install Pipecat with Fish Audio support:

Check warning on line 25 in developer-guide/integrations/pipecat.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

developer-guide/integrations/pipecat.mdx#L25

Did you really mean 'Pipecat'?

```bash
pip install "pipecat-ai[fish]"
Expand All @@ -38,7 +38,7 @@

## Basic usage

Add `FishAudioTTSService` to your Pipecat pipeline:

Check warning on line 41 in developer-guide/integrations/pipecat.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

developer-guide/integrations/pipecat.mdx#L41

Did you really mean 'Pipecat'?

```python
from pipecat.services.fish import FishAudioTTSService
Expand Down
101 changes: 101 additions & 0 deletions developer-guide/integrations/telnyx.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
title: "Telnyx"
description: "Use Fish Audio voices for real-time and in-call text-to-speech with Telnyx"

Check warning on line 3 in developer-guide/integrations/telnyx.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

developer-guide/integrations/telnyx.mdx#L3

Did you really mean 'Telnyx'?
icon: "/images/telnyx-logo.svg"
---

[Telnyx](https://telnyx.com) is a carrier-owned global communications platform providing infrastructure for real-time agents — voice AI, SIP trunking, programmable voice, and messaging. Fish Audio is available on Telnyx as a hosted text-to-speech provider: you synthesize Fish Audio voices directly through the Telnyx API and play them in live phone calls via Call Control and TeXML, with no Fish Audio API key required.

Check warning on line 7 in developer-guide/integrations/telnyx.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

developer-guide/integrations/telnyx.mdx#L7

Did you really mean 'Telnyx'?

Check warning on line 7 in developer-guide/integrations/telnyx.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

developer-guide/integrations/telnyx.mdx#L7

Did you really mean 'Telnyx'?

## Prerequisites

- A [Telnyx account](https://telnyx.com/sign-up) with an API key
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- Python 3.9 or higher with `websockets` 14+ (`pip install websockets`) for the streaming example

## Voices

Telnyx exposes a curated shortlist of voices from the [Fish Audio Voice Library](https://fish.audio/discovery) rather than accepting arbitrary voice IDs. Voices use the format `FishAudio.<Model>.<VoiceId>`, where the model is `s2.1-pro` (latest, default), `s2-pro`, or `s1`:

Check warning on line 16 in developer-guide/integrations/telnyx.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

developer-guide/integrations/telnyx.mdx#L16

Did you really mean 'Telnyx'?

```text
FishAudio.s2.1-pro.933563129e564b19a115bedd57b7406a
```

All curated voices are cross-lingual — any voice can speak any language present in the input text. On S2 models, you can also control delivery with inline emotion tags like `[happy]` or `[whispering]` — see [emotion control](/developer-guide/best-practices/emotion-control) for the full syntax.
Comment thread
cshape marked this conversation as resolved.

See the [Telnyx Fish Audio provider page](https://developers.telnyx.com/docs/voice/tts/providers/fishaudio) for the current voice roster, supported audio formats, and sample rates.

## WebSocket streaming

Stream text in and receive base64-encoded audio chunks in real time:

```python
import asyncio
import json
import base64
import websockets

async def tts_stream():
url = "wss://api.telnyx.com/v2/text-to-speech/speech?voice=FishAudio.s2.1-pro.933563129e564b19a115bedd57b7406a"
headers = {"Authorization": "Bearer YOUR_TELNYX_API_KEY"}

async with websockets.connect(url, additional_headers=headers) as ws:
# 1. Handshake
await ws.send(json.dumps({
"text": " ",
"voice_settings": {"format": "mp3", "sample_rate": 44100}
}))

# 2. Send text
await ws.send(json.dumps({"text": "Hello from Fish Audio on Telnyx."}))

# 3. Signal end of input
await ws.send(json.dumps({"text": ""}))

# 4. Collect audio
audio_chunks = []
async for message in ws:
data = json.loads(message)

if data.get("error"):
print(f"Error: {data['error']}")
break

if data.get("audio"):
audio_chunks.append(base64.b64decode(data["audio"]))

if data.get("isFinal"):
break

with open("output.mp3", "wb") as f:
for chunk in audio_chunks:
f.write(chunk)

asyncio.run(tts_stream())
```

The handshake requests MP3 output via `voice_settings`; without it, audio is delivered as raw PCM at 24 kHz.

## REST API

Synthesize a complete utterance with a single HTTP request:

```bash
curl --request POST \
--url https://api.telnyx.com/v2/text-to-speech/speech \
--header 'Authorization: Bearer YOUR_TELNYX_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"text": "Hello from Fish Audio on Telnyx.",
"voice": "FishAudio.s2.1-pro.933563129e564b19a115bedd57b7406a",
"voice_settings": {"format": "mp3", "sample_rate": 44100}
}' \
--output output.mp3
```

The response streams back audio bytes. Set `output_type` to `base64_output` or `audio_id` for JSON responses instead.
Comment thread
coderabbitai[bot] marked this conversation as resolved.

## Resources

- [Telnyx Fish Audio provider reference](https://developers.telnyx.com/docs/voice/tts/providers/fishaudio)
- [Telnyx WebSocket streaming examples](https://developers.telnyx.com/docs/voice/tts/websocket-streaming/examples)
- [Telnyx REST API examples](https://developers.telnyx.com/docs/voice/tts/rest-api/examples)
- [Fish Audio Voice Library](https://fish.audio/discovery)
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@
"pages": [
"developer-guide/integrations/pipecat",
"developer-guide/integrations/livekit",
"developer-guide/integrations/n8n"
"developer-guide/integrations/n8n",
"developer-guide/integrations/telnyx"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions images/pipecat-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/telnyx-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading