Feature Extraction
Transformers
Safetensors
granite_speech_nar
speech
asr
non-autoregressive
ctc
speech_recognition
automatic_speech_recognition
custom_code
Instructions to use ibm-granite/granite-speech-4.1-2b-nar 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-nar with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="ibm-granite/granite-speech-4.1-2b-nar", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ibm-granite/granite-speech-4.1-2b-nar", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download preprocessor_config.json from ibm-granite/granite-speech-4.1-2b-nar: direct link, hf CLI and curl.
- Browser
- Download file 289 Bytes
-
https://huggingface.co/ibm-granite/granite-speech-4.1-2b-nar/resolve/main/preprocessor_config.json
- Command line
-
hf download hf://ibm-granite/granite-speech-4.1-2b-nar/preprocessor_config.json
-
curl -L -o preprocessor_config.json https://huggingface.co/ibm-granite/granite-speech-4.1-2b-nar/resolve/main/preprocessor_config.json
289 Bytes
| { | |
| "auto_map": { | |
| "AutoFeatureExtractor": "feature_extraction_granite_speech_nar.GraniteSpeechNarFeatureExtractor" | |
| }, | |
| "feature_extractor_type": "GraniteSpeechNarFeatureExtractor", | |
| "hop_length": 160, | |
| "n_fft": 512, | |
| "n_mels": 80, | |
| "sampling_rate": 16000, | |
| "win_length": 400 | |
| } | |