> ## Documentation Index
> Fetch the complete documentation index at: https://daily-main.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Floe Text-to-Speech

> Text-to-speech service that routes OpenAI-compatible speech synthesis through Floe with per-call spend caps

export const CommunityMaintained = ({maintainer, maintainerUrl, repo}) => <Note>
    <strong>Community-maintained integration.</strong> This service is built and
    maintained by{" "}
    <a href={maintainerUrl} target="_blank" rel="noreferrer">
      {maintainer}
    </a>
    . Pipecat does not test or officially support it. Please report issues and
    request changes on the{" "}
    <a href={repo} target="_blank" rel="noreferrer">
      source repository
    </a>
    . Learn more about{" "}
    <a href="/api-reference/server/services/community-integrations">
      community integrations
    </a>
    .
  </Note>;

<CommunityMaintained maintainer="Floe Labs" maintainerUrl="https://github.com/Floe-Labs" repo="https://github.com/Floe-Labs/pipecat-floe" />

## Overview

`FloeTTSService` provides an OpenAI-compatible interface for text-to-speech
through [Floe](https://floelabs.xyz) — a unified billing ledger for voice AI
where one key powers the LLM, STT, and TTS legs of an agent, metered per call
and bounded by pre-call spend caps. It extends Pipecat's `OpenAITTSService`, so
streamed audio, metrics, and tracing work unchanged.

<CardGroup cols={2}>
  <Card title="Source Repository" icon="github" href="https://github.com/Floe-Labs/pipecat-floe">
    Source code, examples, and issues for the Floe integration
  </Card>

  <Card title="PyPI Package" icon="cube" href="https://pypi.org/project/pipecat-floe/">
    The `pipecat-floe` package on PyPI
  </Card>

  <Card title="Floe" icon="book" href="https://floe-labs.gitbook.io/docs">
    Documentation and supported models for Floe
  </Card>

  <Card title="API Keys" icon="key" href="https://dev-dashboard.floelabs.xyz">
    Create and manage your Floe agent keys
  </Card>
</CardGroup>

## Installation

This is a community-maintained package distributed separately from `pipecat-ai`:

```bash theme={null}
uv add pipecat-floe
```

## Prerequisites

### Floe Account Setup

Before using the Floe TTS service, you need:

1. **Floe Account**: Sign up at the [Floe dashboard](https://dev-dashboard.floelabs.xyz)
2. **API Key**: Create an agent key from your dashboard. New keys come with
   welcome credit that covers the first calls.

### Required Environment Variables

* `FLOE_API_KEY`: Your Floe agent key for authentication

## Configuration

<ParamField path="api_key" type="str" default="None">
  Floe agent key. Falls back to the `FLOE_API_KEY` environment variable if not
  provided. Raises `ValueError` if neither is set.
</ParamField>

<ParamField path="model" type="str" default="openai/tts-1">
  Fully qualified `provider/model` identifier (for example `"openai/tts-1"`). A
  bare model name is rejected by Floe.
</ParamField>

<ParamField path="voice" type="str" default="alloy">
  Voice identifier to synthesize with.
</ParamField>

<ParamField path="base_url" type="str" default="https://credit-api.floelabs.xyz/v1">
  Floe OpenAI-compatible base URL.
</ParamField>

<ParamField path="task_id" type="str" default="None">
  Optional Floe task ID sent as the `X-Floe-Task-Id` header, so a per-task
  budget can bound one conversation. Attached via a custom `httpx` client; if
  you pass your own `http_client`, add the header to it yourself.
</ParamField>

<ParamField path="kwargs">
  Additional keyword arguments passed through to the underlying
  `OpenAITTSService`.
</ParamField>

## Usage

```python theme={null}
from pipecat_floe import FloeLLMService, FloeSTTService, FloeTTSService
from pipecat.pipeline.pipeline import Pipeline

# One Floe key powers all three legs, on a single budget.
stt = FloeSTTService()
llm = FloeLLMService(model="openai/gpt-4o-mini")
tts = FloeTTSService(model="openai/tts-1", voice="alloy")

# Build pipeline
pipeline = Pipeline([stt, llm, tts])
```

See the [source repository](https://github.com/Floe-Labs/pipecat-floe) for a
complete runnable example wiring a WebSocket transport → STT → LLM → TTS.

## Compatibility

Built and verified against Pipecat v1.7.0+. Check the [source
repository](https://github.com/Floe-Labs/pipecat-floe) for the latest tested
version and changelog.
