aikitty commited on
Commit
82c3cf1
·
verified ·
1 Parent(s): 1ec0e70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -46,7 +46,7 @@ def assess_pronunciation(audio_file):
46
  }
47
  elif result.reason == speechsdk.ResultReason.NoMatch:
48
  print("NOMATCH: Speech could not be recognized.")
49
- return {"Error": "Speech could not be recognized. Please try again with a clearer audio."}
50
  elif result.reason == speechsdk.ResultReason.Canceled:
51
  cancellation_details = speechsdk.CancellationDetails(result)
52
  print(f"CANCELED: Reason={cancellation_details.reason}")
 
46
  }
47
  elif result.reason == speechsdk.ResultReason.NoMatch:
48
  print("NOMATCH: Speech could not be recognized.")
49
+ return {"Error": "There was an error. Speech could not be recognized."}
50
  elif result.reason == speechsdk.ResultReason.Canceled:
51
  cancellation_details = speechsdk.CancellationDetails(result)
52
  print(f"CANCELED: Reason={cancellation_details.reason}")