/**
 * D-ID Avatar / Lip-sync Handler
 *
 * Async talking-head generation. Submits a /talks request with a source
 * image and either an audio URL or a text+voice script, polls the talk
 * status, and downloads the resulting MP4.
 *
 * @module avatar/providers/DIDAvatar
 * @see https://docs.d-id.com/reference/talks-overview
 */
import type { AvatarHandler, AvatarOptions, AvatarResult, AvatarVideoFormat } from "../../types/index.js";
/**
 * D-ID Avatar Handler.
 *
 * Auth: `Authorization: Basic ${DID_API_KEY}` (the API key is
 * already a base64-encoded `username:password` from the D-ID console).
 *
 * Env vars: `DID_API_KEY` (preferred) / `D_ID_API_KEY` (legacy alias).
 */
export declare class DIDAvatar implements AvatarHandler {
    readonly maxAudioDurationSeconds = 60;
    readonly supportedFormats: readonly AvatarVideoFormat[];
    private readonly apiKey;
    private readonly baseUrl;
    constructor(apiKey?: string);
    isConfigured(): boolean;
    generate(options: AvatarOptions): Promise<AvatarResult>;
    private uploadImage;
    private uploadAudio;
    private submitTalk;
    private pollUntilDone;
    private downloadResult;
    private resolveBuffer;
    private detectImageMime;
    /**
     * Detect the audio subtype from magic bytes.
     *
     * Recognised formats:
     * - WAV  : RIFF header (52 49 46 46)
     * - OGG  : OggS capture (4F 67 67 53)
     * - MP3  : ID3 tag (49 44 33) or MPEG sync word (FF Ex)
     * - M4A  : "ftyp" box at offset 4 (ISO base media / M4A)
     *
     * Falls back to "mp3" when detection is inconclusive.
     */
    private detectAudioType;
    private fetchWithTimeout;
    private assertOk;
}
