You can set the system volume like so with JXA:
var app = Application.currentApplication();
app.includeStandardAdditions = true;
app.setVolume(1) // 0 = muted, 7 = full volume
🌟 Was this page helpful? Please let me know with this quick, 3 question survey.