Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
- addressed threshold min handling when key isn't used by user
- Added back in try-catch block when generating local score arrays
  • Loading branch information
JacobGlennAyers committed Jan 10, 2024
1 parent a6686e0 commit 5b43c74
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions PyHa/IsoAutio.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ def stack_isolate(
time_per_score = samples_per_score / SAMPLE_RATE

# Calculating local scores that are at or above threshold
thresh_scores = local_scores >= max(thresh, isolation_parameters["threshold_min"])
thresh_scores = local_scores >= max(thresh, threshold_min)

# Set up to find the starts and ends of clips
thresh_scores = np.append(thresh_scores, [0])
Expand Down Expand Up @@ -1343,13 +1343,13 @@ def generate_automated_labels_template_matching(
continue

# generating local score array from clip
#try:
local_score_arr = template_matching_local_score_arr(SIGNAL, SAMPLE_RATE, TEMPLATE_spec, n, TEMPLATE_std_dev)
#except KeyboardInterrupt:
# exit("Keyboard Interrupt")
#except BaseException:
# checkVerbose("Failed to collect local score array of " + audio_file, isolation_parameters)
# continue
try:
local_score_arr = template_matching_local_score_arr(SIGNAL, SAMPLE_RATE, TEMPLATE_spec, n, TEMPLATE_std_dev)
except KeyboardInterrupt:
exit("Keyboard Interrupt")
except BaseException:
checkVerbose("Failed to collect local score array of " + audio_file, isolation_parameters)
continue

# passing through isolation technique
try:
Expand Down

0 comments on commit 5b43c74

Please sign in to comment.