We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 158c707 commit ea5b789Copy full SHA for ea5b789
src/models/pyannote/feature_extraction_pyannote.js
@@ -52,6 +52,7 @@ export class PyAnnoteFeatureExtractor extends FeatureExtractor {
52
53
let current_speaker = -1;
54
for (let i = 0; i < scores.length; ++i) {
55
+ /** @type {number[]} */
56
const probabilities = softmax(scores[i]);
57
const [score, id] = max(probabilities);
58
const [start, end] = [i, i + 1];
src/models/whisper/feature_extraction_whisper.js
@@ -44,7 +44,7 @@ export class WhisperFeatureExtractor extends FeatureExtractor {
44
)
45
46
const data = features.data;
47
- const maxValue = max(data)[0];
+ const maxValue = max(/** @type {Float32Array} */(data))[0];
48
49
for (let i = 0; i < data.length; ++i) {
50
data[i] = (Math.max(data[i], maxValue - 8.0) + 4.0) / 4.0;
0 commit comments