metadata
license: mit
datasets:
- google/speech_commands
base_model:
- facebook/wav2vec2-base
Command Classifier
This is a lightweight classifier model trained on top of Wav2Vec2 features for classifying speech commands.
- Base model:
facebook/wav2vec2-base
- Fine-tuned model: Lightweight linear classifier
- Dataset: Google Speech Commands v0.02
Usage
You can use this classifier by combining it with Wav2Vec2 features. The classifier expects mean-pooled Wav2Vec2 hidden states.
from transformers import Wav2Vec2Model
from command_classifier import CommandClassifier
import torch
wav2vec = Wav2Vec2Model.from_pretrained("facebook/wav2vec2-base")
classifier = CommandClassifier(num_classes=35)
classifier.load_state_dict(torch.load("pytorch_model.bin"))