pipedog is an unofficial community port of Pipecat, not affiliated with Daily.
pipedog
Text-to-speech

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.

Installation

bun add @pipedog/hume
import { 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 the HUME_API_KEY environment variable.

HumeTTSService

Configuration

Prop

Type

Settings

Runtime-updatable settings, passed as settings: new HumeTTSService.Settings({...}).

SettingTypeDefaultDescription
voicestring | nullnullHume voice id. Required to synthesize.
descriptionstring | nullnullNatural-language acting directions, up to 100 characters. Selects Octave version 1.
speednumber | nullnullSpeaking-rate multiplier, 0.5 to 2.0.
trailingSilencenumber | nullnullSeconds of silence to add at the end, 0 to 5.
temperaturenumber | nullnullSampling temperature. Hume's per-model default applies when unset.

Usage

tts.ts
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:

EventDescription
on_tts_requestA text chunk is about to be sent for synthesis.

Notes

  • Hume streams at 48 kHz. Another sampleRate is 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 description is 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 pass fetch) instead of Hume's SDK, so it runs on Bun, Node, Deno and Cloudflare Workers. The request and response formats follow the hume TypeScript SDK and Hume's API reference.
  • Requests carry X-Hume-Client-Name: pipedog and the pipedog version, where Pipecat sends its own name and version.
  • Not ported: the deprecated InputParams, update_setting() and the voiceId and params constructor options. Use settings.
RuntimeWorksWhat it needs
Bun✅ yesNothing.
Node.js✅ yesNothing.
Deno✅ yesNothing.
Cloudflare Workers✅ yesNothing.

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).

On this page