import * as fs from 'fs' const audiopath = '/dev/audio' export default function play(path) { if(fs.existsSync(audiopath)) { if(fs.existsSync(path)) { const data = fs.readFileSync(path) fs.writeFileSync(audiopath, data) } } else { console.log('Kernel doesn\'t have snd_pcm_oss or snd_seq_oss or snd_mixer_oss') } }