UNPKG

llm-hooks

Version:

A collection of useful React hooks for llm-related functionality

22 lines (21 loc) 562 B
import { KokoroTTS, TextSplitterStream } from 'kokoro-js-zh'; export declare const useTTS: ({ modelConfig }: { modelConfig: { modelName: string; dtype: "fp32" | "fp16"; device: "webgpu" | "wasm"; }; }) => { load: () => Promise<KokoroTTS>; stream: (onAudioChunk: (chunk: { audio: Float32Array; text?: string; }) => void) => { splitter: TextSplitterStream; ttsPromise: Promise<void>; }; isLoading: boolean; isReady: boolean; error: string | null; progress: number; };