Wednesday 16 May 2012

Find Total Time of Wav file in asp.net

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using NAudio.Wave;


protected void Button1_Click(object sender, EventArgs e)
    {
string strFilename = "10kHz_44100Hz_16bit_30sec.wav" ;
        WaveFileReader wf = new WaveFileReader(Server.MapPath(strFilename));
       string strTime =  wf.TotalTime.ToString();
       Response.Write(strTime);
    }

Download load NAudio.dll from following url
http://naudio.codeplex.com/

No comments:

Post a Comment

What should you required to learn machine learning

  To learn machine learning, you will need to acquire a combination of technical skills and domain knowledge. Here are some of the things yo...