The wiki gives us two methods to do that.
The first one doesn’t work at all for me right now. And the second one is too complex for huge compiling a C++ project is a miserable thing as I learnt several years ago.
So I find a solution after thinking for a while.
Include a third party node-module which can play a sound, like play. Then use the api the node-module provide to play sound.