Open coreyward opened 11 months ago
@coreyward Thanks for submitting this issue and using JS Speech SDK. In theory, an InitialSilenceTimeout result should be shunted down a different codepath before attempting to create a PronunciationAssessmentResult, so this does feel like a bug.
What happened?
I ran into an issue where an audio recording sent didn't have any detectable speech in it. I would expect some kind of error message to come back, but what I did not expect is that the SDK would throw an error over it when used as shown in examples.
This is coming from line 108 here: https://github.com/microsoft/cognitive-services-speech-sdk-js/blob/b062648064d9b353b08ec67af0e41f48a9bea4da/src/sdk/PronunciationAssessmentResult.ts#L103-L110
It seems like the types are inaccurate for
j.NBest
. When the Speech Recognizer is handed an audio file that does not have any words in it, the result comes back without any errors, but also rather sparse without many fields includingNBest
. For example:It would be really useful if this behavior (and overall, all of the potential response formats from the API) were documented somewhere accurately. It's hard to build robust applications that fail gracefully when the behavior of dependencies is undocumented.
Using v1.33.1, but the "Version" dropdown in the issue form only lists up to 1.33.0.
Version
1.33.0 (Latest)
What browser/platform are you seeing the problem on?
No response
Relevant log output
No response