I am trying to run SoX command from java code but having some difficulties. SoX (SOund eXchange) software is installed, but rather than run the program from command prompt, I want to run the program and get results through my java code. The command I want to run is:
Sox -m sounda.wav soundb.wav final.wav
Here is a sample code that I am using to test:
package soxcmd;
import java.io.IOException;
public class SoxCmd {
public static void main(String[] args) throws IOException {
String path = "c:\\sox";
String[] mystring = {path + "\\sox -m", path + "\\fdir\\sounda.wav", path + "\\fdir\\soundb.wav", path + "\\bdfiles\\final.wav"};
Runtime.getRuntime().exec(mystring);
}
}
I'll appreciate your help on this. Thanks.