> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipecat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Hume Text-to-Speech

> HumeTTSService generates expressive TTS with Hume AI's Octave models: context-aware pitch, speed, emotion, and word timestamps.

## Overview

Hume provides expressive text-to-speech synthesis using their Octave models, which adapt pronunciation, pitch, speed, and emotional style based on context. `HumeTTSService` offers real-time streaming with word-level timestamps, custom voice support, and advanced synthesis controls including acting instructions, speed adjustment, and trailing silence configuration.

> [card] [Hume TTS API Reference](https://reference-server.pipecat.ai/en/latest/api/pipecat.services.hume.tts.html)
>
> Pipecat's API methods for Hume TTS integration

> [card] [Example Implementation](https://github.com/pipecat-ai/pipecat/blob/main/examples/voice/voice-hume.py)
>
> Complete example with word timestamps and interruption handling

> [card] [Hume Documentation](https://dev.hume.ai/docs/text-to-speech-tts/overview)
>
> Official Hume TTS API documentation and features

> [card] [Voice Library](https://dev.hume.ai/docs/text-to-speech-tts/voices)
>
> Browse and manage available voices

## Installation

To use Hume services, install the required dependencies:

```bash theme={null}
uv add "pipecat-ai[hume]"
```

## Prerequisites

### Hume Account Setup

Before using Hume TTS services, you need:

1. **Hume Account**: Sign up at [Hume AI](https://www.hume.ai/)
2. **API Key**: Generate an API key from your account dashboard
3. **Voice Selection**: Choose voice IDs from the voice library or create custom voices

### Required Environment Variables

* `HUME_API_KEY`: Your Hume API key for authentication

## Configuration

### HumeTTSService

**api\_key** `str` (default: None)

Hume API key. If omitted, reads the `HUME_API_KEY` environment variable.
Raises `ValueError` when neither is set.

**voice\_id** `str` *deprecated* (default: None)

*Deprecated since 0.0.105, removed in 2.0.0.* Use
`settings=HumeTTSService.Settings(...)` instead.

**sample\_rate** `int | None` (default: 48000)

Sample rate the output frames are labeled with. Hume always streams 48 kHz
audio and the service doesn't resample it, so any other value logs a warning
and the audio plays at the wrong speed.

**params** `InputParams` *deprecated* (default: None)

*Deprecated since 0.0.105, removed in 2.0.0.* Use
`settings=HumeTTSService.Settings(...)` instead.

**settings** `HumeTTSService.Settings` (default: None)

Runtime-configurable settings. See [Settings](#settings) below.

### Settings

Runtime-configurable settings passed via the `settings` constructor argument using `HumeTTSService.Settings(...)`. These can be updated mid-conversation with `TTSUpdateSettingsFrame`. See [Service Settings](https://docs.pipecat.ai/pipecat/fundamentals/service-settings.md) for details.

| Parameter | Type | Default | Description |
| - | - | - | - |
| `model` | `str` | `None` | Not sent by this service; reported only as the model name in metrics and traces. *(Inherited.)* |
| `voice` | `str` | `None` | Hume voice ID; voice names aren't supported. Required: while it's `None`, each request pushes an `ErrorFrame`. *(Inherited.)* |
| `language` | `Language \| str` | `None` | Language used to split text into sentences; not sent to Hume. *(Inherited.)* |
| `description` | `str` | `None` | Description to guide voice synthesis. |
| `speed` | `float` | `None` | Speech rate control. |
| `trailing_silence` | `float` | `None` | Trailing silence duration in seconds. |
| `temperature` | `float` | `None` | Sampling temperature for speech generation. Higher values increase variation, lower values increase consistency. |

## Usage

### Basic Setup

```python theme={null}
import os

from pipecat.services.hume.tts import HumeTTSService

tts = HumeTTSService(
    api_key=os.getenv("HUME_API_KEY"),
    settings=HumeTTSService.Settings(
        voice="your-voice-id",
    ),
)
```

### With Acting Directions

```python theme={null}
tts = HumeTTSService(
    api_key=os.getenv("HUME_API_KEY"),
    settings=HumeTTSService.Settings(
        voice="your-voice-id",
        description="Speak warmly and reassuringly",
        speed=1.1,
        trailing_silence=0.5,
    ),
)
```

### Updating Settings at Runtime

Voice and synthesis parameters can be changed mid-conversation using `TTSUpdateSettingsFrame`:

```python theme={null}
from pipecat.frames.frames import TTSUpdateSettingsFrame
from pipecat.services.hume.tts import HumeTTSSettings

await worker.queue_frame(
    TTSUpdateSettingsFrame(
        delta=HumeTTSSettings(
            speed=1.3,
            description="Speak with excitement",
        )
    )
)
```

## Notes

* **Word timestamps**: The service provides word-level timestamps for synchronized text display. Timestamps are tracked cumulatively across utterances within a turn.
* **Description versions**: When `description` is provided, the service uses Hume API version `"1"`. Without a description, it uses the newer version `"2"`.
* **Audio buffering**: Audio is buffered internally until a minimum chunk size is reached before being pushed as frames, reducing audio glitches.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.