Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 682
  • Last Modified:

program to detect bit rate and sample rate of an audio file

I am creating a way for users to upload their audio voice message using php and I could not find a php function that can give more information about an audio file.
Users are required to upload a .WAV file of 16 Bit 8kHz mono.
Therefore, after the file is uploaded I have to make sure it is in this correct format.

I am wondering if there is a stable linux audio program that I can run via command line and have it output the details of an audio file.
Then I could parse the output and extract the type of information I need to determine if the audio file is in the proper format.
It will be on a production server, so the program has to be well known for stability.

Any suggestions?



OS: CentOS 5 64-bit
0
ray-solomon
Asked:
ray-solomon
  • 2
1 Solution
 
ozoCommented:
file *.wav
0
 
Matthew KellyCommented:
A modified version of this would let you do it right in PHP:

http://articles.techrepublic.com.com/5100-10878_11-5810215.html
0
 
Matthew KellyCommented:
If that doesn't work there is a PHP sourceforge project to do it as well called getID3:

http://sourceforge.net/projects/getid3/

That might be more stable but not as simplistic.
0
 
ray-solomonAuthor Commented:
works perfectly. Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now