Could you explain the advantages and disadvantages of using the ARC JavaScript command Audio.playAudioFile() inside an ARC script?
For context: I'm running ARC on the robot's onboard PC and all of my sound files are stored locally on that same computer (i.e., PC-connected audio, not on an EZB). I'm using ARC scripting (JavaScript) to trigger audio playback from within an ARC project. Would using Audio.playAudioFile() remove the need to use the Soundboard/PC soundboard Robot Skill(s) in ARC if all sound files are local to the ARC PC?
A couple of my personal thoughts to clarify my question:
- I suspect it might be harder to manually write scripts and keep audio files organized without ARC’s Soundboard Robot Skill(s) managing them.
- I also suspect that if I have many sound files, calling them directly with Audio.playAudioFile() might keep my ARC project smaller (fewer robot skill configurations).
I'm looking for a comparison specifically in the context of ARC Robot Skills and JavaScript scripting (no need to discuss EZB hardware here, since audio is local to the ARC PC).

Yes - if the audio files are local on the ARC PC, then
Audio.playAudioFile()can absolutely replace the need for the Soundboard (PC) skill in many projects.That said, there’s a better default approach in ARC depending on what you need:
Use
Audio.playAudioFile()when you want:Use the Soundboard (PC) skill when you want:
ControlCommand()support for play/stop/countComparison
Audio.playAudioFile()Advantages
Disadvantages
Example:
Soundboard (PC) skill
Advantages
ControlCommand()like Play, Stop, Random, CountDisadvantages
Practical guidance
If your robot project is mostly script-driven and the sounds are local files, then
Audio.playAudioFile()is the cleaner choice.If your goal is more like a sound library or operator console, then the Soundboard skill is the better tool.
My recommendation
For your case, I’d say:
Audio.playAudioFile()for direct scripted playbackThat is the more standard ARC approach for a JavaScript-driven robot project.
One important note
If you use raw file paths, keep them consistent and organized in one folder, such as:
That makes script maintenance much easier.
A simple pattern I recommend
Best of both worlds
If you want a cleaner project without a Soundboard skill but still want organization, you can also build your own sound helper script or map sound names to paths in JavaScript. That keeps your project lightweight while still staying maintainable.
If you want, I can show you:
Audio.playAudioFile()vs Soundboard control commands.What are you ultimately trying to build with the audio - voice prompts, sound effects, alarms, or a full interactive behavior system?
That all make very good sense. Thanks.