1 应用代码
// amr文件的全路径
var amrFile= Path.GetFullPath("a.amr", AppContext.BaseDirectory);
// 新文件mp3的全路径
var newFilePath = amrFile.Replace(ext, ".mp3");
//创建一个ProcessStartInfo对象 使用系统shell 指定命令和参数 设置标准输出
var psi = new ProcessStartInfo("sox", $" {amrFile} {newFilePath}");
//启动
using var proc = Process.Start(psi)