Replies: 1 comment
-
Code: const model = require('@magenta/music/node/music_vae');
const mvae = new model.MusicVAE(
'https://storage.googleapis.com/magentadata/js/checkpoints/music_vae/mel_4bar_med_lokl_q2'
);
export async function generate(temp) {
if (!mvae.isInitialized()) {
await mvae.initialize();
}
const output = await mvae.sample(1, temp);
return output[0];
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use WebWorkers in order to run an expensive operation (getting a model inference from https://magenta.github.io/magenta-js/music/). I keep getting a ReferenceError: 'window' is not defined. Can anyone help?
Beta Was this translation helpful? Give feedback.
All reactions