///
import { ReadableStream } from "node:stream/web";
declare class Transcriber {
private session;
private minLength;
private maxLength;
private numReturnSequences;
private lengthPenalty;
private repetitionPenalty;
private sampleRate;
private constructor();
/**
* A factory method used to generate instances of whisper sessions.
*
* @param sampleRate - The sample rate for your input audio buffer.
* @param uri - The URL of PATH where the whisper model should be loaded from.
* @returns - An initilized instance of the Whisper model for transcription.
*/
static create(sampleRate: number, uri?: string): Promise;
/**
* Converts a readable stream of raw audio channel data to text.
*
* @param audio - A stream of decoded PCM data chunks from an audio source.
* @returns - A readable stream that contains a transformer used to transcribe audio to text.
*/
transcribe(audio: ReadableStream): Promise>;
/**
* Processes a chunk of raw decoded audio in steps, this funciton
* is recursive and will keep processsing audio until the data
* is empty. The results of these recursive calls are combined
* into a single transcribed string.
*
* @param audio - Float32Array of a decoded audio stream.
* @param idx - The starting position for transcription.
* @param pos - The current position of a transcription.
* @param results - The audio transcribed as a string.
* @returns - A string containing all transcribed audio as text.
*/
private processAudio;
private run;
}
export { Transcriber };