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,
  9. int n_processors = 1,
  10. bool split_on_word = false,
  11. bool no_fallback = false,
  12. bool diarize = false,
  13. bool speed_up = 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,
    int n_processors = 1,
    bool split_on_word = false,
    bool no_fallback = false,
    bool diarize = false,
    bool speed_up = 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,
    n_processors: n_processors,
    split_on_word: split_on_word,
    no_fallback: no_fallback,
    diarize: diarize,
    speed_up: speed_up,
  ).toJson());
}