inferStream method
ValueNotifier<String>
inferStream(
- String inputPath, {
- String? logPath,
- int numProcessors = 1,
- String language = "auto",
- bool translate = false,
- String initialPrompt = "",
- int startTime = 0,
- int endTime = -1,
- bool useOriginalTime = true,
- int strategy = whisper_sampling_strategy.WHISPER_SAMPLING_GREEDY,
})
Implementation
ValueNotifier<String> inferStream(String inputPath,
{String? logPath,
int numProcessors = 1,
String language = "auto",
bool translate = false,
String initialPrompt = "",
int startTime = 0,
int endTime = -1,
bool useOriginalTime = true,
int strategy = whisper_sampling_strategy.WHISPER_SAMPLING_GREEDY}) {
if (outputMode == "json") {
throw Exception("JSON output is not supported for streaming yet");
}
inferIsolate(
inputPath,
logPath: logPath,
numProcessors: numProcessors,
language: language,
translate: translate,
initialPrompt: initialPrompt,
strategy: strategy,
startTime: startTime,
endTime: endTime,
useOriginalTime: useOriginalTime,
newSegmentCallback: getSegmentCallback,
);
return result;
}