import { z } from 'zod'; import { type TranscribeSegment } from './transcription.js'; export declare const neuralInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"base64">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"filePath">; value: z.ZodString; }, z.core.$strip>], "type">; export declare const bciTranscribeParamsSchema: z.ZodObject<{ modelId: z.ZodString; metadata: z.ZodOptional; neuralData: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"base64">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"filePath">; value: z.ZodString; }, z.core.$strip>], "type">; }, z.core.$strip>; export declare const bciTranscribeClientParamsSchema: z.ZodObject<{ modelId: z.ZodString; metadata: z.ZodOptional; neuralData: z.ZodUnion>]>; }, z.core.$strip>; export declare const bciTranscribeRequestSchema: z.ZodObject<{ modelId: z.ZodString; metadata: z.ZodOptional; neuralData: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"base64">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"filePath">; value: z.ZodString; }, z.core.$strip>], "type">; type: z.ZodLiteral<"bciTranscribe">; requestId: z.ZodOptional; }, z.core.$strip>; /** * A streamed BCI segment. Only the sliding-window stream produces * `windowStartTimestep`, so it is not on the shared segment shape. */ export declare const bciStreamSegmentSchema: z.ZodObject<{ text: z.ZodString; startMs: z.ZodNumber; endMs: z.ZodNumber; append: z.ZodBoolean; id: z.ZodNumber; speakerId: z.ZodOptional; speaker: z.ZodOptional; speakerSegments: z.ZodOptional>>; isEndOfTurn: z.ZodOptional; startsWord: z.ZodOptional; windowStartTimestep: z.ZodOptional; }, z.core.$strip>; export declare const bciTranscribeResponseSchema: z.ZodObject<{ text: z.ZodOptional; done: z.ZodOptional; stats: z.ZodOptional; realTimeFactor: z.ZodOptional; tokensPerSecond: z.ZodOptional; totalTokens: z.ZodOptional; totalSegments: z.ZodOptional; whisperEncodeTime: z.ZodOptional; whisperDecodeTime: z.ZodOptional; encoderTime: z.ZodOptional; decoderTime: z.ZodOptional; melSpecTime: z.ZodOptional; backendDevice: z.ZodOptional; backendId: z.ZodOptional; gpuUnsupported: z.ZodOptional; gpuMemTotalMb: z.ZodOptional; gpuMemFreeMb: z.ZodOptional; totalTime: z.ZodOptional; totalWallMs: z.ZodOptional; totalSamples: z.ZodOptional; processCalls: z.ZodOptional; whisperSampleMs: z.ZodOptional; whisperBatchdMs: z.ZodOptional; whisperPromptMs: z.ZodOptional; totalTranscriptions: z.ZodOptional; modelLoadMs: z.ZodOptional; totalEncodedFrames: z.ZodOptional; encoderOnCoreml: z.ZodOptional; encoderUsedCoreml: z.ZodOptional; }, z.core.$strip>>; error: z.ZodOptional; segment: z.ZodOptional; speaker: z.ZodOptional; speakerSegments: z.ZodOptional>>; isEndOfTurn: z.ZodOptional; startsWord: z.ZodOptional; }, z.core.$strip>>; type: z.ZodLiteral<"bciTranscribe">; diagnostics: z.ZodOptional; graphicsApi: z.ZodOptional>; driver: z.ZodOptional; }, z.core.$strip>>; gpuId: z.ZodOptional; fallback: z.ZodOptional; requestedDevice: z.ZodOptional>; reason: z.ZodString; }, z.core.$strip>>; probe: z.ZodOptional; backend: z.ZodString; reason: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; /** * Per-call overrides for the BCI addon's sliding-window streaming * (`transcribeStream`). Each field maps 1:1 to the addon's `streamOpts`; * any field omitted falls back to the addon default. */ export declare const bciStreamOptsSchema: z.ZodObject<{ windowTimesteps: z.ZodOptional; hopTimesteps: z.ZodOptional; emit: z.ZodOptional>; }, z.core.$strip>; export declare const bciTranscribeStreamRequestSchema: z.ZodObject<{ modelId: z.ZodString; metadata: z.ZodOptional; type: z.ZodLiteral<"bciTranscribeStream">; streamOpts: z.ZodOptional; hopTimesteps: z.ZodOptional; emit: z.ZodOptional>; }, z.core.$strip>>; requestId: z.ZodOptional; }, z.core.$strip>; export declare const bciTranscribeStreamResponseSchema: z.ZodObject<{ text: z.ZodOptional; done: z.ZodOptional; stats: z.ZodOptional; realTimeFactor: z.ZodOptional; tokensPerSecond: z.ZodOptional; totalTokens: z.ZodOptional; totalSegments: z.ZodOptional; whisperEncodeTime: z.ZodOptional; whisperDecodeTime: z.ZodOptional; encoderTime: z.ZodOptional; decoderTime: z.ZodOptional; melSpecTime: z.ZodOptional; backendDevice: z.ZodOptional; backendId: z.ZodOptional; gpuUnsupported: z.ZodOptional; gpuMemTotalMb: z.ZodOptional; gpuMemFreeMb: z.ZodOptional; totalTime: z.ZodOptional; totalWallMs: z.ZodOptional; totalSamples: z.ZodOptional; processCalls: z.ZodOptional; whisperSampleMs: z.ZodOptional; whisperBatchdMs: z.ZodOptional; whisperPromptMs: z.ZodOptional; totalTranscriptions: z.ZodOptional; modelLoadMs: z.ZodOptional; totalEncodedFrames: z.ZodOptional; encoderOnCoreml: z.ZodOptional; encoderUsedCoreml: z.ZodOptional; }, z.core.$strip>>; error: z.ZodOptional; type: z.ZodLiteral<"bciTranscribeStream">; segment: z.ZodOptional; speaker: z.ZodOptional; speakerSegments: z.ZodOptional>>; isEndOfTurn: z.ZodOptional; startsWord: z.ZodOptional; windowStartTimestep: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; export type NeuralInput = z.infer; export type BciTranscribeParams = z.infer; export type BciTranscribeRequest = z.infer; export type BciTranscribeResponse = z.infer; export type BciTranscribeClientParamsParsed = z.output; export type BciStreamOpts = z.infer; export type BciTranscribeStreamRequest = z.infer; export type BciTranscribeStreamResponse = z.infer; export type BciStreamSegment = z.infer; /** Client parameters for `bciTranscribe()`. */ export interface BciTranscribeClientParams { /** Identifier returned by `loadModel()` for a loaded BCI model. */ modelId: string; /** * BCI neural input. A string is treated as a `.bin` file path; * a `Uint8Array` is treated as raw neural bytes and sent as base64 on the * wire. */ neuralData: string | Uint8Array; /** * When true, resolves to transcript segment metadata objects * (`{ text, startMs, endMs, append, id }`) instead of joined text. */ metadata?: boolean; } export type BciTranscribeStreamClientParams = { modelId: string; metadata?: boolean; windowTimesteps?: number; hopTimesteps?: number; emit?: 'delta' | 'full'; }; export interface BciTranscribeStreamSession { /** * Stable id for this in-flight BCI stream. Pass to `cancel({ requestId })` * to target this duplex session without cancelling other work on the model. */ requestId: string; write(neuralChunk: Uint8Array): void; end(): void; destroy(): void; [Symbol.asyncIterator](): AsyncIterator; } export interface BciTranscribeStreamMetadataSession { /** * Stable id for this in-flight BCI stream. Pass to `cancel({ requestId })` * to target this duplex session without cancelling other work on the model. */ requestId: string; write(neuralChunk: Uint8Array): void; end(): void; destroy(): void; [Symbol.asyncIterator](): AsyncIterator; }