[Tool] Transkodieren Sie das SLK-Format in MP3
Voraussetzung: ffmpeg installieren
sh-Konverter.sh 33921FF3774A773BB193B6FD4AD7C33E.slk mp3
Java-Methode zur Durchführung der Transkodierung
public static void main(String[] args) {
try {
//批量转换,会有一个文件转换失败,不明所以等待大神改进
String command = "sh D:/silk-v3-decoder-master/converter.sh D:/aaa D:/bbb mp3";
//单个文件转换 测试无问题
String command1 = "sh D:/silk-v3-decoder-master/converter.sh D:/aaa/msg_181711011620205ce3eb94d104.amr mp3";
Process process = Runtime.getRuntime().exec(command);
int status = process.waitFor();
//打印执行状态 0为成功
System.out.println(status);
System.out.println(command);
} catch (InterruptedException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}