Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pipelines/text-to-audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { AutoModel } from '../models.js';

/**
* @typedef {Object} TextToAudioOutput
* @property {Float32Array} audio The generated audio waveform.
* @property {Float32Array|Float32Array[]} audio The generated audio waveform.
* @property {number} sampling_rate The sampling rate of the generated audio waveform.
*
* @typedef {Object} TextToAudioPipelineOptions Parameters specific to text-to-audio pipelines.
Expand Down
1 change: 0 additions & 1 deletion src/utils/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,6 @@ function encodeWAV(chunks, rate) {
/* data chunk length */
view.setUint32(40, totalLength * 4, true);

// @ts-expect-error TS2322
return new Blob([buffer, ...chunks], { type: "audio/wav" });
}

Expand Down
4 changes: 3 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,14 @@ const NODE_EXTERNAL_MODULES = [
"node:fs",
"node:path",
"node:url",
"node:stream",
"node:stream/promises",
];

// Do not bundle node-only packages when bundling for the web.
// NOTE: We can exclude the "node:" prefix for built-in modules here,
// since we apply the `StripNodePrefixPlugin` to strip it.
const WEB_IGNORE_MODULES = ["onnxruntime-node", "sharp", "fs", "path", "url"];
const WEB_IGNORE_MODULES = ["onnxruntime-node", "sharp", "fs", "path", "url", "stream", "stream/promises"];

// Do not bundle the following modules with webpack (mark as external)
const WEB_EXTERNAL_MODULES = ["onnxruntime-common", "onnxruntime-web"];
Expand Down
Loading