Skip to main content

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.

Hume TTS API Reference

Pipecat’s API methods for Hume TTS integration

Example Implementation

Complete example with word timestamps and interruption handling

Hume Documentation

Official Hume TTS API documentation and features

Voice Library

Browse and manage available voices

Installation

To use Hume services, install the required dependencies:

Prerequisites

Hume Account Setup

Before using Hume TTS services, you need:
  1. Hume Account: Sign up at 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

str
default:"None"
Hume API key. If omitted, reads the HUME_API_KEY environment variable. Raises ValueError when neither is set.
str
default:"None"
deprecated
Deprecated since 0.0.105, removed in 2.0.0. Use settings=HumeTTSService.Settings(...) instead.
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.
InputParams
default:"None"
deprecated
Deprecated since 0.0.105, removed in 2.0.0. Use settings=HumeTTSService.Settings(...) instead.
HumeTTSService.Settings
default:"None"
Runtime-configurable settings. See 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 for details.

Usage

Basic Setup

With Acting Directions

Updating Settings at Runtime

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

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.