interface ASRResponse { request_id: string; status: number; index: number; message: string; content?: Array<{ text: string; text_type?: 'final' | 'partial'; }>; } type OnRecognitionResult = (result: { text: string; textType: 'partial' | 'final'; isComplete: boolean; }) => void; interface StreamPackageParams { audioData: ArrayBuffer; requestId: string; sequenceId: number; isFirstPackage?: boolean; isLastPackage?: boolean; onResult?: OnRecognitionResult; } declare function generateUUID(): string; /** * Send a single streaming audio package to JD ASR. * Sequence-Id protocol: first=1, middle=N, last=-N. * Property header is included on first and last packages. */ declare function sendStreamPackage(params: StreamPackageParams): Promise; /** * Send WAV audio data to JD ASR API and return the recognized text. * Uses single-package upload (Sequence-Id: -1). */ declare function recognizeSpeech(audioData: ArrayBuffer): Promise; export { OnRecognitionResult, StreamPackageParams, generateUUID, recognizeSpeech, sendStreamPackage };