Vorrapard commited on
Commit
6835feb
·
verified ·
1 Parent(s): d02bb9b

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -0
README.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - google/speech_commands
5
+ base_model:
6
+ - facebook/wav2vec2-base
7
+ ---
8
+ # Command Classifier
9
+
10
+ This is a lightweight classifier model trained on top of Wav2Vec2 features for classifying speech commands.
11
+
12
+ - **Base model**: `facebook/wav2vec2-base`
13
+ - **Fine-tuned model**: Lightweight linear classifier
14
+ - **Dataset**: [Google Speech Commands v0.02](https://arxiv.org/abs/1804.03209)
15
+
16
+ ## Usage
17
+
18
+ You can use this classifier by combining it with Wav2Vec2 features. The classifier expects mean-pooled Wav2Vec2 hidden states.
19
+
20
+ ```python
21
+ from transformers import Wav2Vec2Model
22
+ from command_classifier import CommandClassifier
23
+ import torch
24
+
25
+ wav2vec = Wav2Vec2Model.from_pretrained("facebook/wav2vec2-base")
26
+ classifier = CommandClassifier(num_classes=35)
27
+ classifier.load_state_dict(torch.load("pytorch_model.bin"))