WhisperRequest.fromWavFile constructor

WhisperRequest.fromWavFile({
  1. required File audio,
  2. required File model,
  3. bool is_translate = false,
  4. int threads = 4,
  5. bool is_verbose = false,
  6. String language = "id",
  7. bool is_special_tokens = false,
  8. bool is_no_timestamps = false,
})

Implementation

factory WhisperRequest.fromWavFile({
  required File audio,
  required File model,
  bool is_translate = false,
  int threads = 4,
  bool is_verbose = false,
  String language = "id",
  bool is_special_tokens = false,
  bool is_no_timestamps = false,
}) {
  return WhisperRequest(whisper_api.GetTextFromWavFile.create(
    special_type: "getTextFromWavFile",
    is_translate: is_translate,
    threads: threads,
    is_verbose: is_verbose,
    language: language,
    is_special_tokens: is_special_tokens,
    is_no_timestamps: is_no_timestamps,
    audio: audio.path,
    model: model.path,
  ).toJson());
}