SevKod commited on
Commit
47e5a47
·
1 Parent(s): 323b249

audio trimming and adding up to normalizer

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. normalizer_audios.py +391 -153
  2. sound_audios/bip_sound_unlock_door/PX_52.wav +2 -2
  3. sound_audios/bipping_ecg/PX_51.wav +2 -2
  4. sound_audios/close_book/PX_53.wav +2 -2
  5. sound_audios/close_book/PX_54.wav +2 -2
  6. sound_audios/close_door/I12P_38.wav +2 -2
  7. sound_audios/close_door/I12P_40.wav +2 -2
  8. sound_audios/close_door/I12P_45.wav +2 -2
  9. sound_audios/close_metallic_closet/PX_93.wav +2 -2
  10. sound_audios/close_metallic_drawer/PX18_30.wav +2 -2
  11. sound_audios/close_metallic_drawer/PX19_50.wav +2 -2
  12. sound_audios/close_metallic_drawer/PX_88.wav +2 -2
  13. sound_audios/close_metallic_drawer/PX_89.wav +2 -2
  14. sound_audios/close_microwave_door/PX_61.wav +2 -2
  15. sound_audios/close_plastic_drawer/PX_115.wav +2 -2
  16. sound_audios/close_wooden_drawer/PX0_30.wav +2 -2
  17. sound_audios/close_wooden_drawer/PX1_50.wav +2 -2
  18. sound_audios/elevator_door_close/PX_67.wav +2 -2
  19. sound_audios/elevator_door_open/PX_68.wav +2 -2
  20. sound_audios/fast_keyboard_typing/PX_77.wav +2 -2
  21. sound_audios/fast_keyboard_typing/PX_78.wav +2 -2
  22. sound_audios/fast_keyboard_typing/PX_79.wav +2 -2
  23. sound_audios/fast_keyboard_typing/PX_80.wav +2 -2
  24. sound_audios/filling_cup_with_water/PX_136.wav +2 -2
  25. sound_audios/filling_cup_with_water/PX_137.wav +2 -2
  26. sound_audios/filling_cup_with_water/PX_138.wav +2 -2
  27. sound_audios/filling_cup_with_water/PX_139.wav +2 -2
  28. sound_audios/hand_dryer/PX_70.wav +2 -2
  29. sound_audios/hanging_up_landline_telephone/PX_81.wav +2 -2
  30. sound_audios/keyboard_typing/PX2_30.wav +2 -2
  31. sound_audios/keyboard_typing/PX3_50.wav +2 -2
  32. sound_audios/keyboard_typing/PX4_50.wav +2 -2
  33. sound_audios/keyboard_typing/PX5_30.wav +2 -2
  34. sound_audios/keyboard_typing/PX_71.wav +2 -2
  35. sound_audios/keyboard_typing/PX_72.wav +2 -2
  36. sound_audios/knock_door/I12P_1.wav +2 -2
  37. sound_audios/knock_door/I12P_43.wav +2 -2
  38. sound_audios/knock_door/I12P_46.wav +2 -2
  39. sound_audios/knock_door/I12P_47.wav +2 -2
  40. sound_audios/lighter/PX_83.wav +2 -2
  41. sound_audios/lighter/PX_84.wav +2 -2
  42. sound_audios/lighter/PX_85.wav +2 -2
  43. sound_audios/machine_bipping/PX_50.wav +2 -2
  44. sound_audios/marker_cap_action/PX_86.wav +2 -2
  45. sound_audios/marker_cap_action/PX_87.wav +2 -2
  46. sound_audios/mouse_clicking/PX_96.wav +2 -2
  47. sound_audios/mouse_clicking/PX_97.wav +2 -2
  48. sound_audios/moving_pen_tool_metal_holder/PX10_50.wav +2 -2
  49. sound_audios/moving_pen_tool_metal_holder/PX11_30.wav +2 -2
  50. 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
- Normalize the energy (RMS level) of all sound event audio files so they
4
- share a consistent loudness. This is useful before mixing events into
5
- background audio at a controlled SNR.
 
 
 
 
 
 
 
6
 
7
  Usage examples
8
  --------------
9
- # Normalize all events to -20 dBFS RMS (default), save to a new folder:
10
- python normalize_snr.py
 
 
 
11
 
12
- # Normalize to -25 dBFS RMS:
13
- python normalize_snr.py --target-db -25
14
 
15
- # Peak-normalize to -1 dBFS instead of RMS:
16
- python normalize_snr.py --mode peak --target-db -1
17
 
18
- # Overwrite originals in-place:
19
- python normalize_snr.py --inplace
20
 
