Jump to content

Any way to play a wav or mp3 file in a CLI scipt?


victorianrider

Recommended Posts

Hi, tried google'ing for an answer but found very little help, so decided to post here. I need a way to play a 2 second wav or mp3 file in a shell script. Is there any way to do this?

 

I was hoping for something as simple as this if possible

 

if ($GetHit == 'true')

      {

      $PlaySound;

      echo "Sound Played\n\n";

      }

 

Thanks

There are command line players around for Linux, what OS are you talking about?

Windows 7, I just need it to play a sound if a certain argument is true. I can do it in apache quite easily with a simple html code, but this script runs a lot better in CLI.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.