WasuratS commited on
Commit
01278d2
Β·
verified Β·
1 Parent(s): d457caf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +74 -7
README.md CHANGED
@@ -1,14 +1,81 @@
1
  ---
2
- title: Sound2Spectrogram
3
- emoji: πŸƒ
4
- colorFrom: indigo
5
- colorTo: purple
6
  sdk: gradio
7
- sdk_version: 6.22.0
8
- python_version: '3.12'
9
  app_file: app.py
10
  pinned: false
11
  license: mit
 
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Marine Soundscape Analyzer
3
+ emoji: 🌊
4
+ colorFrom: blue
5
+ colorTo: indigo
6
  sdk: gradio
7
+ sdk_version: 5.23.3
 
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
+ short_description: Coral reef acoustic analysis
12
  ---
13
 
14
+ # 🌊 Marine Soundscape Analyzer
15
+
16
+ A comprehensive acoustic analysis tool for **marine and coral reef hydrophone recordings**.
17
+
18
+ ## Features
19
+
20
+ Upload any audio file (WAV, MP3, FLAC, OGG, AIFF) and get:
21
+
22
+ | Tab | Content |
23
+ |-----|---------|
24
+ | πŸ“Š Waveform | Time-domain signal with amplitude envelope |
25
+ | πŸ”Š Spectrograms | Linear, Mel-scale, and Log-frequency spectrograms |
26
+ | πŸ“‘ Frequency Analysis + MFCC | Power Spectral Density (Welch), spectral centroid over time, MFCC heatmap |
27
+ | 🧬 Acoustic Indices | ACI, BI, NDSI, ADI, RMS β€” all shown as time-series bars |
28
+ | πŸ“ Temporal Features | Spectral bandwidth, rolloff, flatness, ZCR, onset detection, MFCC delta |
29
+ | πŸ“‹ Report | Full markdown report with all statistics and index interpretations |
30
+
31
+ ## Acoustic Indices
32
+
33
+ | Index | Reference | What it measures |
34
+ |-------|-----------|-----------------|
35
+ | **ACI** β€” Acoustic Complexity Index | Pieretti et al. 2011 | Temporal variation in spectral amplitude; higher = more complex soundscape |
36
+ | **BI** β€” Bioacoustic Index | Boelman et al. 2007 | Energy in the 2–8 kHz biological band |
37
+ | **NDSI** β€” Normalized Difference Soundscape Index | Kasten et al. 2012 | Ratio of biotic (2–11 kHz) to anthropogenic (1–2 kHz) energy |
38
+ | **ADI** β€” Acoustic Diversity Index | Villanueva-Rivera et al. 2011 | Shannon diversity across frequency bands above a threshold |
39
+ | **Hf** β€” Spectral Entropy | Sueur et al. 2008 | Uniformity of energy across frequencies; 0 = tonal, 1 = white noise |
40
+ | **Ht** β€” Temporal Entropy | Sueur et al. 2008 | Uniformity of energy over time; 0 = impulsive, 1 = stationary |
41
+ | **H** β€” Total Acoustic Entropy | Sueur et al. 2008 | Combined soundscape heterogeneity (Hf Γ— Ht) |
42
+
43
+ ## Marine Coral Reef Context
44
+
45
+ | Frequency Band | Range | Typical Sources |
46
+ |----------------|-------|-----------------|
47
+ | Low | 20 – 1,000 Hz | Fish choruses, breaking waves, vessel traffic |
48
+ | Snapping Shrimp | 1 – 5 kHz | *Alpheid* snapping shrimp β€” key reef health indicator |
49
+ | High Biotic | 5 – 20 kHz | Small crustaceans, urchins, high-frequency fish sounds |
50
+
51
+ Snapping shrimp produce a characteristic broadband crackling that can be heard throughout the 1–20 kHz range. Healthy reefs typically show **high ACI, positive NDSI, and elevated energy in the snapping-shrimp band**. Degraded reefs tend to be quieter, with lower ACI and flatter spectra.
52
+
53
+ ## Example Recordings
54
+
55
+ The app ships with example recordings from the project data folder:
56
+
57
+ - 🦐 Snapping Shrimp
58
+ - πŸ¦€ Ghost Crab: Gastric Mill Stridulation
59
+ - πŸ‹ Humpback Whale Song
60
+ - 🐟 Red Grouper Vocalization
61
+
62
+ ## Running Locally
63
+
64
+ ```bash
65
+ pip install -r requirements.txt
66
+ python app.py
67
+ ```
68
+
69
+ ## Deploying to Hugging Face Spaces
70
+
71
+ 1. Create a new **Gradio** Space on [huggingface.co/spaces](https://huggingface.co/spaces).
72
+ 2. Upload `app.py` and `requirements.txt` to the Space repository.
73
+ 3. (Optional) Add audio example files under `data/` in the Space repo β€” the app will auto-detect them.
74
+
75
+ ## References
76
+
77
+ - Pieretti N., Farina A., Morri D. (2011). A new methodology to infer the singing activity of an avian community: The Acoustic Complexity Index (ACI). *Ecological Indicators*.
78
+ - Boelman N.T., et al. (2007). Multi-trophic invasion resistance in Hawaii: bioacoustics, field surveys, and airborne remote sensing. *Ecological Applications*.
79
+ - Kasten E.P., et al. (2012). The remote environmental assessment laboratory's acoustic library: An archive for studying soundscape ecology. *Ecological Informatics*.
80
+ - Villanueva-Rivera L.J., et al. (2011). A primer of acoustic analysis for landscape ecologists. *Landscape Ecology*.
81
+ - Sueur J., Pavoine S., Hamerlynck O., Duvail S. (2008). Rapid acoustic survey for biodiversity appraisal. *PLOS ONE*.