Feature Extraction
Transformers
PyTorch
Safetensors
Fairseq
French
pantagruel_uni
data2vec2
JEPA
speech
custom_code
Instructions to use PantagrueLLM/speech-base-1K with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PantagrueLLM/speech-base-1K with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="PantagrueLLM/speech-base-1K", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("PantagrueLLM/speech-base-1K", trust_remote_code=True, device_map="auto") - Fairseq
How to use PantagrueLLM/speech-base-1K with Fairseq:
from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub models, cfg, task = load_model_ensemble_and_task_from_hf_hub( "PantagrueLLM/speech-base-1K" ) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -56,7 +56,6 @@ from transformers import AutoProcessor, AutoModel
|
|
| 56 |
|
| 57 |
# load model
|
| 58 |
model_name = "PantagrueLLM/speech-base-1K"
|
| 59 |
-
# Note: please normalize the audio if not using AutoProcessor
|
| 60 |
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
|
| 61 |
model = AutoModel.from_pretrained(model_name, trust_remote_code=True)
|
| 62 |
model.eval()
|
|
@@ -64,6 +63,7 @@ model.eval()
|
|
| 64 |
# load audio files
|
| 65 |
wav, curr_sample_rate = sf.read("audio.wav", dtype="float32")
|
| 66 |
feats = torch.from_numpy(wav).float()
|
|
|
|
| 67 |
inputs = processor(feats, sampling_rate=16000, return_tensors="pt")
|
| 68 |
|
| 69 |
# extract features
|
|
|
|
| 56 |
|
| 57 |
# load model
|
| 58 |
model_name = "PantagrueLLM/speech-base-1K"
|
|
|
|
| 59 |
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
|
| 60 |
model = AutoModel.from_pretrained(model_name, trust_remote_code=True)
|
| 61 |
model.eval()
|
|
|
|
| 63 |
# load audio files
|
| 64 |
wav, curr_sample_rate = sf.read("audio.wav", dtype="float32")
|
| 65 |
feats = torch.from_numpy(wav).float()
|
| 66 |
+
# Note: please normalize the audio if not using AutoProcessor
|
| 67 |
inputs = processor(feats, sampling_rate=16000, return_tensors="pt")
|
| 68 |
|
| 69 |
# extract features
|