karlhajal commited on
Commit
c5b2ff8
·
verified ·
1 Parent(s): 4cc8f75

Add wav_type argument to assess_pronunciation_quality

Browse files
Files changed (1) hide show
  1. src/audio_preprocessing.py +2 -2
src/audio_preprocessing.py CHANGED
@@ -120,9 +120,9 @@ def get_red_green_segments(dist_matrix, path, wav_type='ref', threshold=0.4):
120
  return red_segments, green_segments, wav_distances
121
 
122
 
123
- def assess_pronunciation_quality(dist_matrix, path, threshold=0.4):
124
  # _ is green_segments
125
- red_segments, _, wav_distances = get_red_green_segments(dist_matrix, path, wav_type=None, threshold=threshold)
126
 
127
  # Analyze normalized distances
128
  num_red_segments = len(red_segments)
 
120
  return red_segments, green_segments, wav_distances
121
 
122
 
123
+ def assess_pronunciation_quality(dist_matrix, path, threshold=0.4, wav_type="ref"):
124
  # _ is green_segments
125
+ red_segments, _, wav_distances = get_red_green_segments(dist_matrix, path, wav_type=wav_type, threshold=threshold)
126
 
127
  # Analyze normalized distances
128
  num_red_segments = len(red_segments)