Instructions to use ibm-granite/granite-speech-4.1-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ibm-granite/granite-speech-4.1-2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="ibm-granite/granite-speech-4.1-2b")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("ibm-granite/granite-speech-4.1-2b") model = AutoModelForSpeechSeq2Seq.from_pretrained("ibm-granite/granite-speech-4.1-2b") - Notebooks
- Google Colab
- Kaggle
| { | |
| "feature_extractor_type": "GraniteSpeechFeatureExtractor", | |
| "melspec_kwargs": { | |
| "hop_length": 160, | |
| "n_fft": 512, | |
| "n_mels": 80, | |
| "sample_rate": 16000, | |
| "win_length": 400 | |
| }, | |
| "processor_class": "GraniteSpeechProcessor", | |
| "projector_downsample_rate": 5, | |
| "projector_window_size": 15, | |
| "sampling_rate": 16000 | |
| } | |