This repository contains a model for classifying emotions in French speech. The model is trained to recognize three emotions: anger (colère), neutral (neutre), and joy (joie).
The model is based on a sequence classification architecture and uses MFCC (Mel-frequency cepstral coefficients) features extracted from audio files. It is fine-tuned on a dataset of French speech samples labeled with emotions.
1from inference import predict
2
3audio_path = "path_to_your_audio_file.wav"
4predicted_emotion, probabilities = predict(audio_path)
5print(f"🎤 L'émotion prédite est : {predicted_emotion}")
6print(f"📊 Probabilités par classe : {probabilities}")
1from predict import predict_emotion
2
3audio_path = "path_to_your_audio_file.wav"
4predicted_emotion, probabilities = predict_emotion(audio_path)
5print(f"🎤 L'émotion prédite est : {predicted_emotion}")
6print(f"📊 Probabilités par classe : {probabilities}")
1if __name__ == "__main__":
2 base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "data"))
3 audio_file = os.path.join(base_path, "colere", "c1ac.wav")
4
5 predicted_emotion, probabilities = predict_emotion(audio_file)
6
7 print(f"🎤 L'émotion prédite est : {predicted_emotion}")
8 print(f"📊 Probabilités par classe : {probabilities}")
This project is licensed under the MIT License.