Spaces:
Sleeping
Sleeping
Add wav_type argument to assess_pronunciation_quality
Browse files
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=
|
| 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)
|