alkiskoudounas commited on
Commit
a2968a2
·
verified ·
1 Parent(s): 95d146f

Created README

Browse files
Files changed (1) hide show
  1. README.md +49 -0
README.md ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ task_categories:
3
+ - audio-classification
4
+ language:
5
+ - fr
6
+ tags:
7
+ - intent
8
+ - intent-classification
9
+ - audio-classification
10
+ - audio
11
+ base_model:
12
+ - facebook/wav2vec2-xls-r-300m
13
+ datasets:
14
+ - FBK-MT/Speech-MASSIVE
15
+ library_name: transformers
16
+ license: apache-2.0
17
+ ---
18
+
19
+ # wav2vec 2.0 XLS-R 128 (300m) fine-tuned on Speech-MASSIVE - fr-FR
20
+
21
+ Speech-MASSIVE is a multilingual Spoken Language Understanding (SLU) dataset comprising the speech counterpart for a portion of the MASSIVE textual corpus.
22
+ Speech-MASSIVE covers 12 languages.
23
+ It includes spoken and written utterances and is annotated with 60 intents.
24
+ The dataset is available on [HuggingFace Hub](https://huggingface.co/datasets/FBK-MT/Speech-MASSIVE).
25
+
26
+ This is the [facebook/wav2vec2-xls-r-300m](https://huggingface.co/facebook/wav2vec2-xls-r-300m) model fine-tuned on the fr-FR language.
27
+
28
+ ## Usage
29
+
30
+ You can use the model directly in the following manner:
31
+
32
+ ```python
33
+ import torch
34
+ import librosa
35
+ from transformers import AutoModelForAudioClassification, AutoFeatureExtractor
36
+
37
+ ## Load an audio file
38
+ audio_array, sr = librosa.load("path_to_audio.wav", sr=16000)
39
+
40
+ ## Load model and feature extractor
41
+ model = AutoModelForAudioClassification.from_pretrained("alkiskoudounas/xls-r-128-speechmassive-fr-FR")
42
+ feature_extractor = AutoFeatureExtractor.from_pretrained("facebook/wav2vec2-xls-r-300m")
43
+
44
+ ## Extract features
45
+ inputs = feature_extractor(audio_array.squeeze(), sampling_rate=feature_extractor.sampling_rate, padding=True, return_tensors="pt")
46
+
47
+ ## Compute logits
48
+ logits = model(**inputs).logits
49
+ ```