audio trimming and adding up to normalizer
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- normalizer_audios.py +391 -153
- sound_audios/bip_sound_unlock_door/PX_52.wav +2 -2
- sound_audios/bipping_ecg/PX_51.wav +2 -2
- sound_audios/close_book/PX_53.wav +2 -2
- sound_audios/close_book/PX_54.wav +2 -2
- sound_audios/close_door/I12P_38.wav +2 -2
- sound_audios/close_door/I12P_40.wav +2 -2
- sound_audios/close_door/I12P_45.wav +2 -2
- sound_audios/close_metallic_closet/PX_93.wav +2 -2
- sound_audios/close_metallic_drawer/PX18_30.wav +2 -2
- sound_audios/close_metallic_drawer/PX19_50.wav +2 -2
- sound_audios/close_metallic_drawer/PX_88.wav +2 -2
- sound_audios/close_metallic_drawer/PX_89.wav +2 -2
- sound_audios/close_microwave_door/PX_61.wav +2 -2
- sound_audios/close_plastic_drawer/PX_115.wav +2 -2
- sound_audios/close_wooden_drawer/PX0_30.wav +2 -2
- sound_audios/close_wooden_drawer/PX1_50.wav +2 -2
- sound_audios/elevator_door_close/PX_67.wav +2 -2
- sound_audios/elevator_door_open/PX_68.wav +2 -2
- sound_audios/fast_keyboard_typing/PX_77.wav +2 -2
- sound_audios/fast_keyboard_typing/PX_78.wav +2 -2
- sound_audios/fast_keyboard_typing/PX_79.wav +2 -2
- sound_audios/fast_keyboard_typing/PX_80.wav +2 -2
- sound_audios/filling_cup_with_water/PX_136.wav +2 -2
- sound_audios/filling_cup_with_water/PX_137.wav +2 -2
- sound_audios/filling_cup_with_water/PX_138.wav +2 -2
- sound_audios/filling_cup_with_water/PX_139.wav +2 -2
- sound_audios/hand_dryer/PX_70.wav +2 -2
- sound_audios/hanging_up_landline_telephone/PX_81.wav +2 -2
- sound_audios/keyboard_typing/PX2_30.wav +2 -2
- sound_audios/keyboard_typing/PX3_50.wav +2 -2
- sound_audios/keyboard_typing/PX4_50.wav +2 -2
- sound_audios/keyboard_typing/PX5_30.wav +2 -2
- sound_audios/keyboard_typing/PX_71.wav +2 -2
- sound_audios/keyboard_typing/PX_72.wav +2 -2
- sound_audios/knock_door/I12P_1.wav +2 -2
- sound_audios/knock_door/I12P_43.wav +2 -2
- sound_audios/knock_door/I12P_46.wav +2 -2
- sound_audios/knock_door/I12P_47.wav +2 -2
- sound_audios/lighter/PX_83.wav +2 -2
- sound_audios/lighter/PX_84.wav +2 -2
- sound_audios/lighter/PX_85.wav +2 -2
- sound_audios/machine_bipping/PX_50.wav +2 -2
- sound_audios/marker_cap_action/PX_86.wav +2 -2
- sound_audios/marker_cap_action/PX_87.wav +2 -2
- sound_audios/mouse_clicking/PX_96.wav +2 -2
- sound_audios/mouse_clicking/PX_97.wav +2 -2
- sound_audios/moving_pen_tool_metal_holder/PX10_50.wav +2 -2
- sound_audios/moving_pen_tool_metal_holder/PX11_30.wav +2 -2
- sound_audios/moving_pen_tool_metal_holder/PX12_50.wav +2 -2
normalizer_audios.py
CHANGED
|
@@ -1,32 +1,45 @@
|
|
| 1 |
#!/usr/bin/env python3
|
| 2 |
"""
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
Usage examples
|
| 8 |
--------------
|
| 9 |
-
#
|
| 10 |
-
python
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
python
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
python
|
| 17 |
|
| 18 |
-
#
|
| 19 |
-
python
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
python
|
| 23 |
"""
|
| 24 |
|
| 25 |
import argparse
|
| 26 |
-
import os
|
| 27 |
-
import sys
|
| 28 |
import json
|
| 29 |
import logging
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
from pathlib import Path
|
| 31 |
|
| 32 |
import numpy as np
|
|
@@ -39,110 +52,101 @@ logging.basicConfig(
|
|
| 39 |
)
|
| 40 |
log = logging.getLogger(__name__)
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
def rms_db(signal: np.ndarray) -> float:
|
| 45 |
-
"""Compute the RMS level of *signal* in dBFS."""
|
| 46 |
rms = np.sqrt(np.mean(signal.astype(np.float64) ** 2))
|
| 47 |
-
if rms == 0
|
| 48 |
-
return -np.inf
|
| 49 |
-
return 20 * np.log10(rms)
|
| 50 |
|
| 51 |
|
| 52 |
def peak_db(signal: np.ndarray) -> float:
|
| 53 |
-
"""Compute the peak level of *signal* in dBFS."""
|
| 54 |
peak = np.max(np.abs(signal.astype(np.float64)))
|
| 55 |
-
if peak == 0
|
| 56 |
-
return -np.inf
|
| 57 |
-
return 20 * np.log10(peak)
|
| 58 |
|
| 59 |
|
| 60 |
-
def
|
| 61 |
-
"""Scale *signal* so its level moves from *current_db* to *target_db*."""
|
| 62 |
if current_db == -np.inf:
|
| 63 |
-
return signal
|
| 64 |
-
|
| 65 |
-
gain_linear = 10 ** (gain_db / 20)
|
| 66 |
out = signal.astype(np.float64) * gain_linear
|
| 67 |
-
# Soft-clip to prevent digital overs
|
| 68 |
peak = np.max(np.abs(out))
|
| 69 |
if peak > 1.0:
|
| 70 |
-
log.warning("Clipping detected (peak %.2f dB), applying limiter.", 20 * np.log10(peak))
|
| 71 |
out /= peak
|
| 72 |
return out
|
| 73 |
|
| 74 |
-
# ── main ─────────────────────────────────────────────────────────────────────
|
| 75 |
-
|
| 76 |
-
def main():
|
| 77 |
-
parser = argparse.ArgumentParser(
|
| 78 |
-
description="Normalize the energy of sound-event WAV files.",
|
| 79 |
-
formatter_class=argparse.RawDescriptionHelpFormatter,
|
| 80 |
-
)
|
| 81 |
-
parser.add_argument(
|
| 82 |
-
"--input-dir",
|
| 83 |
-
type=str,
|
| 84 |
-
default=os.path.join(os.path.dirname(os.path.abspath(__file__)),
|
| 85 |
-
"sound_events", "sound_audios"),
|
| 86 |
-
help="Root directory containing event sub-folders with .wav files.",
|
| 87 |
-
)
|
| 88 |
-
parser.add_argument(
|
| 89 |
-
"--output-dir",
|
| 90 |
-
type=str,
|
| 91 |
-
default=None,
|
| 92 |
-
help="Where to write normalized files (mirrors input structure). "
|
| 93 |
-
"Defaults to <input_dir>_normalized.",
|
| 94 |
-
)
|
| 95 |
-
parser.add_argument(
|
| 96 |
-
"--inplace",
|
| 97 |
-
action="store_true",
|
| 98 |
-
help="Overwrite original files instead of writing to --output-dir.",
|
| 99 |
-
)
|
| 100 |
-
parser.add_argument(
|
| 101 |
-
"--target-db",
|
| 102 |
-
type=float,
|
| 103 |
-
default=-20.0,
|
| 104 |
-
help="Target level in dBFS (default: -20).",
|
| 105 |
-
)
|
| 106 |
-
parser.add_argument(
|
| 107 |
-
"--mode",
|
| 108 |
-
choices=["rms", "peak"],
|
| 109 |
-
default="rms",
|
| 110 |
-
help="Normalization mode: 'rms' (default) or 'peak'.",
|
| 111 |
-
)
|
| 112 |
-
parser.add_argument(
|
| 113 |
-
"--dry-run",
|
| 114 |
-
action="store_true",
|
| 115 |
-
help="Only print per-file statistics; do not write any files.",
|
| 116 |
-
)
|
| 117 |
-
args = parser.parse_args()
|
| 118 |
-
|
| 119 |
-
input_dir = Path(args.input_dir).resolve()
|
| 120 |
-
if not input_dir.is_dir():
|
| 121 |
-
log.error("Input directory does not exist: %s", input_dir)
|
| 122 |
-
sys.exit(1)
|
| 123 |
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
output_dir = input_dir.parent / (input_dir.name + "_normalized")
|
| 130 |
|
| 131 |
-
|
| 132 |
-
|
|
|
|
| 133 |
|
| 134 |
-
# Collect all wav files
|
| 135 |
wav_files = sorted(input_dir.rglob("*.wav"))
|
| 136 |
if not wav_files:
|
| 137 |
log.error("No .wav files found under %s", input_dir)
|
| 138 |
-
|
| 139 |
|
| 140 |
-
log.info("Found %d .wav files
|
| 141 |
-
log.info("Mode: %s | Target: %.1f dBFS", mode_label,
|
| 142 |
-
if args.dry_run:
|
| 143 |
-
log.info("DRY RUN – no files will be written.")
|
| 144 |
-
else:
|
| 145 |
-
log.info("Output: %s", output_dir)
|
| 146 |
|
| 147 |
stats = []
|
| 148 |
n_clipped = 0
|
|
@@ -150,106 +154,340 @@ def main():
|
|
| 150 |
for wav_path in wav_files:
|
| 151 |
rel = wav_path.relative_to(input_dir)
|
| 152 |
signal, sr = sf.read(wav_path, dtype="float64")
|
| 153 |
-
|
| 154 |
-
# If stereo, measure on the mix-down but keep channels
|
| 155 |
-
if signal.ndim == 2:
|
| 156 |
-
mono = signal.mean(axis=1)
|
| 157 |
-
else:
|
| 158 |
-
mono = signal
|
| 159 |
|
| 160 |
orig_db = measure_fn(mono)
|
| 161 |
orig_peak = peak_db(mono)
|
| 162 |
-
|
| 163 |
entry = {
|
| 164 |
"file": str(rel),
|
| 165 |
"sr": sr,
|
| 166 |
"duration_s": round(len(mono) / sr, 3),
|
| 167 |
-
f"original_{
|
| 168 |
"original_peak_db": round(orig_peak, 2),
|
| 169 |
}
|
| 170 |
|
| 171 |
if orig_db == -np.inf:
|
| 172 |
-
log.warning("Skipping silent file: %s", rel)
|
| 173 |
entry["status"] = "skipped_silent"
|
| 174 |
stats.append(entry)
|
| 175 |
continue
|
| 176 |
|
| 177 |
-
|
| 178 |
-
normed =
|
| 179 |
-
new_db = measure_fn(
|
| 180 |
-
new_peak = peak_db(
|
| 181 |
-
|
| 182 |
if new_peak >= 0.0:
|
| 183 |
n_clipped += 1
|
| 184 |
|
| 185 |
-
entry[f"new_{
|
| 186 |
entry["new_peak_db"] = round(new_peak, 2)
|
| 187 |
-
entry["gain_db"] = round(
|
| 188 |
entry["status"] = "ok"
|
| 189 |
stats.append(entry)
|
| 190 |
|
| 191 |
log.info(
|
| 192 |
"%-55s %s: %+6.1f -> %+6.1f dBFS (gain %+.1f dB)",
|
| 193 |
-
str(rel),
|
| 194 |
-
mode_label,
|
| 195 |
-
orig_db,
|
| 196 |
-
new_db,
|
| 197 |
-
args.target_db - orig_db,
|
| 198 |
)
|
| 199 |
|
| 200 |
-
if not
|
| 201 |
-
|
| 202 |
-
dst.parent.mkdir(parents=True, exist_ok=True)
|
| 203 |
-
sf.write(str(dst), normed, sr, subtype="PCM_16")
|
| 204 |
|
| 205 |
-
#
|
| 206 |
-
orig_levels = [s[f"original_{
|
| 207 |
-
|
| 208 |
-
new_levels = [s[f"new_{args.mode}_db"] for s in stats
|
| 209 |
-
if s["status"] == "ok"]
|
| 210 |
-
|
| 211 |
-
log.info("─" * 60)
|
| 212 |
-
log.info("Processed %d / %d files", len(orig_levels), len(wav_files))
|
| 213 |
|
|
|
|
|
|
|
| 214 |
if orig_levels:
|
| 215 |
log.info(
|
| 216 |
"Original %s — min: %.1f max: %.1f mean: %.1f std: %.1f dBFS",
|
| 217 |
-
mode_label,
|
| 218 |
-
np.
|
| 219 |
-
np.max(orig_levels),
|
| 220 |
-
np.mean(orig_levels),
|
| 221 |
-
np.std(orig_levels),
|
| 222 |
)
|
| 223 |
log.info(
|
| 224 |
"After norm %s — min: %.1f max: %.1f mean: %.1f std: %.1f dBFS",
|
| 225 |
-
mode_label,
|
| 226 |
-
np.
|
| 227 |
-
np.max(new_levels),
|
| 228 |
-
np.mean(new_levels),
|
| 229 |
-
np.std(new_levels),
|
| 230 |
)
|
| 231 |
if n_clipped:
|
| 232 |
log.warning("%d file(s) required limiting to avoid clipping.", n_clipped)
|
| 233 |
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
stats_path = output_dir / "normalization_stats.json"
|
| 237 |
with open(stats_path, "w") as f:
|
| 238 |
json.dump(
|
| 239 |
-
{
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
"n_processed": len(orig_levels),
|
| 244 |
-
"n_clipped": n_clipped,
|
| 245 |
-
"files": stats,
|
| 246 |
-
},
|
| 247 |
-
f,
|
| 248 |
-
indent=2,
|
| 249 |
)
|
| 250 |
log.info("Stats written to %s", stats_path)
|
| 251 |
|
| 252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 253 |
|
| 254 |
|
| 255 |
if __name__ == "__main__":
|
|
|
|
| 1 |
#!/usr/bin/env python3
|
| 2 |
"""
|
| 3 |
+
All-in-one audio processing pipeline for sound event files.
|
| 4 |
+
|
| 5 |
+
Pipeline: 1) Normalize -> 2) Trim silence -> 3) Verify cuts
|
| 6 |
+
|
| 7 |
+
1. NORMALIZE – scale every file to a target RMS (or peak) level in dBFS
|
| 8 |
+
so all events share a consistent loudness.
|
| 9 |
+
2. TRIM – remove leading / trailing silence using an energy-based detector
|
| 10 |
+
with a configurable safety margin.
|
| 11 |
+
3. VERIFY – check every trimmed file for corruption, suspiciously short
|
| 12 |
+
duration, or abrupt start/end (which would indicate a bad cut).
|
| 13 |
|
| 14 |
Usage examples
|
| 15 |
--------------
|
| 16 |
+
# Full pipeline with defaults (in-place, -20 dBFS RMS):
|
| 17 |
+
python normalizer_audios.py
|
| 18 |
+
|
| 19 |
+
# Normalize to -25 dBFS, wider trim margin:
|
| 20 |
+
python normalizer_audios.py --target-db -25 --margin-ms 50
|
| 21 |
|
| 22 |
+
# Peak-normalize instead of RMS:
|
| 23 |
+
python normalizer_audios.py --mode peak --target-db -1
|
| 24 |
|
| 25 |
+
# Preview everything without writing:
|
| 26 |
+
python normalizer_audios.py --dry-run
|
| 27 |
|
| 28 |
+
# Skip normalization (trim + verify only):
|
| 29 |
+
python normalizer_audios.py --skip-normalize
|
| 30 |
|
| 31 |
+
# Skip trimming (normalize + verify only):
|
| 32 |
+
python normalizer_audios.py --skip-trim
|
| 33 |
"""
|
| 34 |
|
| 35 |
import argparse
|
|
|
|
|
|
|
| 36 |
import json
|
| 37 |
import logging
|
| 38 |
+
import math
|
| 39 |
+
import os
|
| 40 |
+
import struct
|
| 41 |
+
import sys
|
| 42 |
+
import wave
|
| 43 |
from pathlib import Path
|
| 44 |
|
| 45 |
import numpy as np
|
|
|
|
| 52 |
)
|
| 53 |
log = logging.getLogger(__name__)
|
| 54 |
|
| 55 |
+
AUDIO_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "sound_audios")
|
| 56 |
+
|
| 57 |
+
# ─────────────────────────────────────────────────────────────────────────────
|
| 58 |
+
# Shared I/O (stdlib wave – used by trimmer & verifier)
|
| 59 |
+
# ─────────────────────────────────────────────────────────────────────────────
|
| 60 |
+
|
| 61 |
+
def _wav_fmt(sampwidth):
|
| 62 |
+
if sampwidth == 1:
|
| 63 |
+
return "B"
|
| 64 |
+
elif sampwidth == 2:
|
| 65 |
+
return "h"
|
| 66 |
+
elif sampwidth == 4:
|
| 67 |
+
return "i"
|
| 68 |
+
raise ValueError(f"Unsupported sample width: {sampwidth}")
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
def read_wav_stdlib(filepath):
|
| 72 |
+
"""Read a WAV file with the stdlib *wave* module.
|
| 73 |
+
Returns (samples_list, sample_rate, sampwidth, nchannels)."""
|
| 74 |
+
with wave.open(filepath, "rb") as wf:
|
| 75 |
+
nchannels = wf.getnchannels()
|
| 76 |
+
sampwidth = wf.getsampwidth()
|
| 77 |
+
sr = wf.getframerate()
|
| 78 |
+
nframes = wf.getnframes()
|
| 79 |
+
raw = wf.readframes(nframes)
|
| 80 |
+
fmt = _wav_fmt(sampwidth)
|
| 81 |
+
n_samples = nframes * nchannels
|
| 82 |
+
samples = list(struct.unpack(f"<{n_samples}{fmt}", raw))
|
| 83 |
+
return samples, sr, sampwidth, nchannels
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
def write_wav_stdlib(filepath, samples, sr, sampwidth, nchannels):
|
| 87 |
+
"""Write samples to a WAV file with the stdlib *wave* module."""
|
| 88 |
+
fmt = _wav_fmt(sampwidth)
|
| 89 |
+
raw = struct.pack(f"<{len(samples)}{fmt}", *samples)
|
| 90 |
+
with wave.open(filepath, "wb") as wf:
|
| 91 |
+
wf.setnchannels(nchannels)
|
| 92 |
+
wf.setsampwidth(sampwidth)
|
| 93 |
+
wf.setframerate(sr)
|
| 94 |
+
wf.writeframes(raw)
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
def collect_wav_files(audio_dir):
|
| 98 |
+
"""Return a sorted list of all .wav paths under *audio_dir*."""
|
| 99 |
+
wav_files = []
|
| 100 |
+
for root, _dirs, files in os.walk(audio_dir):
|
| 101 |
+
for f in sorted(files):
|
| 102 |
+
if f.lower().endswith(".wav"):
|
| 103 |
+
wav_files.append(os.path.join(root, f))
|
| 104 |
+
return sorted(wav_files)
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
# ═════════════════════════════════════════════════════════════════════════════
|
| 108 |
+
# STEP 1 – NORMALIZE
|
| 109 |
+
# ═════════════════════════════════════════════════════════════════════════════
|
| 110 |
|
| 111 |
def rms_db(signal: np.ndarray) -> float:
|
|
|
|
| 112 |
rms = np.sqrt(np.mean(signal.astype(np.float64) ** 2))
|
| 113 |
+
return -np.inf if rms == 0 else 20 * np.log10(rms)
|
|
|
|
|
|
|
| 114 |
|
| 115 |
|
| 116 |
def peak_db(signal: np.ndarray) -> float:
|
|
|
|
| 117 |
peak = np.max(np.abs(signal.astype(np.float64)))
|
| 118 |
+
return -np.inf if peak == 0 else 20 * np.log10(peak)
|
|
|
|
|
|
|
| 119 |
|
| 120 |
|
| 121 |
+
def _apply_gain(signal: np.ndarray, current_db: float, target_db: float) -> np.ndarray:
|
|
|
|
| 122 |
if current_db == -np.inf:
|
| 123 |
+
return signal
|
| 124 |
+
gain_linear = 10 ** ((target_db - current_db) / 20)
|
|
|
|
| 125 |
out = signal.astype(np.float64) * gain_linear
|
|
|
|
| 126 |
peak = np.max(np.abs(out))
|
| 127 |
if peak > 1.0:
|
| 128 |
+
log.warning(" Clipping detected (peak %.2f dB), applying limiter.", 20 * np.log10(peak))
|
| 129 |
out /= peak
|
| 130 |
return out
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
|
| 133 |
+
def step_normalize(audio_dir, target_db, mode, dry_run):
|
| 134 |
+
"""Normalize all .wav files in *audio_dir* in-place."""
|
| 135 |
+
print("\n" + "=" * 70)
|
| 136 |
+
print(" STEP 1 / 3 — NORMALIZE")
|
| 137 |
+
print("=" * 70)
|
|
|
|
| 138 |
|
| 139 |
+
input_dir = Path(audio_dir).resolve()
|
| 140 |
+
measure_fn = rms_db if mode == "rms" else peak_db
|
| 141 |
+
mode_label = "RMS" if mode == "rms" else "Peak"
|
| 142 |
|
|
|
|
| 143 |
wav_files = sorted(input_dir.rglob("*.wav"))
|
| 144 |
if not wav_files:
|
| 145 |
log.error("No .wav files found under %s", input_dir)
|
| 146 |
+
return
|
| 147 |
|
| 148 |
+
log.info("Found %d .wav files", len(wav_files))
|
| 149 |
+
log.info("Mode: %s | Target: %.1f dBFS | dry_run=%s", mode_label, target_db, dry_run)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
stats = []
|
| 152 |
n_clipped = 0
|
|
|
|
| 154 |
for wav_path in wav_files:
|
| 155 |
rel = wav_path.relative_to(input_dir)
|
| 156 |
signal, sr = sf.read(wav_path, dtype="float64")
|
| 157 |
+
mono = signal.mean(axis=1) if signal.ndim == 2 else signal
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
|
| 159 |
orig_db = measure_fn(mono)
|
| 160 |
orig_peak = peak_db(mono)
|
|
|
|
| 161 |
entry = {
|
| 162 |
"file": str(rel),
|
| 163 |
"sr": sr,
|
| 164 |
"duration_s": round(len(mono) / sr, 3),
|
| 165 |
+
f"original_{mode}_db": round(orig_db, 2),
|
| 166 |
"original_peak_db": round(orig_peak, 2),
|
| 167 |
}
|
| 168 |
|
| 169 |
if orig_db == -np.inf:
|
| 170 |
+
log.warning(" Skipping silent file: %s", rel)
|
| 171 |
entry["status"] = "skipped_silent"
|
| 172 |
stats.append(entry)
|
| 173 |
continue
|
| 174 |
|
| 175 |
+
normed = _apply_gain(signal, orig_db, target_db)
|
| 176 |
+
new_mono = normed if normed.ndim == 1 else normed.mean(axis=1)
|
| 177 |
+
new_db = measure_fn(new_mono)
|
| 178 |
+
new_peak = peak_db(new_mono)
|
|
|
|
| 179 |
if new_peak >= 0.0:
|
| 180 |
n_clipped += 1
|
| 181 |
|
| 182 |
+
entry[f"new_{mode}_db"] = round(new_db, 2)
|
| 183 |
entry["new_peak_db"] = round(new_peak, 2)
|
| 184 |
+
entry["gain_db"] = round(target_db - orig_db, 2)
|
| 185 |
entry["status"] = "ok"
|
| 186 |
stats.append(entry)
|
| 187 |
|
| 188 |
log.info(
|
| 189 |
"%-55s %s: %+6.1f -> %+6.1f dBFS (gain %+.1f dB)",
|
| 190 |
+
str(rel), mode_label, orig_db, new_db, target_db - orig_db,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
)
|
| 192 |
|
| 193 |
+
if not dry_run:
|
| 194 |
+
sf.write(str(wav_path), normed, sr, subtype="PCM_16")
|
|
|
|
|
|
|
| 195 |
|
| 196 |
+
# Summary
|
| 197 |
+
orig_levels = [s[f"original_{mode}_db"] for s in stats if s["status"] == "ok"]
|
| 198 |
+
new_levels = [s[f"new_{mode}_db"] for s in stats if s["status"] == "ok"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
|
| 200 |
+
print("-" * 70)
|
| 201 |
+
log.info("Normalized %d / %d files", len(orig_levels), len(wav_files))
|
| 202 |
if orig_levels:
|
| 203 |
log.info(
|
| 204 |
"Original %s — min: %.1f max: %.1f mean: %.1f std: %.1f dBFS",
|
| 205 |
+
mode_label, np.min(orig_levels), np.max(orig_levels),
|
| 206 |
+
np.mean(orig_levels), np.std(orig_levels),
|
|
|
|
|
|
|
|
|
|
| 207 |
)
|
| 208 |
log.info(
|
| 209 |
"After norm %s — min: %.1f max: %.1f mean: %.1f std: %.1f dBFS",
|
| 210 |
+
mode_label, np.min(new_levels), np.max(new_levels),
|
| 211 |
+
np.mean(new_levels), np.std(new_levels),
|
|
|
|
|
|
|
|
|
|
| 212 |
)
|
| 213 |
if n_clipped:
|
| 214 |
log.warning("%d file(s) required limiting to avoid clipping.", n_clipped)
|
| 215 |
|
| 216 |
+
if not dry_run:
|
| 217 |
+
stats_path = os.path.join(audio_dir, "normalization_stats.json")
|
|
|
|
| 218 |
with open(stats_path, "w") as f:
|
| 219 |
json.dump(
|
| 220 |
+
{"mode": mode, "target_db": target_db,
|
| 221 |
+
"n_files": len(wav_files), "n_processed": len(orig_levels),
|
| 222 |
+
"n_clipped": n_clipped, "files": stats},
|
| 223 |
+
f, indent=2,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
)
|
| 225 |
log.info("Stats written to %s", stats_path)
|
| 226 |
|
| 227 |
+
|
| 228 |
+
# ═════════════════════════════════════════════════════════════════════════════
|
| 229 |
+
# STEP 2 – TRIM SILENCE
|
| 230 |
+
# ═════════════════════════════════════════════════════════════════════════════
|
| 231 |
+
|
| 232 |
+
def _to_mono_abs(samples, nchannels, nframes):
|
| 233 |
+
if nchannels == 1:
|
| 234 |
+
return [abs(s) for s in samples]
|
| 235 |
+
mono = []
|
| 236 |
+
for i in range(nframes):
|
| 237 |
+
val = sum(abs(samples[i * nchannels + ch]) for ch in range(nchannels))
|
| 238 |
+
mono.append(val // nchannels)
|
| 239 |
+
return mono
|
| 240 |
+
|
| 241 |
+
|
| 242 |
+
def trim_silence(samples, sr, nchannels, threshold_ratio=0.02,
|
| 243 |
+
margin_ms=30, frame_ms=10):
|
| 244 |
+
"""Return (trimmed_samples, original_ms, new_ms)."""
|
| 245 |
+
nframes = len(samples) // nchannels
|
| 246 |
+
mono = _to_mono_abs(samples, nchannels, nframes)
|
| 247 |
+
|
| 248 |
+
peak = max(mono) if mono else 0
|
| 249 |
+
if peak == 0:
|
| 250 |
+
dur = nframes / sr * 1000
|
| 251 |
+
return samples, dur, dur
|
| 252 |
+
|
| 253 |
+
threshold = peak * threshold_ratio
|
| 254 |
+
frame_len = max(1, int(sr * frame_ms / 1000))
|
| 255 |
+
hop = max(1, frame_len // 2)
|
| 256 |
+
|
| 257 |
+
first_loud = last_loud = None
|
| 258 |
+
pos = 0
|
| 259 |
+
while pos + frame_len <= nframes:
|
| 260 |
+
window = mono[pos:pos + frame_len]
|
| 261 |
+
rms = math.sqrt(sum(s * s for s in window) / frame_len)
|
| 262 |
+
if rms > threshold:
|
| 263 |
+
if first_loud is None:
|
| 264 |
+
first_loud = pos
|
| 265 |
+
last_loud = pos + frame_len
|
| 266 |
+
pos += hop
|
| 267 |
+
|
| 268 |
+
if first_loud is None:
|
| 269 |
+
dur = nframes / sr * 1000
|
| 270 |
+
return samples, dur, dur
|
| 271 |
+
|
| 272 |
+
margin_samp = int(sr * margin_ms / 1000)
|
| 273 |
+
start = max(0, first_loud - margin_samp)
|
| 274 |
+
end = min(nframes, last_loud + margin_samp)
|
| 275 |
+
|
| 276 |
+
trimmed = samples[start * nchannels : end * nchannels]
|
| 277 |
+
return trimmed, nframes / sr * 1000, (end - start) / sr * 1000
|
| 278 |
+
|
| 279 |
+
|
| 280 |
+
def step_trim(audio_dir, threshold_ratio, margin_ms, dry_run):
|
| 281 |
+
"""Trim leading/trailing silence from every .wav in *audio_dir*."""
|
| 282 |
+
print("\n" + "=" * 70)
|
| 283 |
+
print(" STEP 2 / 3 — TRIM SILENCE")
|
| 284 |
+
print("=" * 70)
|
| 285 |
+
|
| 286 |
+
wav_files = collect_wav_files(audio_dir)
|
| 287 |
+
if not wav_files:
|
| 288 |
+
log.error("No .wav files found in %s", audio_dir)
|
| 289 |
+
return
|
| 290 |
+
|
| 291 |
+
log.info("Found %d .wav files", len(wav_files))
|
| 292 |
+
log.info("Settings: threshold=%.3f, margin=%gms, dry_run=%s",
|
| 293 |
+
threshold_ratio, margin_ms, dry_run)
|
| 294 |
+
print("-" * 70)
|
| 295 |
+
|
| 296 |
+
total_saved = 0
|
| 297 |
+
trimmed_count = 0
|
| 298 |
+
|
| 299 |
+
for i, fpath in enumerate(wav_files, 1):
|
| 300 |
+
rel = os.path.relpath(fpath, audio_dir)
|
| 301 |
+
try:
|
| 302 |
+
samples, sr, sw, nch = read_wav_stdlib(fpath)
|
| 303 |
+
except Exception as e:
|
| 304 |
+
log.error("[%d/%d] ERROR reading %s: %s", i, len(wav_files), rel, e)
|
| 305 |
+
continue
|
| 306 |
+
|
| 307 |
+
trimmed, orig_ms, new_ms = trim_silence(
|
| 308 |
+
samples, sr, nch, threshold_ratio, margin_ms)
|
| 309 |
+
saved = orig_ms - new_ms
|
| 310 |
+
|
| 311 |
+
if saved > 1:
|
| 312 |
+
trimmed_count += 1
|
| 313 |
+
total_saved += saved
|
| 314 |
+
tag = "DRY-RUN" if dry_run else "TRIMMED"
|
| 315 |
+
log.info("[%d/%d] %s %s: %dms -> %dms (cut %dms)",
|
| 316 |
+
i, len(wav_files), tag, rel,
|
| 317 |
+
int(orig_ms), int(new_ms), int(saved))
|
| 318 |
+
if not dry_run:
|
| 319 |
+
write_wav_stdlib(fpath, trimmed, sr, sw, nch)
|
| 320 |
+
else:
|
| 321 |
+
log.info("[%d/%d] OK %s: %dms (no silence)",
|
| 322 |
+
i, len(wav_files), rel, int(orig_ms))
|
| 323 |
+
|
| 324 |
+
print("-" * 70)
|
| 325 |
+
log.info("Trimmed %d/%d files, saved %.1fs total.",
|
| 326 |
+
trimmed_count, len(wav_files), total_saved / 1000)
|
| 327 |
+
|
| 328 |
+
|
| 329 |
+
# ═════════════════════════════════════════════════════════════════════════════
|
| 330 |
+
# STEP 3 – VERIFY CUTS
|
| 331 |
+
# ═════════════════════════════════════════════════════════════════════════════
|
| 332 |
+
|
| 333 |
+
MIN_DURATION_MS = 50
|
| 334 |
+
EDGE_CHECK_MS = 5
|
| 335 |
+
EDGE_AMPLITUDE_RATIO = 0.5
|
| 336 |
+
|
| 337 |
+
|
| 338 |
+
def _check_one_file(filepath, audio_dir):
|
| 339 |
+
"""Return (duration_ms, [warnings])."""
|
| 340 |
+
warnings = []
|
| 341 |
+
try:
|
| 342 |
+
samples, sr, sw, nch = read_wav_stdlib(filepath)
|
| 343 |
+
except Exception as e:
|
| 344 |
+
return 0, [f"CORRUPT: {e}"]
|
| 345 |
+
|
| 346 |
+
nframes = len(samples) // nch
|
| 347 |
+
dur = nframes / sr * 1000
|
| 348 |
+
|
| 349 |
+
if nframes == 0:
|
| 350 |
+
return 0, ["EMPTY: 0 frames"]
|
| 351 |
+
|
| 352 |
+
if dur < MIN_DURATION_MS:
|
| 353 |
+
warnings.append(f"VERY SHORT: {dur:.0f}ms (< {MIN_DURATION_MS}ms)")
|
| 354 |
+
|
| 355 |
+
mono = _to_mono_abs(samples, nch, nframes)
|
| 356 |
+
peak = max(mono) if mono else 0
|
| 357 |
+
if peak == 0:
|
| 358 |
+
warnings.append("SILENT: completely silent")
|
| 359 |
+
return dur, warnings
|
| 360 |
+
|
| 361 |
+
edge_n = max(1, int(sr * EDGE_CHECK_MS / 1000))
|
| 362 |
+
|
| 363 |
+
start_max = max(mono[:edge_n])
|
| 364 |
+
if start_max > peak * EDGE_AMPLITUDE_RATIO:
|
| 365 |
+
warnings.append(
|
| 366 |
+
f"ABRUPT START: first {EDGE_CHECK_MS}ms at "
|
| 367 |
+
f"{start_max/peak*100:.0f}% of peak")
|
| 368 |
+
|
| 369 |
+
end_max = max(mono[-edge_n:])
|
| 370 |
+
if end_max > peak * EDGE_AMPLITUDE_RATIO:
|
| 371 |
+
warnings.append(
|
| 372 |
+
f"ABRUPT END: last {EDGE_CHECK_MS}ms at "
|
| 373 |
+
f"{end_max/peak*100:.0f}% of peak")
|
| 374 |
+
|
| 375 |
+
return dur, warnings
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
def step_verify(audio_dir):
|
| 379 |
+
"""Verify all trimmed .wav files for quality issues."""
|
| 380 |
+
print("\n" + "=" * 70)
|
| 381 |
+
print(" STEP 3 / 3 — VERIFY CUTS")
|
| 382 |
+
print("=" * 70)
|
| 383 |
+
|
| 384 |
+
wav_files = collect_wav_files(audio_dir)
|
| 385 |
+
if not wav_files:
|
| 386 |
+
log.error("No .wav files found in %s", audio_dir)
|
| 387 |
+
return
|
| 388 |
+
|
| 389 |
+
log.info("Verifying %d .wav files", len(wav_files))
|
| 390 |
+
print("-" * 70)
|
| 391 |
+
|
| 392 |
+
flagged = []
|
| 393 |
+
total_dur = 0
|
| 394 |
+
|
| 395 |
+
for i, fpath in enumerate(wav_files, 1):
|
| 396 |
+
rel = os.path.relpath(fpath, audio_dir)
|
| 397 |
+
dur, warns = _check_one_file(fpath, audio_dir)
|
| 398 |
+
total_dur += dur
|
| 399 |
+
if warns:
|
| 400 |
+
flagged.append((rel, dur, warns))
|
| 401 |
+
log.warning("[%d/%d] WARNING %s (%dms)", i, len(wav_files), rel, int(dur))
|
| 402 |
+
for w in warns:
|
| 403 |
+
log.warning(" -> %s", w)
|
| 404 |
+
else:
|
| 405 |
+
log.info("[%d/%d] OK %s (%dms)", i, len(wav_files), rel, int(dur))
|
| 406 |
+
|
| 407 |
+
print("=" * 70)
|
| 408 |
+
log.info("Total files: %d | Duration: %.1fs", len(wav_files), total_dur / 1000)
|
| 409 |
+
log.info("Files OK: %d | Flagged: %d", len(wav_files) - len(flagged), len(flagged))
|
| 410 |
+
|
| 411 |
+
if flagged:
|
| 412 |
+
print("\n--- FLAGGED FILES (review manually) ---")
|
| 413 |
+
for rel, dur, warns in flagged:
|
| 414 |
+
print(f"\n {rel} ({dur:.0f}ms):")
|
| 415 |
+
for w in warns:
|
| 416 |
+
print(f" - {w}")
|
| 417 |
+
else:
|
| 418 |
+
print("\nAll files look good!")
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
# ═════════════════════════════════════════════════════════════════════════════
|
| 422 |
+
# MAIN
|
| 423 |
+
# ═════════════════════════════════════════════════════════════════════════════
|
| 424 |
+
|
| 425 |
+
def main():
|
| 426 |
+
parser = argparse.ArgumentParser(
|
| 427 |
+
description="Audio pipeline: Normalize -> Trim silence -> Verify cuts",
|
| 428 |
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
| 429 |
+
)
|
| 430 |
+
|
| 431 |
+
# General
|
| 432 |
+
parser.add_argument(
|
| 433 |
+
"--audio-dir", type=str, default=AUDIO_DIR,
|
| 434 |
+
help="Root directory containing event sub-folders with .wav files "
|
| 435 |
+
f"(default: {AUDIO_DIR})",
|
| 436 |
+
)
|
| 437 |
+
parser.add_argument(
|
| 438 |
+
"--dry-run", action="store_true",
|
| 439 |
+
help="Preview all steps without writing any files.",
|
| 440 |
+
)
|
| 441 |
+
|
| 442 |
+
# Normalize options
|
| 443 |
+
norm = parser.add_argument_group("Normalization (step 1)")
|
| 444 |
+
norm.add_argument("--skip-normalize", action="store_true",
|
| 445 |
+
help="Skip the normalization step.")
|
| 446 |
+
norm.add_argument("--target-db", type=float, default=-20.0,
|
| 447 |
+
help="Target level in dBFS (default: -20).")
|
| 448 |
+
norm.add_argument("--mode", choices=["rms", "peak"], default="rms",
|
| 449 |
+
help="Normalization mode (default: rms).")
|
| 450 |
+
|
| 451 |
+
# Trim options
|
| 452 |
+
trim = parser.add_argument_group("Trimming (step 2)")
|
| 453 |
+
trim.add_argument("--skip-trim", action="store_true",
|
| 454 |
+
help="Skip the silence trimming step.")
|
| 455 |
+
trim.add_argument("--threshold", type=float, default=0.02,
|
| 456 |
+
help="Silence threshold as fraction of peak (default: 0.02).")
|
| 457 |
+
trim.add_argument("--margin-ms", type=float, default=30,
|
| 458 |
+
help="Margin in ms to keep around the sound (default: 30).")
|
| 459 |
+
|
| 460 |
+
# Verify options
|
| 461 |
+
verify = parser.add_argument_group("Verification (step 3)")
|
| 462 |
+
verify.add_argument("--skip-verify", action="store_true",
|
| 463 |
+
help="Skip the verification step.")
|
| 464 |
+
|
| 465 |
+
args = parser.parse_args()
|
| 466 |
+
audio_dir = args.audio_dir
|
| 467 |
+
|
| 468 |
+
log.info("Audio directory: %s", audio_dir)
|
| 469 |
+
|
| 470 |
+
# ── Step 1 ──
|
| 471 |
+
if not args.skip_normalize:
|
| 472 |
+
step_normalize(audio_dir, args.target_db, args.mode, args.dry_run)
|
| 473 |
+
else:
|
| 474 |
+
log.info("Skipping normalization (--skip-normalize).")
|
| 475 |
+
|
| 476 |
+
# ── Step 2 ──
|
| 477 |
+
if not args.skip_trim:
|
| 478 |
+
step_trim(audio_dir, args.threshold, args.margin_ms, args.dry_run)
|
| 479 |
+
else:
|
| 480 |
+
log.info("Skipping trimming (--skip-trim).")
|
| 481 |
+
|
| 482 |
+
# ── Step 3 ──
|
| 483 |
+
if not args.skip_verify:
|
| 484 |
+
step_verify(audio_dir)
|
| 485 |
+
else:
|
| 486 |
+
log.info("Skipping verification (--skip-verify).")
|
| 487 |
+
|
| 488 |
+
print("\n" + "=" * 70)
|
| 489 |
+
log.info("Pipeline complete.")
|
| 490 |
+
print("=" * 70)
|
| 491 |
|
| 492 |
|
| 493 |
if __name__ == "__main__":
|
sound_audios/bip_sound_unlock_door/PX_52.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b8318a65ad423888966adae937cd5f1093e6c627bfdb32f2b249b5637d6263a9
|
| 3 |
+
size 87232
|
sound_audios/bipping_ecg/PX_51.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2294d791421926a17a33a983ff0fc3d1ac11e2ac5ae0d67f226c46ea90febfbb
|
| 3 |
+
size 327616
|
sound_audios/close_book/PX_53.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87f24acd4337767d9108549da61b5409718910e09316d8142e89013f6358af57
|
| 3 |
+
size 48044
|
sound_audios/close_book/PX_54.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:672ce31510bdf7306154aab745dd2510fe7b9dd7a5c5af788b97652ef8161e54
|
| 3 |
+
size 13804
|
sound_audios/close_door/I12P_38.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d9105a450cb9fc5ab73d10d389920f43f5f3eeb77c2ada8b4405d3a8fc1a200
|
| 3 |
+
size 44204
|
sound_audios/close_door/I12P_40.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8750f44545a6b312f4f3e06a3f4143748be9345ad84bbe723dc44aef11f21825
|
| 3 |
+
size 24684
|
sound_audios/close_door/I12P_45.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef78e635c5335ee3878137ac0134d544ab9c3af49c9916a0aec91030feb47a48
|
| 3 |
+
size 173324
|
sound_audios/close_metallic_closet/PX_93.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc8a3b733a36fd5d5e5bb23ae0c0a20159983a7fe219ea2e516875e718b24c4a
|
| 3 |
+
size 174552
|
sound_audios/close_metallic_drawer/PX18_30.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5872c8cf9a8a93ac5faf0a5d6f6eccc72a103e08b534c0e50485752e77f8c88e
|
| 3 |
+
size 153324
|
sound_audios/close_metallic_drawer/PX19_50.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:65ee3da0161195e4c9950585bf43a67eced3342e2a3967b6f662cf7f35703b41
|
| 3 |
+
size 328364
|
sound_audios/close_metallic_drawer/PX_88.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e69583fc3be5a626747314c977cde52ad4d1a9f62a21371831e46abad8bd51c7
|
| 3 |
+
size 74604
|
sound_audios/close_metallic_drawer/PX_89.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04b446d3e022fd63bf4a569f63ebfb5bca3d765fb61c15e56e69822715493904
|
| 3 |
+
size 80684
|
sound_audios/close_microwave_door/PX_61.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c1ef8da4223035ca5677cd72fb3b12f44935a940b2f6858874cf3cc2e3252af
|
| 3 |
+
size 39404
|
sound_audios/close_plastic_drawer/PX_115.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6753b6923eab303b18453d623a9542afd385e38b872cea3164dfb7c9f7807e36
|
| 3 |
+
size 32364
|
sound_audios/close_wooden_drawer/PX0_30.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:51b4ca613f5193d4aabb5f252df4e905cb4a7bb4b4a2232c6dab7a67e78f5d03
|
| 3 |
+
size 105964
|
sound_audios/close_wooden_drawer/PX1_50.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4204faeff89d7135e9452da06beee6f0457f169420396bc713de8333960ac14b
|
| 3 |
+
size 128044
|
sound_audios/elevator_door_close/PX_67.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4a7dc26ea19479789995ec1f75a90cc1c1fb2d0a2ac01b890b7eb80ed389888c
|
| 3 |
+
size 267072
|
sound_audios/elevator_door_open/PX_68.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e19d3a9e5d09338c6b11415580cbddeb92da43688d7f015ac85f958219700b27
|
| 3 |
+
size 247404
|
sound_audios/fast_keyboard_typing/PX_77.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e63ff7540856cac2d2b5dbbb94f7183f81a546e4c152c135b149b3907e614471
|
| 3 |
+
size 297964
|
sound_audios/fast_keyboard_typing/PX_78.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:682fd6c27cc858564573c612771104c88a84b732ffd4a19ca08101f10409720f
|
| 3 |
+
size 394604
|
sound_audios/fast_keyboard_typing/PX_79.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4e95c5d138f8d2b376b29fdc72312f313cfcdc17569171e24837f81465f8a0af
|
| 3 |
+
size 345324
|
sound_audios/fast_keyboard_typing/PX_80.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0359fb82e45f374e602d71cab87b00331fc74e66ef6cedd35b1697a90417e903
|
| 3 |
+
size 332844
|
sound_audios/filling_cup_with_water/PX_136.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4f6ad9b6838d9af4dda3c03fa5a96b1a4298ca7a46e730a6f2cb67c58c44043
|
| 3 |
+
size 387500
|
sound_audios/filling_cup_with_water/PX_137.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b445e22815a27a0b16778b88e42aea2d9330fc96ff8d5167333cd60ad9ee763b
|
| 3 |
+
size 424364
|
sound_audios/filling_cup_with_water/PX_138.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf18993b93a81569bd33861f5f6c6fd3d7c5bd6c424c2546d5598e1c0c2925ec
|
| 3 |
+
size 123628
|
sound_audios/filling_cup_with_water/PX_139.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a55b8c81b233ecd43ac4c0fb4bcdddc6e8218bd41be2596dc15e8ba49a006b3
|
| 3 |
+
size 204844
|
sound_audios/hand_dryer/PX_70.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2fb5f0cac8a8e184861d958ede20a072cf4af61402218c1f78f06756dcd3bb39
|
| 3 |
+
size 897644
|
sound_audios/hanging_up_landline_telephone/PX_81.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:58a9305cc6a670e1d224c5b9e07228b45f45fda3365298ed94fb36832717463e
|
| 3 |
+
size 50604
|
sound_audios/keyboard_typing/PX2_30.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:11bbea325dce2f7a14352b2ccbf1db81184b1a611296b7923501bb944c5be4a3
|
| 3 |
+
size 1045804
|
sound_audios/keyboard_typing/PX3_50.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1239daad792aadd4e4b7c3b2ddef9547d5b0b1dd6b1c7eb6ac56830ef3e9d00
|
| 3 |
+
size 1479596
|
sound_audios/keyboard_typing/PX4_50.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a28ff857c91c683423b3e600b73e8a0776f9458b6322406cd2a4cc6e8f6b99fd
|
| 3 |
+
size 1424684
|
sound_audios/keyboard_typing/PX5_30.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:de7a2639652e0c1edb338e8f7701f04d44244704f8b666f228e5dde102901867
|
| 3 |
+
size 1239404
|
sound_audios/keyboard_typing/PX_71.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae2937c6a5c1678f518865ae7318db3d738757519dbe948bd6b852d6b08fbe0d
|
| 3 |
+
size 210924
|
sound_audios/keyboard_typing/PX_72.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:501af9c5c6baa75db76c120abe0224254d86e541459b3a04fa28b1ca93a65675
|
| 3 |
+
size 274284
|
sound_audios/knock_door/I12P_1.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c47819da1dc42864943048e377c883cefce4679b79ec48671cc685efd6bf3288
|
| 3 |
+
size 121964
|
sound_audios/knock_door/I12P_43.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:569369ebfa1eb712f848f8bd5e512524adfed9fce04050d862b7ddc3e7611d7e
|
| 3 |
+
size 106124
|
sound_audios/knock_door/I12P_46.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:516914a47e1e4c69acecb610ed32d34387a7f5be6de93366e58400f0d1a24944
|
| 3 |
+
size 44364
|
sound_audios/knock_door/I12P_47.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1875979f2d7906e88a2395a5cccef042b6b858bedd885cc9e11d7f1b60675469
|
| 3 |
+
size 42284
|
sound_audios/lighter/PX_83.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:34874ff32cc665f92d5df60f4c042fdf531069e32252362fd8deddc907b85e79
|
| 3 |
+
size 8684
|
sound_audios/lighter/PX_84.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2a0b6bf2a2c417f63471b8b90b13fe6da0346624b4752c8ad53a43d8c3e4fed2
|
| 3 |
+
size 12204
|
sound_audios/lighter/PX_85.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:290bb10ee7cbb65e10682164b08f6d5d91478f6be66ade120f8da0fa08aaf92d
|
| 3 |
+
size 82200
|
sound_audios/machine_bipping/PX_50.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b37aff49ab84fd13f5bc10bda54609da6ccb54943506f4f114f34987925f7d21
|
| 3 |
+
size 220800
|
sound_audios/marker_cap_action/PX_86.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e38aa555918ef2bd9d68e9cb4294f5ba22332f9d161aa614c38b3e548bca42c4
|
| 3 |
+
size 8684
|
sound_audios/marker_cap_action/PX_87.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:66b5b90f519958f0600aac15a1a613af9755cd9f283f29459fb07fb388760023
|
| 3 |
+
size 8684
|
sound_audios/mouse_clicking/PX_96.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c83ae18a94c4417184802343a2d4c771bd0f226e006f8bcc2fea86146d28c9b4
|
| 3 |
+
size 227884
|
sound_audios/mouse_clicking/PX_97.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f50d7ddfa0f7f88ba17f515db00209eee12feef36fc725cd1623a13a2f84fcbd
|
| 3 |
+
size 204844
|
sound_audios/moving_pen_tool_metal_holder/PX10_50.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b9dbd09d0cacfab7d8b9a660fc01d5c03d4f5b16c7eca42e1aa2a8c974c7866
|
| 3 |
+
size 202540
|
sound_audios/moving_pen_tool_metal_holder/PX11_30.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a22118ebfcfdaae7471cb1d92876d971ae53019e911a449f68a065761c4af49c
|
| 3 |
+
size 177324
|
sound_audios/moving_pen_tool_metal_holder/PX12_50.wav
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:478fb07a11b325c6302841ba829d356fd96016a7959e7489eb36db3607e4323f
|
| 3 |
+
size 137644
|