UNPKG

@nguyen-t/whisper

Version:

A basic Node.js native module wrapper for Whisper.cpp written using NAPI-RS.

47 lines (44 loc) 1.73 kB
/* tslint:disable */ /* eslint-disable */ /* auto-generated by NAPI-RS */ export const enum WhisperSamplingStrategy { GREEDY = 0, BEAM_SEARCH = 1 } export class Whisper { constructor(path: string, gpu?: boolean | undefined | null) infer(buffer: Buffer): string strategy(strategy: WhisperSamplingStrategy, value: number): this nThreads(numThreads: number): this nMaxTextCtx(contextLength: number): this offsetMs(ms: number): this durationMs(ms: number): this translate(enableTranslation: boolean): this noContext(disablePreviousContext: boolean): this noTimestamps(disableTimestamps: boolean): this singleSegment(enableSingleSegmentOutput: boolean): this printSpecial(enablePrintSpecialTokens: boolean): this printProgress(enablePrintProgress: boolean): this printRealtime(enableRealtimePrint: boolean): this printTimestamps(enablePrintTimestamps: boolean): this tokenTimestamps(enableTokenTimestamps: boolean): this tholdPt(threshold: number): this tholdPtsum(threshold: number): this maxLen(segmentLength: number): this splitOnWord(enableSplitOnWord: boolean): this maxTokens(tokenLength: number): this speedUp(enableFastforward: boolean): this debugMode(enableDebug: boolean): this audioCtx(contextLength: number): this initialPrompt(prompt: string): this language(countryCode: string): this suppressBlank(hideBlanks: boolean): this suppressNonSpeechTokens(hideNonSpeechTokens: boolean): this temperature(value: number): this maxInitialTs(value: number): this lengthPenalty(penalty: number): this temperatureInc(increment: number): this entropyThold(threshold: number): this logprobThold(threshold: number): this noSpeechThold(threshold: number): this }