Instructions to use zeromodels/moonshine_tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasFormers
How to use zeromodels/moonshine_tiny with KerasFormers:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Keras
How to use zeromodels/moonshine_tiny with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://zeromodels/moonshine_tiny") - Notebooks
- Google Colab
- Kaggle
Update class name in the quick start
Browse files
README.md
CHANGED
|
@@ -31,7 +31,7 @@ For more details on the model, please go to the upstream [model card](https://hu
|
|
| 31 |
|
| 32 |
Pure-**Keras 3** conversion of [`UsefulSensors/moonshine-tiny`](https://huggingface.co/UsefulSensors/moonshine-tiny) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**.
|
| 33 |
|
| 34 |
-
This is an **ASR** checkpoint (`
|
| 35 |
|
| 36 |
## ✨ Quick start
|
| 37 |
|
|
@@ -42,10 +42,10 @@ os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
|
|
| 42 |
import soundfile as sf
|
| 43 |
from kerasformers.models.moonshine import (
|
| 44 |
MoonshineProcessor,
|
| 45 |
-
|
| 46 |
)
|
| 47 |
|
| 48 |
-
model =
|
| 49 |
processor = MoonshineProcessor.from_weights("kerasformers/moonshine_tiny")
|
| 50 |
|
| 51 |
audio, sr = sf.read("your_audio.wav", dtype="float32") # 16 kHz mono
|
|
@@ -67,7 +67,7 @@ Load any Moonshine variant the same way with `from_weights("kerasformers/<varian
|
|
| 67 |
- Prefer `MoonshineProcessor.from_weights(...)` so feature extraction matches.
|
| 68 |
- English-only; pass a list of waveforms to batch.
|
| 69 |
- See [Moonshine docs](https://imvision12.github.io/KerasFormers/moonshine/) and [Loading Weights](https://imvision12.github.io/KerasFormers/loading_weights/).
|
| 70 |
-
- Community / upstream safetensors still work via the `hf:` prefix, e.g. `
|
| 71 |
|
| 72 |
## Special Thanks
|
| 73 |
|
|
|
|
| 31 |
|
| 32 |
Pure-**Keras 3** conversion of [`UsefulSensors/moonshine-tiny`](https://huggingface.co/UsefulSensors/moonshine-tiny) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**.
|
| 33 |
|
| 34 |
+
This is an **ASR** checkpoint (`MoonshineConditionalGenerate`).
|
| 35 |
|
| 36 |
## ✨ Quick start
|
| 37 |
|
|
|
|
| 42 |
import soundfile as sf
|
| 43 |
from kerasformers.models.moonshine import (
|
| 44 |
MoonshineProcessor,
|
| 45 |
+
MoonshineConditionalGenerate,
|
| 46 |
)
|
| 47 |
|
| 48 |
+
model = MoonshineConditionalGenerate.from_weights("kerasformers/moonshine_tiny")
|
| 49 |
processor = MoonshineProcessor.from_weights("kerasformers/moonshine_tiny")
|
| 50 |
|
| 51 |
audio, sr = sf.read("your_audio.wav", dtype="float32") # 16 kHz mono
|
|
|
|
| 67 |
- Prefer `MoonshineProcessor.from_weights(...)` so feature extraction matches.
|
| 68 |
- English-only; pass a list of waveforms to batch.
|
| 69 |
- See [Moonshine docs](https://imvision12.github.io/KerasFormers/moonshine/) and [Loading Weights](https://imvision12.github.io/KerasFormers/loading_weights/).
|
| 70 |
+
- Community / upstream safetensors still work via the `hf:` prefix, e.g. `MoonshineConditionalGenerate.from_weights("hf:UsefulSensors/moonshine-tiny")`.
|
| 71 |
|
| 72 |
## Special Thanks
|
| 73 |
|