21
- # Show per-file stats without writing anything:
22
- python normalize_snr.py --dry-run
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
- # ── helpers ──────────────────────────────────────────────────────────────────
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 normalize(signal: np.ndarray, current_db: float, target_db: float) -> np.ndarray:
61
- """Scale *signal* so its level moves from *current_db* to *target_db*."""
62
  if current_db == -np.inf:
63
- return signal # silence – nothing to scale
64
- gain_db = target_db - current_db
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
- if args.inplace:
125
- output_dir = input_dir
126
- elif args.output_dir:
127
- output_dir = Path(args.output_dir).resolve()
128
- else:
129
- output_dir = input_dir.parent / (input_dir.name + "_normalized")
130
 
131
- measure_fn = rms_db if args.mode == "rms" else peak_db
132
- mode_label = "RMS" if args.mode == "rms" else "Peak"
 
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
- sys.exit(1)
139
 
140
- log.info("Found %d .wav files under %s", len(wav_files), input_dir)
141
- log.info("Mode: %s | Target: %.1f dBFS", mode_label, args.target_db)
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_{args.mode}_db": round(orig_db, 2),
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
- # Normalize
178
- normed = normalize(signal, orig_db, args.target_db)
179
- new_db = measure_fn(normed if normed.ndim == 1 else normed.mean(axis=1))
180
- new_peak = peak_db(normed if normed.ndim == 1 else normed.mean(axis=1))
181
-
182
  if new_peak >= 0.0:
183
  n_clipped += 1
184
 
185
- entry[f"new_{args.mode}_db"] = round(new_db, 2)
186
  entry["new_peak_db"] = round(new_peak, 2)
187
- entry["gain_db"] = round(args.target_db - orig_db, 2)
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 args.dry_run:
201
- dst = output_dir / rel
202
- dst.parent.mkdir(parents=True, exist_ok=True)
203
- sf.write(str(dst), normed, sr, subtype="PCM_16")
204
 
205
- # ── Summary ──────────────────────────────────────────────────────────
206
- orig_levels = [s[f"original_{args.mode}_db"] for s in stats
207
- if s["status"] == "ok"]
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.min(orig_levels),
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.min(new_levels),
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
- # Write stats JSON next to the output
235
- if not args.dry_run:
236
- stats_path = output_dir / "normalization_stats.json"
237
  with open(stats_path, "w") as f:
