microsoft / muzic

Muzic: Music Understanding and Generation with Artificial Intelligence
MIT License
4.49k stars 438 forks source link

[clamp] The cmd command is only applicable to Windows #193

Open heyingquan0030 opened 6 months ago

heyingquan0030 commented 6 months ago

This code can only run on Windows because other systems do not support the cmd command.

https://github.com/microsoft/muzic/blob/4dc1c56db5f1dead41c845b43fa5fdd9e4448d6f/clamp/clamp.py#L127

I have modified the command locally as follows:

p = subprocess.Popen(['python', 'inference/xml2abc.py', '-m', '2', '-c', '6', '-x', filename], stdout=subprocess.PIPE)

It runs correctly on macOS and I believe this command is also applicable to Windows and other operating systems.

Therefore, I suggest removing cmd /u /c.