microsoft / cognitive-services-speech-sdk-js

Microsoft Azure Cognitive Services Speech SDK for JavaScript
Other
267 stars 101 forks source link

[Bug]: Division by Zero Error in audioOffsetMs Calculation #858

Open motamed opened 2 months ago

motamed commented 2 months ago

What happened?

Description:

There is a potential division by zero error in the calculation of audioOffsetMs within the ServiceRecognizerBase.ts file. This issue occurs when this.privAverageBytesPerMs is zero, leading to a runtime error.

Tested Scenario:

const audioOffsetMs: number = bytesSent / this.privAverageBytesPerMs;

Version

1.36.0 (Latest)

What browser/platform are you seeing the problem on?

PowerApps PCF

Relevant log output

ConversationTranscriptionCanceledEventArgs {privSessionId: '653442B08C524EA4ADDB66A19C992187', privOffset: undefined, privReason: 0, privErrorDetails: 'Could not deserialize speech context. websocket error code: 1007', privErrorCode: 2}
motamed commented 2 months ago

@hkamel

motamed commented 1 month ago

any updates on this ?