JuliaNeuralGraphics / Whisper.jl

MIT License
21 stars 1 forks source link

I dont get this package to work at all #4

Closed FredrikKarlssonSpeech closed 3 months ago

FredrikKarlssonSpeech commented 3 months ago

I just tried to get this package to work, but it fails on the first attempt

julia >  using Whisper, Flux
julia > Whisper.transcribe(
    "/Users/frkkan96/Desktop/kaa_yw_pb_16000.flac", "/Users/frkkan96/Desktop/kaa_yw_pb_16000.srt";
    model_name="tiny", language="swedish", dev=cpu, precision=f32)
ERROR: MethodError: no method matching transcribe(::String, ::String; model_name::String, language::String, dev::typeof(cpu), precision::typeof(f32))

Also, finding out available models do not work:

julia> values(Whisper.LANGUAGES)
ERROR: UndefVarError: `LANGUAGES` not defined
pxl-th commented 3 months ago

Hm... Running commands works fine. Can you try running same commands as below?

julia> using Whisper, Flux

julia> values(Whisper.LANGUAGES)
ValueIterator for a OrderedCollections.OrderedDict{String, String} with 99 entries. Values:
  "english"
  "chinese"
  "german"
  "spanish"
  "russian"
  "korean"
  "french"
  "japanese"
  "portuguese"
...

julia> Whisper.transcribe(
           "./samples/jfk.flac", "./output.srt";
           model_name="tiny", language="english", dev=cpu, precision=f32)
[ Info: Running on `cpu` device at `f32` precision.
[ Info: Cache directory for weights: /home/pxl-th/.cache/Whisper.jl.
[ Info: Downloading weights: https://openaipublic.azureedge.net/main/whisper/models/65147644a518d12f04e32d6f3b26facc3f8dd46e5390956a9424a650c0ce22b9/tiny.pt
[ Info: Downloading tokens file: /home/pxl-th/.cache/Whisper.jl/multilingual.tiktoken
[ Info: Saving results to: `./output.srt`.
FredrikKarlssonSpeech commented 3 months ago

Sorry, this was an issue raised by me loading an identically named package instead of this repo code. Sorry.