help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
environmental-sounds
RSK World
environmental-sounds
Environmental Sound Dataset - Audio Classification + Sound Event Detection + Deep Learning + Machine Learning
environmental-sounds
  • environmental-sounds
  • examples
  • .gitignore844 B
  • ADVANCED_FEATURES.md8.3 KB
  • CONTRIBUTING.md1.7 KB
  • CREATE_RELEASE.md5.1 KB
  • DATASET_STRUCTURE.md3.5 KB
  • LICENSE1.5 KB
  • PROJECT_SUMMARY.md5 KB
  • README.md5.9 KB
  • RELEASE_NOTES.md4.8 KB
  • analyze.py6.9 KB
  • api_server.py8.1 KB
  • audio_quality.py10.2 KB
  • audio_similarity.py10.4 KB
  • augment_audio.py10.9 KB
  • batch_processing.py11.3 KB
  • create_dataset_structure.py4.8 KB
  • create_sample_data.py4.3 KB
  • create_zip.py3.8 KB
  • deep_learning_models.py13.2 KB
  • environmental-sounds.zip50.1 KB
  • example_usage.py5 KB
  • index.html26.9 KB
  • load_data.py4.9 KB
  • model_interpretability.py10.3 KB
  • realtime_classification.py9.6 KB
  • requirements.txt475 B
  • setup.py1.7 KB
  • train_model.py7.8 KB
  • verify_project.py5.3 KB
setup.pycreate_dataset_structure.py
setup.py
Raw Download
Find: Go to:
"""
Setup script for Environmental Sound Dataset

Project: Environmental Sound Dataset
Website: https://rskworld.in
Founded by: Molla Samser
Designer & Tester: Rima Khatun
Email: help@rskworld.in
Phone: +91 93305 39277
"""

from setuptools import setup, find_packages

with open("README.md", "r", encoding="utf-8") as fh:
    long_description = fh.read()

with open("requirements.txt", "r", encoding="utf-8") as fh:
    requirements = [line.strip() for line in fh if line.strip() and not line.startswith("#")]

setup(
    name="environmental-sound-dataset",
    version="1.0.0",
    author="RSK World",
    author_email="help@rskworld.in",
    description="Environmental sound classification dataset with audio samples for sound event detection",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://rskworld.in",
    packages=find_packages(),
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
        "Topic :: Multimedia :: Sound/Audio",
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
    ],
    python_requires=">=3.8",
    install_requires=requirements,
    keywords="audio, sound, classification, machine learning, environmental sounds, dataset",
    project_urls={
        "Homepage": "https://rskworld.in",
        "Contact": "mailto:help@rskworld.in",
    },
)

51 lines•1.7 KB
python
create_dataset_structure.py
Raw Download
Find: Go to:
"""
Create Dataset Structure and Sample Metadata

Project: Environmental Sound Dataset
Website: https://rskworld.in
Founded by: Molla Samser
Designer & Tester: Rima Khatun
Email: help@rskworld.in
Phone: +91 93305 39277
"""

import os
import csv
from pathlib import Path


def create_dataset_structure():
    """Create the complete dataset directory structure."""
    
    base_dir = 'environmental-sounds'
    
    # Define classes
    classes = ['bird', 'car', 'dog', 'rain', 'wind']
    
    # Create directories
    for split in ['train', 'test']:
        for class_name in classes:
            dir_path = os.path.join(base_dir, split, class_name)
            os.makedirs(dir_path, exist_ok=True)
            print(f"Created: {dir_path}")
    
    print(f"\nDataset structure created in: {base_dir}/")
    return base_dir, classes


def generate_metadata(base_dir, classes):
    """Generate metadata CSV file."""
    
    metadata = []
    
    for split in ['train', 'test']:
        n_samples = 10 if split == 'train' else 3  # More training samples
        
        for class_name in classes:
            for i in range(n_samples):
                filename = f"{class_name}_{i+1:03d}.wav"
                filepath = os.path.join(base_dir, split, class_name, filename)
                
                # Sample metadata
                duration = 2.0 + (i * 0.1)  # Vary duration
                
                metadata.append({
                    'filename': filename,
                    'filepath': filepath,
                    'class': class_name,
                    'split': split,
                    'duration': f"{duration:.2f}",
                    'sample_rate': '22050',
                    'n_samples': str(int(duration * 22050)),
                    'source': 'synthetic'
                })
    
    # Write metadata CSV
    metadata_path = os.path.join(base_dir, 'metadata.csv')
    
    if metadata:
        fieldnames = ['filename', 'filepath', 'class', 'split', 'duration', 
                     'sample_rate', 'n_samples', 'source']
        
        with open(metadata_path, 'w', newline='', encoding='utf-8') as csvfile:
            writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
            writer.writeheader()
            writer.writerows(metadata)
        
        print(f"\nMetadata saved to: {metadata_path}")
        print(f"Total entries: {len(metadata)}")
        print(f"  - Training: {len([m for m in metadata if m['split'] == 'train'])}")
        print(f"  - Test: {len([m for m in metadata if m['split'] == 'test'])}")
    
    return metadata_path


def create_readme_file(base_dir):
    """Create a README file in the dataset directory."""
    
    readme_content = """# Environmental Sound Dataset

This directory contains the environmental sound dataset organized by class.

## Structure

```
environmental-sounds/
├── train/
│   ├── bird/
│   ├── car/
│   ├── dog/
│   ├── rain/
│   └── wind/
├── test/
│   ├── bird/
│   ├── car/
│   ├── dog/
│   ├── rain/
│   └── wind/
└── metadata.csv
```

## Usage

Audio files should be placed in their respective class directories.
The metadata.csv file contains information about all audio files.

## Note

This is a sample structure. Replace the directories with actual audio files
for real-world audio classification tasks.

For questions or support:
- Website: https://rskworld.in
- Email: help@rskworld.in
- Phone: +91 93305 39277

---
RSK World - Free Programming Resources & Source Code
Founded by Molla Samser, with Designer & Tester Rima Khatun
"""
    
    readme_path = os.path.join(base_dir, 'README.txt')
    with open(readme_path, 'w', encoding='utf-8') as f:
        f.write(readme_content)
    
    print(f"README created: {readme_path}")


if __name__ == '__main__':
    print("Creating dataset structure...")
    print("=" * 50)
    
    try:
        base_dir, classes = create_dataset_structure()
        metadata_path = generate_metadata(base_dir, classes)
        create_readme_file(base_dir)
        
        print("\n" + "=" * 50)
        print("Dataset structure created successfully!")
        print("\nNote: This creates the directory structure and metadata.")
        print("For actual audio files, place WAV/MP3 files in the class directories.")
        print("\nNext steps:")
        print("1. Add your audio files to the respective class directories")
        print("2. Update metadata.csv if needed")
        print("3. Run: python create_zip.py to create the project ZIP file")
        
    except Exception as e:
        print(f"Error: {e}")
        import traceback
        traceback.print_exc()

159 lines•4.8 KB
python
🚀 Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ❤️

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer