import type { SynthesisEngine } from "../engine/types.js"; import type { RpcEndpoint } from "./protocol.js"; /** * Serve `engine` over a message port, so inference runs off the UI thread. * * Typical worker entry point: * * ```ts * // tts.worker.ts * import { ChatterboxEngine, exposeEngine } from "voxshot"; * * const engine = new ChatterboxEngine({ * onProgress: (progress) => emitProgress(progress), * }); * const { emitProgress } = exposeEngine(engine, self as unknown as RpcEndpoint); * ``` * * @returns a function that stops serving; it also carries `emitProgress` for * pushing model download progress to the main thread. */ export declare function exposeEngine(engine: SynthesisEngine, endpoint: RpcEndpoint): (() => void) & { emitProgress: (progress: Record) => void; }; //# sourceMappingURL=expose.d.ts.map