Spaces:
Sleeping
Sleeping
arslanarjumand
commited on
Commit
•
6ec9e0e
1
Parent(s):
0bb6852
Update wav2vec_aligen.py
Browse files- wav2vec_aligen.py +4 -4
wav2vec_aligen.py
CHANGED
@@ -44,10 +44,10 @@ def speaker_pronunciation_assesment(audio_path):
|
|
44 |
input_values = load_audio(audio_path, processor)
|
45 |
result_scores = get_emissions(input_values, model)
|
46 |
|
47 |
-
pronunciation_score = validate_range(
|
48 |
-
fluency_score = validate_range(
|
49 |
-
total_score = validate_range(
|
50 |
-
content_scores = validate_range(
|
51 |
|
52 |
|
53 |
|
|
|
44 |
input_values = load_audio(audio_path, processor)
|
45 |
result_scores = get_emissions(input_values, model)
|
46 |
|
47 |
+
pronunciation_score = validate_range(result_scores[0].cpu().item(), 5)
|
48 |
+
fluency_score = validate_range(result_scores[1].cpu().item(), 12)
|
49 |
+
total_score = validate_range(result_scores[2].cpu().item(), 5)
|
50 |
+
content_scores = validate_range(result_scores[3].cpu().item(), 7)
|
51 |
|
52 |
|
53 |
|