mirror of
https://github.com/hexahigh/games.git
synced 2025-12-11 20:15:38 +01:00
fix audio?
This commit is contained in:
parent
b720850abe
commit
b96870d7ed
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user