public class WhisperCpp extends Object implements AutoCloseable
| 构造器和说明 |
|---|
WhisperCpp() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
benchGgmlMulMat(int nthread) |
int |
benchMemcpy(int nthread) |
void |
close() |
String |
fullTranscribe(WhisperFullParams whisperParams,
float[] audioData)
Run the entire model: PCM -> log mel spectrogram -> encoder -> decoder -> text.
|
List<WhisperSegment> |
fullTranscribeWithTime(WhisperFullParams whisperParams,
float[] audioData) |
WhisperFullParams |
getFullDefaultParams(WhisperSamplingStrategy strategy)
Provides default params which can be used with `whisper_full()` etc.
|
String |
getSystemInfo() |
void |
initContext(String modelPath) |
File |
modelDir() |
public File modelDir()
public void initContext(String modelPath) throws FileNotFoundException
modelPath - - absolute path, or just the name (eg: "base", "base-en" or "base.en")FileNotFoundExceptionpublic WhisperFullParams getFullDefaultParams(WhisperSamplingStrategy strategy)
strategy - - GREEDYpublic void close()
close 在接口中 AutoCloseablepublic String fullTranscribe(WhisperFullParams whisperParams, float[] audioData) throws IOException
IOExceptionpublic List<WhisperSegment> fullTranscribeWithTime(WhisperFullParams whisperParams, float[] audioData) throws IOException
IOExceptionpublic String getSystemInfo()
public int benchMemcpy(int nthread)
public int benchGgmlMulMat(int nthread)
Copyright © 2023. All rights reserved.