Spaces:
Sleeping
Sleeping
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -76,40 +76,66 @@ Compatible with various edge AI accelerators including:
|
|
| 76 |
|
| 77 |
Download the complete training and deployment code from the **Files** tab:
|
| 78 |
|
|
|
|
| 79 |
- `dtln_ethos_u55.py` - Model architecture
|
| 80 |
-
- `
|
|
|
|
| 81 |
- `convert_to_tflite.py` - TFLite INT8 conversion
|
| 82 |
-
- `alif_e7_voice_denoising_guide.md` - Complete deployment guide for edge devices
|
| 83 |
- `example_usage.py` - Usage examples
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
## π οΈ Quick Start Guide
|
| 87 |
|
|
|
|
|
|
|
| 88 |
```bash
|
| 89 |
-
# 1. Install dependencies
|
| 90 |
-
pip install -r
|
| 91 |
|
| 92 |
-
# 2. Train
|
| 93 |
-
python
|
| 94 |
-
--clean-dir ./data/clean_speech \
|
| 95 |
-
--noise-dir ./data/noise \
|
| 96 |
--epochs 50 \
|
| 97 |
--batch-size 16 \
|
|
|
|
| 98 |
--lstm-units 128
|
| 99 |
|
| 100 |
# 3. Convert to TFLite INT8
|
| 101 |
python convert_to_tflite.py \
|
| 102 |
--model ./models/best_model.h5 \
|
| 103 |
-
--output ./models/
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
```
|
| 114 |
|
| 115 |
## π§ Training Your Own Model
|
|
|
|
| 76 |
|
| 77 |
Download the complete training and deployment code from the **Files** tab:
|
| 78 |
|
| 79 |
+
### Core Files
|
| 80 |
- `dtln_ethos_u55.py` - Model architecture
|
| 81 |
+
- `train_with_hf_datasets.py` - **NEW: Train with Hugging Face datasets (LibriSpeech, DNS Challenge, etc.)**
|
| 82 |
+
- `train_dtln.py` - Training script with local audio files
|
| 83 |
- `convert_to_tflite.py` - TFLite INT8 conversion
|
|
|
|
| 84 |
- `example_usage.py` - Usage examples
|
| 85 |
+
|
| 86 |
+
### Documentation
|
| 87 |
+
- **`HF_TRAINING_GUIDE.md`** - **Complete guide for training with Hugging Face datasets**
|
| 88 |
+
- `alif_e7_voice_denoising_guide.md` - Edge device deployment guide
|
| 89 |
+
|
| 90 |
+
### Requirements
|
| 91 |
+
- `training_requirements.txt` - Training dependencies (TensorFlow, datasets, etc.)
|
| 92 |
+
- `requirements.txt` - Demo app dependencies
|
| 93 |
|
| 94 |
## π οΈ Quick Start Guide
|
| 95 |
|
| 96 |
+
### Option 1: Train with Hugging Face Datasets (Recommended)
|
| 97 |
+
|
| 98 |
```bash
|
| 99 |
+
# 1. Install training dependencies
|
| 100 |
+
pip install -r training_requirements.txt
|
| 101 |
|
| 102 |
+
# 2. Train with LibriSpeech + DNS Challenge (automatic download)
|
| 103 |
+
python train_with_hf_datasets.py \
|
|
|
|
|
|
|
| 104 |
--epochs 50 \
|
| 105 |
--batch-size 16 \
|
| 106 |
+
--samples-per-epoch 1000 \
|
| 107 |
--lstm-units 128
|
| 108 |
|
| 109 |
# 3. Convert to TFLite INT8
|
| 110 |
python convert_to_tflite.py \
|
| 111 |
--model ./models/best_model.h5 \
|
| 112 |
+
--output ./models/dtln_int8.tflite
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
See **HF_TRAINING_GUIDE.md** for complete instructions with different datasets!
|
| 116 |
+
|
| 117 |
+
### Option 2: Train with Local Audio Files
|
| 118 |
+
|
| 119 |
+
```bash
|
| 120 |
+
# 1. Prepare your data
|
| 121 |
+
# data/
|
| 122 |
+
# βββ clean_speech/*.wav
|
| 123 |
+
# βββ noise/*.wav
|
| 124 |
+
|
| 125 |
+
# 2. Install dependencies
|
| 126 |
+
pip install -r training_requirements.txt
|
| 127 |
+
|
| 128 |
+
# 3. Train model
|
| 129 |
+
python train_dtln.py \
|
| 130 |
+
--clean-dir ./data/clean_speech \
|
| 131 |
+
--noise-dir ./data/noise \
|
| 132 |
+
--epochs 50 \
|
| 133 |
+
--batch-size 16
|
| 134 |
+
|
| 135 |
+
# 4. Convert to TFLite
|
| 136 |
+
python convert_to_tflite.py \
|
| 137 |
+
--model ./models/best_model.h5 \
|
| 138 |
+
--output ./models/dtln_int8.tflite
|
| 139 |
```
|
| 140 |
|
| 141 |
## π§ Training Your Own Model
|