From b96870d7ed0fe1d33b3706ec902d69475060f646 Mon Sep 17 00:00:00 2001 From: hexahigh <97455552+hexahigh@users.noreply.github.com> Date: Mon, 11 Sep 2023 14:30:43 +0200 Subject: [PATCH] fix audio? --- other/tensor/test1/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/tensor/test1/script.js b/other/tensor/test1/script.js index 8bdbdef..4ae476e 100644 --- a/other/tensor/test1/script.js +++ b/other/tensor/test1/script.js @@ -10,7 +10,7 @@ function preprocessAudio(filename) { // Generate a Mel-scaled spectrogram const spectrogram = tf.tidy(() => { - const audioTensor = tf.browser.fromAudio(audio); + const audioTensor = tf.browser.Audio(audio); const sampleRate = audioTensor.sampleRate(); const melSpectrogram = tf.signal.melSpectrogram(audioTensor, { sampleRate: sampleRate,