Skip to content

Commit d519102

Browse files
committed
tools: analyze-wav.py: Increase coverage threshold
Increase the coverage threshold for detecting audio glitches. The threshold defines how many frequencies need to be "active" to mark a point as a glitch. The increase of the parameter decreases a chance for a false positive where the spectrogram is "blurry", but doesn't contain glitches. Signed-off-by: Pawel Langowski <pawelx.langowski@intel.com>
1 parent 17253b3 commit d519102

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/analyze-wav.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def detect_vertical_lines(wav_file):
8585
# If the normalised frequency is greater than the threshold, mark it as active.
8686
active_freqs = Sxx_norm > freq_threshold
8787
coverage = np.sum(active_freqs, axis=0) / active_freqs.shape[0]
88-
coverage_threshold = 0.8
88+
coverage_threshold = 0.95
8989
# If coverage exceeds threshold, mark as vertical line.
9090
vertical_lines = np.where(coverage > coverage_threshold)[0]
9191
print(f"Detected possible glitches at time indices: {vertical_lines + trim_samples + non_silent[0]}")

0 commit comments

Comments
 (0)