IMvision12 commited on
Commit
a266927
·
verified ·
1 Parent(s): 99e684b

Update class name in the quick start

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -32,7 +32,7 @@ For more details on the model, please go to the upstream [model card](https://hu
32
 
33
  Pure-**Keras 3** conversion of [`openai/whisper-tiny`](https://huggingface.co/openai/whisper-tiny) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**.
34
 
35
- This is an **ASR** checkpoint (`WhisperSpeechToText`, 39M).
36
 
37
  ## ✨ Quick start
38
 
@@ -43,10 +43,10 @@ os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
43
  import soundfile as sf
44
  from kerasformers.models.whisper import (
45
  WhisperProcessor,
46
- WhisperSpeechToText,
47
  )
48
 
49
- model = WhisperSpeechToText.from_weights("kerasformers/whisper_tiny")
50
  processor = WhisperProcessor.from_weights("kerasformers/whisper_tiny")
51
 
52
  audio, sr = sf.read("your_audio.wav", dtype="float32") # 16 kHz mono
@@ -74,7 +74,7 @@ Load any Whisper variant the same way with `from_weights("kerasformers/<variant>
74
  - Prefer `WhisperProcessor.from_weights(...)` so mel bins match the variant (v3 uses 128).
75
  - Clips are padded to a 30 s window; chunk longer audio yourself.
76
  - See [Whisper docs](https://imvision12.github.io/KerasFormers/whisper/) and [Loading Weights](https://imvision12.github.io/KerasFormers/loading_weights/).
77
- - Community / upstream safetensors still work via the `hf:` prefix, e.g. `WhisperSpeechToText.from_weights("hf:openai/whisper-tiny")`.
78
 
79
  ## Special Thanks
80
 
 
32
 
33
  Pure-**Keras 3** conversion of [`openai/whisper-tiny`](https://huggingface.co/openai/whisper-tiny) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**.
34
 
35
+ This is an **ASR** checkpoint (`WhisperConditionalGenerate`, 39M).
36
 
37
  ## ✨ Quick start
38
 
 
43
  import soundfile as sf
44
  from kerasformers.models.whisper import (
45
  WhisperProcessor,
46
+ WhisperConditionalGenerate,
47
  )
48
 
49
+ model = WhisperConditionalGenerate.from_weights("kerasformers/whisper_tiny")
50
  processor = WhisperProcessor.from_weights("kerasformers/whisper_tiny")
51
 
52
  audio, sr = sf.read("your_audio.wav", dtype="float32") # 16 kHz mono
 
74
  - Prefer `WhisperProcessor.from_weights(...)` so mel bins match the variant (v3 uses 128).
75
  - Clips are padded to a 30 s window; chunk longer audio yourself.
76
  - See [Whisper docs](https://imvision12.github.io/KerasFormers/whisper/) and [Loading Weights](https://imvision12.github.io/KerasFormers/loading_weights/).
77
+ - Community / upstream safetensors still work via the `hf:` prefix, e.g. `WhisperConditionalGenerate.from_weights("hf:openai/whisper-tiny")`.
78
 
79
  ## Special Thanks
80