JAVA版-微信高清语音.speex转.wav格式
功能介绍:
PC端将.speex文件解码为*.wav文件
使用场景:
在MAC/Linux下Java JNI 调用C Speex,后端Java处理微信服务器下载下来的微信高清语音.speex解码为.wav
### 环境:
1. MAC OS 10.12.5/Linux
2. Xcode
3. Gcc
4. JDK 1.8
5. speex 1.2.0
### 步骤:
1. 安装libspeex
> 从https://www.speex.org/downloads/下载speex-1.2.0.tar.gz
> 解压speex-1.2.0.tar.gz
>cd pathto/speex-1.2.0
>./configure
```
...
config.status: creating win32/VS2003/libspeex/Makefile
config.status: creating win32/VS2003/speexdec/Makefile
config.status: creating win32/VS2003/speexenc/Makefile
config.status: creating win32/VS2005/Makefile
config.status: creating win32/VS2005/libspeex/Makefile
config.status: creating win32/VS2005/speexdec/Makefile
config.status: creating win32/VS2005/speexenc/Makefile
config.status: creating win32/VS2005/tests/Makefile
config.status: creating win32/VS2008/Makefile
config.status: creating win32/VS2008/speexdec/Makefile
config.status: creating win32/VS2008/tests/Makefile
config.status: creating win32/VS2008/libspeex/Makefile
config.status: creating win32/VS2008/speexenc/Makefile
config.status: creating include/speex/speex_config_types.h
config.status: creating ti/Makefile
config.status: creating ti/speex_C54_test/Makefile
config.status: creating ti/speex_C55_test/Makefile
config.status: creating ti/speex_C64_test/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
Type "make; make install" to compile and install Speex
```
>sudo make install
```
Making install in libspeex
.././install-sh -c -d '/usr/local/lib'
/bin/sh ../libtool --mode=install /usr/bin/install -c libspeex.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libspeex.1.dylib /usr/local/lib/libspeex.1.dylib
libtool: install: (cd /usr/local/lib && { ln -s -f libspeex.1.dylib libspeex.dylib || { rm -f libspeex.dylib && ln -s libspeex.1.dylib libspeex.dylib; }; })
libtool: install: /usr/bin/install -c .libs/libspeex.lai /usr/local/lib/libspeex.la
libtool: install: /usr/bin/install -c .libs/libspeex.a /usr/local/lib/libspeex.a
libtool: install: chmod 644 /usr/local/lib/libspeex.a
libtool: install: ranlib /usr/local/lib/libspeex.a
make[2]: Nothing to be done for `install-data-am'.
Making install in include
Making install in speex
...
```
2.打包
> cd pathto/release
linux系统:
> make -f makefile-linux
> make -f makefile-linux install
mac系统:
> make -f makefile-mac
> make -f makefile-mac install
3.测试
SpeexUtils.decode("pathto/a.speex", "pathto/a-test.wav");
项目源码: https://github.com/guoguo11/JSpeex-util
JAVA版-微信高清语音.speex转.wav格式的更多相关文章
- 高清语音技术(WBS)及其在手机和蓝牙耳机中的实现
高清语音也被称为宽带语音,是一种能为蜂窝网络.移动电话和无线耳机传输高清.自然语音质量的音频技术.与传统的窄带电话相比,高清语音很大程度上提高了语音质量,减少了听觉负担. 通信产业链上的所有网络和设备 ...
- 分享《Python 游戏编程快速上手(第3版)》高清中文版PDF+高清英文版PDF+源代码
通过编写一个个小巧.有趣的游戏来学习Python,通过实例来解释编程的原理的方式.14个游戏程序和示例,介绍了Python基础知识.数据类型.函数.流程控制.程序调试.流程图设计.字符串操作.列表和字 ...
- 参考《利用Python进行数据分析(第二版)》高清中文PDF+高清英文PDF+源代码
第2版针对Python 3.6进行全面修订和更新,涵盖新版的pandas.NumPy.IPython和Jupyter,并增加大量实际案例,可以帮助高效解决一系列数据分析问题. 第2版中的主要更新了Py ...
- 参考学习《Python学习手册(第4版)》高清中文PDF+高清英文PDF+源代码
看到第38章了,整体感觉解释详细,例子丰富:关于Python语言本身的讲解全面详尽而又循序渐进不断重复,同时详述语言现象背后的机制和原理:除语言本身,还包含编程实践和设计以及高级主题.边看边写代码.不 ...
- 《最优化导论第4版》高清中文版PDF+高清英文版PDF+习题题解
<最优化导论第4版>高清中文版PDF+高清英文版PDF+习题题解 存放在语雀 凸优化 · 语雀
- (原创)speex与wav格式音频文件的互相转换(二)
之前写过了如何将speex与wav格式的音频互相转换,如果没有看过的请看一下连接 http://www.cnblogs.com/dongweiq/p/4515186.html 虽然自己实现了相关的压缩 ...
- java版微信公众平台自定义菜单创建代码实现
微信公众平台自定义菜单创建代码实现—java版 搞了两天的自定义菜单,终于搞定了,现在分享下心得,以便后来者少走弯路...... 好了,先看先微信官方的API 官方写的很详细,但是我看完后很茫然,不知 ...
- Java pdf转高清图片
为什么80%的码农都做不了架构师?>>> package com.hyb.kai.web.controller; import java.awt.image.BufferedIm ...
- (原创)speex与wav格式音频文件的互相转换
我们的司信项目又有了新的需求,就是要做会议室.然而需求却很纠结,要继续按照原来发语音消息那样的形式来实现这个会议的功能,还要实现语音播放的计时,暂停,语音的拼接,还要绘制频谱图等等. 如果是wav,m ...
随机推荐
- php 中将完整的年月日时分秒的时间转换成 年月日的形式
strtotime() 函数将任何英文文本的日期或时间描述解析为 Unix 时间戳(自 January 1 1970 00:00:00 GMT 起的秒数), 将完整的时间格式转换成时间撮的形式,再去进 ...
- iOS 键盘的监听 调整view的位置
iOS在处理键盘的出现和消失时需要监听UIKeyboardWillChangeFrameNotifications/UIKeyboardDidHideNotifications - (void)vie ...
- dotnet core2常用命令
dotnet --info 来查看是否安装成功dotnet new -alldotnet new mvc 创建MVC项目dotnet new more 查看项目类型dotnet restore (恢复 ...
- HTML-CSS样式表-★★★常用属性★★★及基本概念、分类、选择器
样式属性 背景与前景: background-color:#F90; /*背景颜色,样式表优先级最高*/ background-image:url(路径); /*设置背景图片(默认)*/ backgr ...
- 干掉Vivado幺蛾子(1)-- Xilinx Tcl Store
目录 1. 安装Xilinx Tcl Store 2. 手动更新 2.1 下载库 2.2 修改环境变量 参考文献: 最近在跟着高亚军老师的分析文章来学习Xilinx最近发布的<UltraFast ...
- 「BZOJ3998」[TJOI2015] 弦论(第K小子串)
https://www.lydsy.com/JudgeOnline/problem.php?id=3998 Description 对于一个给定长度为N的字符串,求它的第K小子串是什么. Input ...
- 项目构建工具maven的使用方法
最近在开发javaweb项目中有用到maven,以前并不是很了解,于是学习了一些相关内容,记之共享. 本篇内容在Windows环境下实施,JDK版本使用的1.7.0_79. 一.maven是什么? 简 ...
- $bzoj1014-JSOI2008$ 火星人$prefix$ $splay$ $hash$
题面描述 火星人最近研究了一种操作:求一个字串两个后缀的公共前缀.比方说,有这样一个字符串:\(madamimadam\),我们将这个字符串的各个字符予以标号: 序号 1 2 3 4 5 6 7 8 ...
- touch插件
第一种: <script> (function($) { var options, Events, Touch; options = { x: 20, y: 20 }; Events = ...
- (转)python标准库中socket模块详解
python标准库中socket模块详解 socket模块简介 原文:http://www.lybbn.cn/data/datas.php?yw=71 网络上的两个程序通过一个双向的通信连接实现数据的 ...