A React-based web application for visualizing and analyzing bird audio detection data. This tool provides an interactive interface for reviewing bird detection segments with audio playback, waveform visualization, and comparison capabilities.
- Interactive Waveform: Visual representation of audio with segment overlays
- Segment Highlighting: Color-coded detection segments on the waveform
- Audio Playback: Click-to-play functionality for individual segments
- Sticky Player: Waveform player stays visible while scrolling through data
- CSV Data Import: Support for bird detection CSV files
- Comparison Mode: Side-by-side comparison of two detection datasets
- Sortable Tables: Sort segments by time, confidence, duration, etc.
- Detection Review: Review and analyze detection results
- Time Range Filtering: Filter segments by time ranges
- Confidence Thresholds: Filter by detection confidence scores
- Advanced Filtering: Filter segments by various criteria
- Real-time Updates: Instant filtering without page reloads
- File Upload: Drag-and-drop support for custom audio and CSV files
- Default Data: Pre-loaded sample data for immediate exploration
- Session Persistence: Settings and preferences saved locally
- Frontend: React 18 with TypeScript
- Audio Processing: WaveSurfer.js for waveform visualization
- CSV Parsing: PapaParse for data processing
- Styling: Tailwind CSS with custom design system
- Deployment: Firebase Hosting
- Build Tool: Create React App
- Node.js (v14 or higher)
- npm or yarn package manager
-
Clone the repository
git clone <repository-url> cd bird-audio-classification-interface
-
Install dependencies
npm install
-
Start the development server
npm start
-
Open your browser Navigate to
http://localhost:3000
to view the application.
npm start
- Runs the app in development modenpm build
- Builds the app for productionnpm test
- Launches the test runnernpm run deploy
- Builds and deploys to Firebase Hosting
The application loads with sample bird detection data by default, including:
- Audio file:
20250602_051000.mp3
- Detection data:
20250602_051000_detections.csv
- Comparison data:
20250602_051000_nobo_detections.csv
-
Prepare your files:
- Audio file (MP3, WAV, etc.)
- CSV file with detection data
-
CSV Format Requirements:
file,start_time,end_time,NOBO,Present audio_file.wav,10.5,12.3,0.85,1 audio_file.wav,25.1,27.8,0.92,1
-
Upload Process:
- Use the drag-and-drop zone or file picker
- Select both audio and CSV files
- The application will automatically process and display your data
The application expects CSV files with the following columns:
Column | Type | Description |
---|---|---|
file |
string | Audio filename |
start_time |
number | Segment start time (seconds) |
end_time |
number | Segment end time (seconds) |
NOBO |
number | Confidence score (0-1) |
Present |
number | Detection flag (1 = present, 0 = absent) |
Compare two detection datasets:
- Load default comparison data or upload two CSV files
- Toggle between single and comparison view
- View side-by-side segment tables
- Analyze differences in detection results
src/
βββ components/ # React components
β βββ DataTableSection.tsx # Main data display component
β βββ ErrorDisplay.tsx # Error handling UI
β βββ FileDropZone.tsx # File upload interface
β βββ Header.tsx # App header with controls
β βββ Instructions.tsx # User instructions
β βββ LoadingSpinner.tsx # Loading state UI
β βββ SegmentTable.tsx # Data table component
β βββ UploadSection.tsx # File upload section
β βββ WaveSurferPlayer.tsx # Audio waveform player
βββ hooks/ # Custom React hooks
β βββ useAudioData.ts # Audio data management
β βββ useAudioPlayer.ts # Audio playback logic
βββ utils/ # Utility functions
β βββ csvExporter.ts # Data processing utilities
β βββ csvParser.ts # CSV parsing logic
β βββ localStorage.ts # Local storage management
βββ types.ts # TypeScript type definitions
βββ App.tsx # Main application component
βββ index.tsx # Application entry point
The application is configured for Firebase Hosting:
{
"hosting": {
"site": "bird-audio-app",
"public": "build",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
Custom design system classes are configured in tailwind.config.js
. The application uses a consistent color scheme and spacing system.
Segments are filtered based on:
Present === 1
(detection present)NOBO >= 0.3
(minimum confidence threshold)- Valid time ranges (
start_time < end_time
)
- CSV Parsing: Raw CSV data is parsed and validated
- Filtering: Apply confidence and presence filters
- ID Assignment: Each segment gets a unique ID (CSV row number)
- Rendering: Display segments in table and waveform
- Chrome (recommended)
- Firefox
- Safari
- Edge
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Audio not playing
- Ensure audio file format is supported (MP3, WAV, OGG)
- Check browser audio permissions
- Verify file is not corrupted
CSV parsing errors
- Verify CSV format matches expected schema
- Check for missing required columns
- Ensure numeric values are properly formatted
Performance issues
- Large CSV files (>10MB) may cause slowdowns
- Consider filtering data before upload
- Use Chrome for best performance
For issues and questions:
- Check the browser console for error messages
- Verify file formats and data structure
- Try with the default sample data
- Clear browser cache and local storage if needed
- WaveSurfer.js - Audio waveform visualization
- PapaParse - CSV parsing library
- Tailwind CSS - Utility-first CSS framework
- React - UI framework