238
  json.dump(
239
- {
240
- "mode": args.mode,
241
- "target_db": args.target_db,
242
- "n_files": len(wav_files),
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
- log.info("Done.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:6722022c577eb1af67cf6d83d66c3eb8634d32e75e93fe1058c2dd89b50c45e1
3
- size 120192
 
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:8c3698b03743af67ae9bbb70fc4e4060fffb0da92bdbbe6b84ff758075490003
3
- size 341376
 
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:86c01dc7a9d23ad051d3b2b77fe96935e5c8bfd6968a67ebac89737b7578dfb2
3
- size 84696
 
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:e22b496c27d777ef4290a5b086d2b54e3fb08d8b40deaed07f758b3a4e709b33
3
- size 71040
 
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:100577fab6911ae5c936b2a3926c6423a3f996cd20d12b4381be2acb40d70d62
3
- size 82250
 
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:1c692e7c2e39e8468ce758baddd4a306a642e51a62bda1e54f0fe3d3b2f98e17
3
- size 82490
 
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:1e16f65e6a5cd9361ff101891c4862bd5249627b38250ac2f87bb594ddbc615d
3
- size 354220
 
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:ba62c2218b4c86d9012a2e355f97a4f63fa375c4046c4af60109df3ec875782f
3
- size 191192
 
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:9f875c11e1a779c0be51458be832a74a61b8d4c75b740206a202bde23fad5844
3
- size 309292
 
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:fb5f9006113c2cdfd8fbbbdbb96189c7063c71d4e48a1c0ec4685151f72c893b
3
- size 348204
 
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:ca3be3b129f62d37a322d546751e5717bd849b06fcd0fbcc2c3b3cb77a9a7d19
3
- size 136576
 
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:d490cc696c19b7dcf8be542a2cd6c95fb6fc62450401ceb1217fa4e7f20edb4c
3
- size 122924
 
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:af9d14d780c944203e401e59098631cd2afb26caeda8bc0e2333c3521304df41
3
- size 136576
 
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:4635f24991992ec56807372e7677a930bc65f9e27c21b9d17a325c7ead7d34ce
3
- size 122924
 
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:0db89905a6e8744585f0a0ebe25e8b78f579fa12790a91f9271ce1b4d3d3919c
3
- size 297004
 
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:c7bd5bcad38741849b20d1adfcd092ccd3f5147e24a130586d7c75673faa011f
3
- size 235564
 
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:e9c90244d544242a70393004c06e7b1b372f461e81dc72ac84a04187db333e4e
3
- size 284032
 
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:cb5147b9c4370a345d0e6f90b5736f4a055b22c93f8ba82822e832abc20a083d
3
- size 303148
 
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:5fee430907b5d0dedb44e82ad9fe7660d7da417c49cc1ece3b7993c55ae46446
3
- size 324992
 
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:98ab6c80929fd9bfd6c9309369f8e3625cf7e7c8b491fcff6d455b2d3dd3411c
3
- size 417836
 
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:7f65cc5682ef972499185b07a982daa1737d0f8435f0ed0f935487d4eaf626d3
3
- size 461528
 
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:2162ff4458ff614dc8645cdddf779c6c18fde1bac92ef7e845f2a9db57955085
3
- size 431488
 
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:d27499d3a4d25926428af710b0d46ae3ac5573bd7670f981e3adbdad40074708
3
- size 475180
 
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:a9d1289260913555d24e22ecde64e1a5dedfa66c681894dff26ef4eaa082f8d7
3
- size 559832
 
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:978d6a68568887ee9ab5920979b3546bd34154e7f2875d1c0b6ea0f2673fcca2
3
- size 139308
 
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:70cf696390b26f06ee1de23dd62e789f3f6e1e5a58756eadbf845a79b2315aa7
3
- size 294956
 
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:729f315a4610d50a976f2e7e483b943f309b3d6564af8d51162c0df54e234b0a
3
- size 950316
 
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:ffbbb9a70e3d53b0635b22d15d6a7673816e39dee30236446d2e440dda92b927
3
- size 202112
 
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:56df475bf076d48d061baee539bb27b1bd9dbc07544e8fbbed98f9617c46b1c1
3
- size 1247276
 
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:b8fb3c84203b333cecedc2baf3f1c047fe11360f21452da0e7605c9bdd711edb
3
- size 1503276
 
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:628d0bfc7ca53eac9499593607c7adbb2c67d8c003197d9eb49e8037eacd3129
3
- size 1476652
 
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:920b8f20447eb81034a0ba9d0c49f8bfa81f0fe161db6ecf3b11e877730b117e
3
- size 1368108
 
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:d4367bb9e6d28009cb6671fd0a4fe60e2b0761f9f2f53e04acaaf8fec905876c
3
- size 303148
 
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:2d3f9e7ca18a34efd5f99ccfbcf830426127aec5508e4214e8fd4d3b9f6a58d4
3
- size 395992
 
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:1a3f827c1841804ffd944bdbe4b36130e16ddef04f00368b01e889b1a62cd4e4
3
- size 280492
 
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:89dcd952fb4d41b415a92f2d1d62b8a9613be389676eb228f5f2b93d4799335e
3
- size 288684
 
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:b5017dc29f6f3975bfcb112d26746b771e97c299226587262fb2c0ae7b325a43
3
- size 66750
 
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:e198c9f9e6ddc0a0ddf9ed99cbe928f8499919b2b7c884bb82b3f9a6c5c4f497
3
- size 62600
 
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:9cef6ba68f91d5946bd654c4cceaed297f4afa97a2884e4bf051dc9fb568b4f3
3
- size 139308
 
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:eeb72271ad6c426d414e32e398ec6b106939d25afdfdde87c59954cad7adaecf
3
- size 60120
 
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:92a6dd7c932049d510839e99cffd3fcde0372343bdd8b58c354348ff55a044c3
3
- size 101080
 
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:8c695afd137956621cb7943080dc192c39cd679e6c2ef6b7995aca8716429346
3
- size 234880
 
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:76715bf0fc477dfea27fe0c27304e8b1b6968b826f86dbb02eb25284be9da959
3
- size 51928
 
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:6acb87ecd017c57fcf62da00acf9d5289d68a3f730347c20ef9da6fc29315d63
3
- size 76504
 
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:c567c74f32ff345066d7e2ee12e03e1292d89041cb5ae2ea2187706f1f971cf4
3
- size 294956
 
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:8e66fbe5b86dbd274f6cf9532b7c61cb471c367ea90cd11197ba3657c13383f5
3
- size 273112
 
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:6330aa10bfa1fdc1b9bd9eb5dc316a10cfd9aff28cab788568e292b7ca24cb0a
3
- size 219180
 
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:56e8d43458f2a1b549e60ec13b28661bc88f6af22b3564f66527aa922a0540cd
3
- size 194604
 
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:a4a207c0a0bd84bf1d3ac31431dae2a16b1459c5cab725965b4179e8bf1d86f0
3
- size 184364
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:478fb07a11b325c6302841ba829d356fd96016a7959e7489eb36db3607e4323f
3
+ size 137644