microsoft / cognitive-services-speech-sdk-js

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

Fix Division by Zero Error in audioOffsetMs Calculation #857

Closed motamed closed 1 month ago

motamed commented 2 months ago

This pull request addresses a potential division by zero error in the calculation of audioOffsetMs within the ServiceRecognizerBase.ts file. The fix ensures that if this.privAverageBytesPerMs is zero, audioOffsetMs is set to zero instead of attempting to perform the division.

UAT Tracker ID : 304110

Changes Made:

Code Changes:

const audioOffsetMs: number = this.privAverageBytesPerMs != 0 ? bytesSent / this.privAverageBytesPerMs : 0;

Tested Scenario:

motamed commented 2 months ago

@hkamel

motamed commented 2 months ago

any updates on this ?

rhurey commented 1 month ago

The linter error'd out... D:\a_work\1\s\src\common.speech\ServiceRecognizerBase.ts 669:66 error Expected '!==' and instead saw '!='

(Looking at why the pipeline results aren't showing up)

motamed commented 1 month ago

The linter error'd out... D:\a_work\1\s\src\common.speech\ServiceRecognizerBase.ts 669:66 error Expected '!==' and instead saw '!='

(Looking at why the pipeline results aren't showing up)

I updated the code accordingly

rhurey commented 1 month ago

/azp run

azure-pipelines[bot] commented 1 month ago
Azure Pipelines successfully started running 1 pipeline(s).
rhurey commented 1 month ago

/azp run

azure-pipelines[bot] commented 1 month ago
Azure Pipelines successfully started running 1 pipeline(s).
rhurey commented 1 month ago

Pipeline is failing because of ADO config. Manual build 149400 passed

motamed commented 1 month ago

Quick question how does the release cycle work? and when is the next release?

rhurey commented 1 month ago

We generally release every couple months. The current release (1.41) should go live in the next day.