Skip to content

Commit ea5b789

Browse files
committed
Update types
1 parent 158c707 commit ea5b789

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/models/pyannote/feature_extraction_pyannote.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export class PyAnnoteFeatureExtractor extends FeatureExtractor {
5252

5353
let current_speaker = -1;
5454
for (let i = 0; i < scores.length; ++i) {
55+
/** @type {number[]} */
5556
const probabilities = softmax(scores[i]);
5657
const [score, id] = max(probabilities);
5758
const [start, end] = [i, i + 1];

src/models/whisper/feature_extraction_whisper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class WhisperFeatureExtractor extends FeatureExtractor {
4444
)
4545

4646
const data = features.data;
47-
const maxValue = max(data)[0];
47+
const maxValue = max(/** @type {Float32Array} */(data))[0];
4848

4949
for (let i = 0; i < data.length; ++i) {
5050
data[i] = (Math.max(data[i], maxValue - 8.0) + 4.0) / 4.0;

0 commit comments

Comments
 (0)