# Somali Solfege Converter
A Python-based audio/video processing system for converting musical content to Somali solfege notation.
## Features
### Phase 1: Audio Extraction & Pre-processing ✅
- 🎥 Video-to-audio extraction (supports MP4, MOV, AVI, MKV)
- 🎵 Audio file loading (supports WAV, MP3, FLAC, OGG)
- 🔊 Automatic stereo-to-mono conversion
- ⚡ Memory-efficient processing with 22.05kHz downsampling
- 🧹 Automatic cleanup of temporary files
### Phase 2: Pitch Detection & Note Segmentation ✅
- 🎼 YIN Algorithm for robust pitch detection
- 📊 Median filtering for smooth pitch tracks
- 🎵 Automatic note segmentation
- 📈 Pitch visualization with note boundaries
- 🎯 Optimized for clean frequency tracking (80-800 Hz range)
- 💡 Suitable for Somali Pentatonic practice
### Future Phases
- Phase 3: Somali Pentatonic Scale Mapping
- Phase 4: Solfege Notation Export
## Installation
1. Clone the repository:
```bash
git clone
github.com
cd somali-solfege-converter
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
## Usage
### As a Jupyter Notebook
Open `audio_processing.ipynb` in Jupyter Notebook or VS Code with Jupyter extension:
```bash
jupyter notebook audio_processing.ipynb
```
Follow the cells in order to:
1. Check and install dependencies
2. Load and process audio from video or audio files
3. Visualize the audio waveform
4. Detect pitch using YIN algorithm
5. Smooth pitch track and segment into notes
6. Visualize pitch detection results
### As a Python Module
**Phase 1: Audio Processing**
```python
from audio_processor import prepare_audio_input, check_dependencies
# Check dependencies
check_dependencies()
# Process audio from video or audio file
samples, sample_rate = prepare_audio_input(r"C:\Users\hp\OneDrive\Documents\GitHub\somali-solfege-converter2\testVideo.mp4")
# samples is a numpy array of normalized audio data
# sample_rate is actual rate after resampling
```
**Phase 2: Pitch De …