Spaces:
Running on Zero
Running on Zero
| class AcousticEmotionClassifier: | |
| def __init__(self, model_checkpoint: str = "wav2vec2-lg-xlsr-en-speech-emotion-recognition"): | |
| self.checkpoint = model_checkpoint | |
| def predict_emotion(self, audio_segment): | |
| # Wraps fine-tuned Wav2Vec2 inference processing | |
| return { | |
| "label": "neutral", | |
| "score": 0.94 | |
| } | |