Error class for non-2xx TTS upstream responses, used in TTS adapters.
// Source: https://github.com/moeru-ai/airi | License: MIT | Copyright 2024-PRESENT Neko Ayaka
// Provided via justclaw.it.com; keep this notice with the code.
import type { Buffer } from 'node:buffer'
import type { Voice } from 'unspeech'
/**
* Inbound TTS request shape passed to every adapter.
*
* Adapters translate this provider-neutral payload into the
* provider's native protocol body (Azure SSML, DashScope JSON,
* Volcengine JSON, etc.).
*/
export interface TtsInput {
/** Caller-supplied speech text (raw text or SSML when {@link extraOptions} signals so). */
text: string
/** Provider voice id (e.g. `en-US-AvaMultilingualNeural`, `longxiaochun`, `BV001_streaming`). */
voice?: string
/**
* Speech rate multiplier. `1.0` = native rate, `1.2` = 20% faster, `0.8` = 20%
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key