Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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.
|
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}")
|