You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to transcribe speech from a WAV file from the npm package of version 1.38.0.
let sourceFile: File;
// let user pick the file
const audioConfig = AudioConfig.fromWavFileInput(sourceFile);
let speechConfig: SpeechConfig;
// initialize speechConfig
const conversationTranscriber = new ConversationTranscriber(speechConfig, audioConfig);
// subscribe to events in conversationTranscriber
conversationTranscriber.startTranscribingAsync();
For this specific WAV file, it causes an error: problemfile.zip
ERROR RangeError: offset is out of bounds
at Uint8Array.set (<anonymous>)
at R.writeStreamChunk (ChunkedArrayBufferStream.ts:40:24)
at j (FileAudioSource.ts:225:24)
at Y.onload (FileAudioSource.ts:239:21)
at w.invoke (zone.js:372:26)
at Object.onInvoke (ng_zone.ts:423:29)
at w.invoke (zone.js:371:52)
at j.runGuarded (zone.js:144:47)
at FileReader.<anonymous> (zone.js:128:29)
After some investigating, the problem seems to be in the ChunkedArrayBufferStream constructor:
It's getting initialized with the targetChunkSize of 1102.5. This causes problems because it is used to setup byte arrays, which can't have fractional items.
Version
1.36.0 (Latest)
What browser/platform are you seeing the problem on?
Chrome
Relevant log output
logging is not relevant here, the problem is client side
The text was updated successfully, but these errors were encountered:
What happened?
I'm trying to transcribe speech from a WAV file from the npm package of version 1.38.0.
For this specific WAV file, it causes an error:
problemfile.zip
After some investigating, the problem seems to be in the
ChunkedArrayBufferStream
constructor:cognitive-services-speech-sdk-js/src/common/ChunkedArrayBufferStream.ts
Lines 12 to 16 in c12dc56
It's getting initialized with the
targetChunkSize
of1102.5
. This causes problems because it is used to setup byte arrays, which can't have fractional items.Version
1.36.0 (Latest)
What browser/platform are you seeing the problem on?
Chrome
Relevant log output
The text was updated successfully, but these errors were encountered: