arslanarjumand commited on
Commit
0bb6852
1 Parent(s): 6d87408

Update wav2vec_aligen.py

Browse files
Files changed (1) hide show
  1. 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 = vlaidate_range(round(result_scores[0].cpu().item()), 5)
48
- fluency_score = vlaidate_range(round(result_scores[1].cpu().item()), 12)
49
- total_score = vlaidate_range(round(result_scores[2].cpu().item()), 5)
50
- content_scores = vlaidate_range(round(result_scores[3].cpu().item()), 7)
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(round(result_scores[0].cpu().item()), 5)
48
+ fluency_score = validate_range(round(result_scores[1].cpu().item()), 12)
49
+ total_score = validate_range(round(result_scores[2].cpu().item()), 5)
50
+ content_scores = validate_range(round(result_scores[3].cpu().item()), 7)
51
 
52
 
53