hume

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2026 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package hume is a streaming text-to-speech service backed by Hume AI's Octave TTS. It uses the /stream/file endpoint with PCM output so raw audio streams straight downstream. Hume's PCM is fixed at 48 kHz; the output transport resamples to the pipeline rate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTTS

func NewTTS(cfg Config) *tts.Base

NewTTS builds a Hume TTS service.

Types

type Config

type Config struct {
	// APIKey is the Hume API key, sent as X-Hume-Api-Key. Required.
	APIKey string `validate:"required"`
	// BaseURL overrides the API base; empty uses the hosted API.
	BaseURL string
	// VoiceID selects a Hume voice by id. Setting a voice (id or name) is
	// recommended; with none, Hume invents a new voice each call.
	VoiceID string
	// VoiceName selects a Hume voice by name, when VoiceID is empty.
	VoiceName string
	// VoiceProvider is the voice's provider, "HUME_AI" (default) or
	// "CUSTOM_VOICE".
	VoiceProvider string
	// Description is an optional acting/voice prompt steering delivery.
	Description string
	// Version pins the Octave model version (e.g. "2"); empty leaves it unset.
	Version string
	// Speed scales the speaking rate; nil leaves it at the voice default.
	Speed *float64
}

Config configures the Hume TTS service.

func (Config) Validate

func (c Config) Validate() error

Validate reports whether the configuration is usable.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL