import ws.schild.jave.*; import java.io.File; public class VoiceToAmr { /**创建maven项目,导入依赖 <dependency> <groupId>ws.schild</groupId> <artifactId>jave-all-deps</artifactId> <version>2.6.0</version> </dependency> */ //程序员是不需要格式工厂的,直接自己写代码解决。算法如果我们写不来,我们可以做调包侠呀。技术都是站在巨人的肩膀上,我调包我快乐!没必要抵触。 // //以MP3转为amr格式举例: public static void main(String[] args) { System.out.println(m4aToWav()); // encodingFormats(); // codec(); } public static boolean m4aToWav() { boolean succeeded = true; try { File source = new File("C:\\Users\\Administrator\\Desktop\\obj_wo3.mp3"); File target = new File("C:\\Users\\Administrator\\Desktop\\targetnew1.amr"); //Audio Attributes AudioAttributes audio = new AudioAttributes(); // audio.setCod
音频格式转换Java代码,以mp3转amr为例
最新推荐文章于 2024-07-23 04:08:08 发布
本文介绍了一种使用Java进行音频格式转换的方法,以MP3转AMR为例,通过引入jave库,详细展示了编码过程,并提供了查看支持的编码器和格式的方法。
摘要由CSDN通过智能技术生成