Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I don't know how to start segmentation for audio file. I want to slice audio signal of 3 Sec into 120 parts each & every segment of 25 millisecond.

Anybody have answer to my question? If you have then I want to thank in advance. Help me plz...
Posted
Updated 30-May-14 2:27am
v3
Comments
Abhishek Pant 30-May-14 7:59am    
http://stackoverflow.com/questions/6465863/trim-an-audio-file-wav-mp3
Shiva K. Shrestha 30-May-14 8:13am    
I already trim the sound, now I want to segment that sound into various frames.
KaushalJB 30-May-14 8:13am    
What have tried in code ??? Post it
Shiva K. Shrestha 30-May-14 8:19am    
private void button1_Click(object sender, EventArgs e)
{
string ifile = @"E:\Temp\a1.wav";
string ofile = @"E:\Temp\a3.wav";

Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.FileName = "C:\\Program Files (x86)\\sox-14-4-1\\sox.exe ";
//p.StartInfo.Arguments = ifile + " " + ofile + " silence 1 0.1 1% 0.1 1%";
p.StartInfo.Arguments = ifile + " " + ofile + " silence 1 0.1 1% -1 0.1 1%";

//sox in.wav out4.wav silence 1 0.1 1% -1 0.1 1%
//p.OutputDataReceived += process_OutputDataReceived;
//p.ErrorDataReceived += process_ErrorDataReceived;

p.Start();
p.BeginErrorReadLine();
p.BeginOutputReadLine();
}

1 solution

I use this code for trim audio signal

C#
private void button1_Click(object sender, EventArgs e)
        {
            string ifile = @"E:\Temp\a1.wav";
            string ofile = @"E:\Temp\a3.wav";

            Process p = new Process();
            p.StartInfo.UseShellExecute = false;
            p.StartInfo.RedirectStandardOutput = true;
            p.StartInfo.RedirectStandardError = true;
            p.StartInfo.FileName = "C:\\Program Files (x86)\\sox-14-4-1\\sox.exe ";
            //p.StartInfo.Arguments = ifile + " " + ofile + " silence 1 0.1 1% 0.1 1%";
            p.StartInfo.Arguments = ifile + " " + ofile + " silence 1 0.1 1% -1 0.1 1%";

            //sox in.wav out4.wav silence 1 0.1 1% -1 0.1 1%
            //p.OutputDataReceived += process_OutputDataReceived;
            //p.ErrorDataReceived += process_ErrorDataReceived;

            p.Start();
            p.BeginErrorReadLine();
            p.BeginOutputReadLine();
        }
 
Share this answer
 
Comments
Member 12397866 20-Nov-16 4:37am    
i have error and do not know what i do
in p.start()

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900