【工具】转码silk格式为mp3

【工具】转码slk格式为mp3

前提 安装 ffmpeg

【安装】Linux安装ffmpeg_linux安装ffmpeg4.4_我是Superman丶的博客-CSDN博客

GitHub - kn007/silk-v3-decoder: [Skype Silk Codec SDK]Decode silk v3 audio files (like wechat amr, aud files, qq slk files) and convert to other format (like mp3). Batch conversion support.

sh converter.sh 33921FF3774A773BB193B6FD4AD7C33E.slk mp3

java 执行转码的方法

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();
        }
    }

你可能感兴趣的:(工具自用,java,微信,语音,音频,silk)