Hume
Text-to-speech with HumeTTSService, Hume's Octave voices over HTTP streaming, with word timestamps.
Overview
Hume's Octave models give speech acting directions and expressive control. pipedog ports
Pipecat's HumeTTSService: it posts each request to Hume's tts/stream/json endpoint and
reads the newline-delimited JSON stream back, emitting 48 kHz PCM audio and word-level timestamps.
Upstream page
Pipecat's documentation for the same service.
Source
packages/hume/src/tts.ts.
Hume docs
The streaming endpoint, voices and Octave versions.
Installation
bun add @pipedog/humeimport { HumeTTSService } from "@pipedog/hume/tts";Prerequisites
- A Hume account and an API key from the Hume platform.
- A voice id, set as
voice. Voice names are not supported, and without a voice the service reports an error. - Pass the key as
apiKey, or set theHUME_API_KEYenvironment variable.
HumeTTSService
Configuration
Prop
Type
Settings
Runtime-updatable settings, passed as settings: new HumeTTSService.Settings({...}).
| Setting | Type | Default | Description |
|---|---|---|---|
voice | string | null | null | Hume voice id. Required to synthesize. |
description | string | null | null | Natural-language acting directions, up to 100 characters. Selects Octave version 1. |
speed | number | null | null | Speaking-rate multiplier, 0.5 to 2.0. |
trailingSilence | number | null | null | Seconds of silence to add at the end, 0 to 5. |
temperature | number | null | null | Sampling temperature. Hume's per-model default applies when unset. |
Usage
import { TTSUpdateSettingsFrame } from "@pipedog/core/frames/frames";
import { HumeTTSService } from "@pipedog/hume/tts";
const tts = new HumeTTSService({
// Defaults to the HUME_API_KEY environment variable.
apiKey: process.env.HUME_API_KEY,
settings: new HumeTTSService.Settings({
// A Hume voice id. Voice names are not supported.
voice: "your-voice-id",
speed: 1.1,
trailingSilence: 0.3,
}),
});Acting directions and temperature:
// Acting directions switch Hume to Octave version 1.
const acting = new HumeTTSService({
apiKey: process.env.HUME_API_KEY,
settings: new HumeTTSService.Settings({
voice: "your-voice-id",
description: "warm, unhurried",
temperature: 0.7,
}),
});Change settings mid-call with a TTSUpdateSettingsFrame:
// Queue it on the worker, or push it from a processor upstream of the service.
// It applies from the next request.
const update = new TTSUpdateSettingsFrame({
delta: new HumeTTSService.Settings({ voice: "another-voice-id", speed: 0.9 }),
});Event handlers
Inherited from TTSService:
| Event | Description |
|---|---|
on_tts_request | A text chunk is about to be sent for synthesis. |
Notes
- Hume streams at 48 kHz. Another
sampleRateis accepted with a warning, and the service labels the frames with it without resampling. - Audio is buffered until it reaches a full chunk, to avoid glitches.
- Instant mode is always on, and word timestamps are always requested. Octave version 2 is used,
or version 1 when a
descriptionis set. - Word timestamps keep a running offset across the utterances of a turn. It resets on an interruption and when the context ends.
Runtime notes
- The service calls Hume's HTTP endpoint with
fetch(the global one unless you passfetch) instead of Hume's SDK, so it runs on Bun, Node, Deno and Cloudflare Workers. The request and response formats follow thehumeTypeScript SDK and Hume's API reference. - Requests carry
X-Hume-Client-Name: pipedogand the pipedog version, where Pipecat sends its own name and version. - Not ported: the deprecated
InputParams,update_setting()and thevoiceIdandparamsconstructor options. Usesettings.
| Runtime | Works | What it needs |
|---|---|---|
| Bun | ✅ yes | Nothing. |
| Node.js | ✅ yes | Nothing. |
| Deno | ✅ yes | Nothing. |
| Cloudflare Workers | ✅ yes | Nothing. |
Generated from pipecat.runtimes and pipecat.compat in packages/hume/package.json: ✅ means the compat smoke test passes on that runtime.
pipedog is an unofficial community TypeScript port of Pipecat. It is not affiliated with or endorsed by Daily or the Pipecat project.
Portions adapted from the Pipecat documentation, Copyright (c) 2024–2025 Daily, BSD-2-Clause (see apps/docs/LICENSE-pipecat-docs).