scribe-widget 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/scribe-widget.es.js
CHANGED
|
@@ -21266,7 +21266,7 @@ class AudioFileManager {
|
|
|
21266
21266
|
type: AUDIO_EXTENSION_TYPE_MAP[OUTPUT_FORMAT]
|
|
21267
21267
|
});
|
|
21268
21268
|
console.log("Uploading to URL:", this.uploadUrl, "filename:", s);
|
|
21269
|
-
const _ = uploadFileWithFormData(this.uploadUrl, s,
|
|
21269
|
+
const _ = uploadFileWithFormData(this.uploadUrl, s, $, this.uploadHeaders).then((j) => {
|
|
21270
21270
|
var nt;
|
|
21271
21271
|
return j.success ? (this.successfulUploads.push(s), c !== -1 && this.audioChunks[c] && (this.audioChunks[c] = {
|
|
21272
21272
|
...this.audioChunks[c],
|
|
@@ -21316,7 +21316,7 @@ class AudioFileManager {
|
|
|
21316
21316
|
});
|
|
21317
21317
|
}
|
|
21318
21318
|
if (nt) {
|
|
21319
|
-
const et = uploadFileWithFormData(this.uploadUrl, h, nt).then((b) => {
|
|
21319
|
+
const et = uploadFileWithFormData(this.uploadUrl, h, nt, this.uploadHeaders).then((b) => {
|
|
21320
21320
|
var a;
|
|
21321
21321
|
return b.success && (this.successfulUploads.push(h), this.audioChunks[c] = {
|
|
21322
21322
|
...this.audioChunks[c],
|
|
@@ -35422,11 +35422,9 @@ class VadWebClient {
|
|
|
35422
35422
|
(b = this.audioFileManager) == null || b.incrementTotalRawSamples($), (a = this.audioBufferManager) == null || a.append($);
|
|
35423
35423
|
const { isSpeech: _ } = h;
|
|
35424
35424
|
let j = 0;
|
|
35425
|
-
_ >= 0.5 && (j = 1), this.checkNoSpeech(j)
|
|
35426
|
-
const nt = this.processVadFrame(j), et = nt[0];
|
|
35427
|
-
if (console.log("is clip point:", et, " at index:", nt[1]), et) {
|
|
35425
|
+
if (_ >= 0.5 && (j = 1), this.checkNoSpeech(j), this.processVadFrame(j)[0]) {
|
|
35428
35426
|
const d = (o = this.audioBufferManager) == null ? void 0 : o.getAudioData();
|
|
35429
|
-
|
|
35427
|
+
d && this.processAudioChunk({ audioFrames: d });
|
|
35430
35428
|
}
|
|
35431
35429
|
},
|
|
35432
35430
|
onSpeechStart: () => {
|
|
@@ -35460,7 +35458,7 @@ class VadWebClient {
|
|
|
35460
35458
|
status: "pending",
|
|
35461
35459
|
audioFrames: e
|
|
35462
35460
|
}, j = this.audioFileManager.updateAudioInfo(_);
|
|
35463
|
-
this.audioFileManager.incrementInsertedSamples(this.audioBufferManager.getCurrentSampleLength(), this.audioBufferManager.getCurrentFrameLength()), this.audioBufferManager.resetBufferState(),
|
|
35461
|
+
this.audioFileManager.incrementInsertedSamples(this.audioBufferManager.getCurrentSampleLength(), this.audioBufferManager.getCurrentFrameLength()), this.audioBufferManager.resetBufferState(), await this.audioFileManager.uploadAudio({
|
|
35464
35462
|
audioFrames: e,
|
|
35465
35463
|
fileName: c,
|
|
35466
35464
|
chunkIndex: j - 1
|