Package io.github.givimad.whisperjni
Class WhisperFullParams
java.lang.Object
io.github.givimad.whisperjni.WhisperFullParams
The
WhisperFullParams instances needed to configure full whisper execution- Author:
- Miguel Álvarez Díez - Initial contribution
-
Field Summary
FieldsModifier and TypeFieldDescriptionintOverwrite the audio context size (0 = use default)intSpecific to bean search sampling strategyfloatSpecific to bean search sampling strategybooleanDetect languageintAudio duration to process in msfloatRefer to libraryGBNF grammar.floatPenalty for non grammar tokens.intSpecific to greedy sampling strategyInitial promptLanguagefloatRefer to libraryfloatRefer to libraryfloatRefer to libraryintMax tokens to use from past text as prompt for the decoderbooleanDo not use past transcription (if any) as initial prompt for the decoderfloatRefer to librarybooleanDo not generate timestampsintNumber of thread, 0 for max coresintStart offset in msbooleanPrint progress informationbooleanPrint results from within whisper.cpp (avoid it, use callback instead)booleanPrint special tokensbooleanPrint timestamps for each text segment when printing realtimebooleanForce single segment output (useful for streaming)booleanSpeed-up the audio by 2x using Phase VocoderbooleanDecoder optionbooleanTokenizer optionfloatInitial decoding temperaturefloatRefer to librarybooleanTranslate -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newWhisperFullParamsinstance using the greedyWhisperSamplingStrategyWhisperFullParams(WhisperSamplingStrategy strategy) Creates a newWhisperFullParamsinstance using the providedWhisperSamplingStrategy -
Method Summary
-
Field Details
-
nThreads
public int nThreadsNumber of thread, 0 for max cores -
audioCtx
public int audioCtxOverwrite the audio context size (0 = use default) -
nMaxTextCtx
public int nMaxTextCtxMax tokens to use from past text as prompt for the decoder -
offsetMs
public int offsetMsStart offset in ms -
durationMs
public int durationMsAudio duration to process in ms -
translate
public boolean translateTranslate -
noTimestamps
public boolean noTimestampsDo not generate timestamps -
detectLanguage
public boolean detectLanguageDetect language -
language
Language -
initialPrompt
Initial prompt -
noContext
public boolean noContextDo not use past transcription (if any) as initial prompt for the decoder -
singleSegment
public boolean singleSegmentForce single segment output (useful for streaming) -
printSpecial
public boolean printSpecialPrint special tokens -
printProgress
public boolean printProgressPrint progress information -
printRealtime
public boolean printRealtimePrint results from within whisper.cpp (avoid it, use callback instead) -
printTimestamps
public boolean printTimestampsPrint timestamps for each text segment when printing realtime -
suppressBlank
public boolean suppressBlankDecoder option -
suppressNonSpeechTokens
public boolean suppressNonSpeechTokensTokenizer option -
speedUp
public boolean speedUpSpeed-up the audio by 2x using Phase Vocoder -
temperature
public float temperatureInitial decoding temperature -
maxInitialTs
public float maxInitialTsRefer to library -
lengthPenalty
public float lengthPenaltyRefer to library -
temperatureInc
public float temperatureIncRefer to library -
entropyThold
public float entropyTholdRefer to library -
logprobThold
public float logprobTholdRefer to library -
noSpeechThold
public float noSpeechTholdRefer to library -
greedyBestOf
public int greedyBestOfSpecific to greedy sampling strategy -
beamSearchBeamSize
public int beamSearchBeamSizeSpecific to bean search sampling strategy -
beamSearchPatience
public float beamSearchPatienceSpecific to bean search sampling strategy -
grammar
GBNF grammar. -
grammarPenalty
public float grammarPenaltyPenalty for non grammar tokens.
-
-
Constructor Details
-
WhisperFullParams
Creates a newWhisperFullParamsinstance using the providedWhisperSamplingStrategy- Parameters:
strategy- the requiredWhisperSamplingStrategy
-
WhisperFullParams
public WhisperFullParams()Creates a newWhisperFullParamsinstance using the greedyWhisperSamplingStrategy
-