import type { Speech } from "./types.js"; export interface SpeechConfig { /** Where `/v1/audio/*` lives. Defaults to the Hanzo gateway. */ baseUrl?: string; /** * A bearer for the platform. Omit on a same-origin proxy that carries the * session cookie — this package never invents a credential. */ token?: string | (() => string | null | Promise); /** Transcription model, for the per-utterance ear and the growing transcript. * Defaults to Hanzo's own, `zen-scribe`. */ ear?: string; /** The organization to bill, when the bearer belongs to several. */ org?: string; /** * The visitor's lane: transcription for a page with nobody signed in, on * Hanzo's own transcriber, a minute at a time within a day per visitor. No * credential is sent and no speech or live transcript is offered; past the day * the platform refuses and the browser's recogniser stands in. */ public?: boolean; /** * Speech model, the voice it reads in, and the container it answers with. * Defaults to `zen-voice-mini` reading in `af_heart` as mp3. `name` is the * speech service's own voice id; a call to `speak` may name another. */ voice?: { model?: string; name?: string; format?: string; }; fetch?: typeof fetch; } /** The platform said no: the status, the code its error envelope named, and how * long it asked to be left alone (`Retry-After`, in ms) when it said. */ export declare class SpeechError extends Error { readonly status: number; readonly code?: string; readonly retry?: number; /** When the platform answered, in ms since the epoch: `retry` counts from here. */ readonly at: number; constructor(message: string, status: number, code?: string, retry?: number); } /** * The platform's speech services: `POST /v1/audio/transcriptions` and * `POST /v1/audio/speech`, both OpenAI-compatible, both metered. * * The same two paths serve every Hanzo surface, so a surface that fronts them * with its own proxy only has to change `baseUrl` — never the shape. */ export declare function speech(config?: SpeechConfig): Speech; //# sourceMappingURL=transport.d.ts.map