import { z } from 'zod';
import { ReadableStream } from 'node:stream/web';
import type { ServiceContext, EventStream, Expand } from '../types';
export declare const schemas: {
    initContext: z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>], null>;
    transcribe: z.ZodTuple<[z.ZodString, z.ZodObject<{
        audio: z.ZodString;
        options: z.ZodOptional<z.ZodObject<{
            language: z.ZodOptional<z.ZodString>;
            task: z.ZodOptional<z.ZodString>;
            return_timestamps: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"word">]>>;
            chunk_length_s: z.ZodOptional<z.ZodNumber>;
        }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
            language: z.ZodOptional<z.ZodString>;
            task: z.ZodOptional<z.ZodString>;
            return_timestamps: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"word">]>>;
            chunk_length_s: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
            language: z.ZodOptional<z.ZodString>;
            task: z.ZodOptional<z.ZodString>;
            return_timestamps: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"word">]>>;
            chunk_length_s: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough">>>;
    }, "strip", z.ZodTypeAny, {
        audio: string;
        options?: z.objectOutputType<{
            language: z.ZodOptional<z.ZodString>;
            task: z.ZodOptional<z.ZodString>;
            return_timestamps: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"word">]>>;
            chunk_length_s: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
    }, {
        audio: string;
        options?: z.objectInputType<{
            language: z.ZodOptional<z.ZodString>;
            task: z.ZodOptional<z.ZodString>;
            return_timestamps: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"word">]>>;
            chunk_length_s: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
    }>], null>;
    transcribeData: z.ZodTuple<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>, z.ZodOptional<z.ZodObject<{
        language: z.ZodOptional<z.ZodString>;
        task: z.ZodOptional<z.ZodString>;
        return_timestamps: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"word">]>>;
        chunk_length_s: z.ZodOptional<z.ZodNumber>;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        language: z.ZodOptional<z.ZodString>;
        task: z.ZodOptional<z.ZodString>;
        return_timestamps: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"word">]>>;
        chunk_length_s: z.ZodOptional<z.ZodNumber>;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        language: z.ZodOptional<z.ZodString>;
        task: z.ZodOptional<z.ZodString>;
        return_timestamps: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"word">]>>;
        chunk_length_s: z.ZodOptional<z.ZodNumber>;
    }, z.ZodTypeAny, "passthrough">>>], null>;
    releaseContext: z.ZodTuple<[z.ZodString], null>;
};
export interface TranscribeResult {
    text: string;
    chunks?: {
        text: string;
        timestamp?: [number, number | null];
    }[];
    segments?: unknown[];
}
export interface Service {
    initContext: (ctx: ServiceContext, ...args: z.infer<typeof schemas.initContext>) => ReadableStream<Expand<EventStream>>;
    transcribe: (ctx: ServiceContext, ...args: z.infer<typeof schemas.transcribe>) => ReadableStream<Expand<EventStream>>;
    transcribeData: (ctx: ServiceContext, ...args: z.infer<typeof schemas.transcribeData>) => Promise<TranscribeResult>;
    releaseContext: (ctx: ServiceContext, ...args: z.infer<typeof schemas.releaseContext>) => Promise<{
        released: boolean;
        alreadyReleased?: boolean;
    }>;
}
declare const _default: Service;
export default _default;
