Skip to content

Repository files navigation

🐾 Animal Translator — NLP Project

How It Works

Animal Sound (.wav)
        ↓
[Audio Classifier]  — trained on ESC-50 (Kaggle)
        ↓ predicts emotion label e.g. "anger", "sadness", "joy"
[NLP Emotion→Sentence Model] — trained on Emotions NLP dataset (Kaggle)
        ↓
"Back off! This is my space and I mean it!"

Both stages are trained purely on Kaggle datasets. No hand-crafted rules. No APIs.


📥 Datasets to Download (BOTH required)

Dataset 1 — Audio (for the classifier)

ESC-50: Environmental Sound Classification 🔗 https://www.kaggle.com/datasets/mmoreaux/environmental-sound-classification-50

Download and place files:

data/
├── audio/        ← all .ogg files from ESC-50
└── esc50.csv     ← metadata CSV from ESC-50

Dataset 2 — NLP Text (for the translator)

Emotions Dataset for NLP by praveengovi 🔗 https://www.kaggle.com/datasets/praveengovi/emotions-dataset-for-nlp

Download and place files:

data/
├── train.txt     ← NLP training data  (format: "text;emotion")
├── val.txt       ← NLP validation data
└── test.txt      ← NLP test data

Setup

pip install -r requirements.txt

Run in Order

# Step 1: Train the audio classifier on ESC-50
python step1_train_audio_classifier.py

# Step 2: Train the NLP translator on Emotions dataset
python step2_train_nlp_translator.py

# Step 3: Translate an animal sound end-to-end
python step3_translate.py --audio path/to/sound.wav

# Step 4: Evaluate with BLEU + accuracy
python step4_evaluate.py

The NLP Connection

The Emotions for NLP dataset contains 20,000 sentences like:

"i feel absolutely helpless right now"     → sadness
"im so excited i could burst"              → joy
"i want to destroy everything around me"   → anger

Animals experience the same emotions. So:

  • Dog aggressive bark → anger → model generates an angry sentence in animal voice
  • Cat purring → joy → model generates a joyful sentence
  • Dog whining alone → sadness → model generates a sad/lonely sentence

The NLP model learns from 20,000 real human sentences what each emotion sounds like, then generates translations in an animal's voice.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages