Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player class doesn't contain AudioBuffer #544

Open
marcoaccardi opened this issue Mar 15, 2021 · 4 comments
Open

Player class doesn't contain AudioBuffer #544

marcoaccardi opened this issue Mar 15, 2021 · 4 comments

Comments

@marcoaccardi
Copy link

marcoaccardi commented Mar 15, 2021

const mvae = require('@magenta/music/node/music_vae');
const core = require('@magenta/music/node/core');

const player = new core.Player()
const model = new mvae.MusicVAE('https://storage.googleapis.com/magentadata/js/checkpoints/music_vae/mel_2bar_small');

model
  .initialize()
  .then(() => model.sample(1))
  .then(samples => {
    player.resumeContext();
    player.start(samples[0])
  });

I've tried to start off with Magenta and NodeJS, but when I run the script I receive the following error:

ReferenceError: AudioBuffer is not defined

I understand that the issue might be caused by the fact that there is no WebAudio API in the node environment. How can I solve it?

@notwaldorf
Copy link
Collaborator

cc @cannoneyed

@timothywangdev
Copy link

same error

@riaan53
Copy link

riaan53 commented Sep 9, 2021

@marcoaccardi Hi, did you manage to solve this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants