实例介绍
参考别人的代码,然后自己优化后的Android加Speex编码,然后利用RTP传输数据的实时语音DEMO,亲测在两台手机上可用,一个说的话效果还不错,如果2个人同时说回音还是有点大,有需要的可以参考下。
【实例截图】
【核心代码】
VoipDemo_Speex
└── VoipDemo_Speex
├── AndroidManifest.xml
├── bin
│ ├── AndroidManifest.xml
│ ├── classes
│ │ └── com
│ │ └── gyz
│ │ └── voipdemo_speex
│ │ ├── activity
│ │ │ ├── MainActivity$1.class
│ │ │ ├── MainActivity$2.class
│ │ │ ├── MainActivity$3.class
│ │ │ ├── MainActivity$4.class
│ │ │ └── MainActivity.class
│ │ ├── BuildConfig.class
│ │ ├── model
│ │ │ ├── AudioConfig.class
│ │ │ ├── AudioData2.class
│ │ │ ├── AudioData.class
│ │ │ └── NetConfig.class
│ │ ├── R$anim.class
│ │ ├── R$attr.class
│ │ ├── R$bool.class
│ │ ├── R$color.class
│ │ ├── R$dimen.class
│ │ ├── R$drawable.class
│ │ ├── R$id.class
│ │ ├── R$integer.class
│ │ ├── R$layout.class
│ │ ├── R$menu.class
│ │ ├── R$string.class
│ │ ├── R$styleable.class
│ │ ├── R$style.class
│ │ ├── R.class
│ │ ├── runnable
│ │ │ ├── AudioDecoder.class
│ │ │ ├── AudioEncoder.class
│ │ │ ├── AudioPlayer.class
│ │ │ ├── AudioReceiver.class
│ │ │ ├── AudioRecorder.class
│ │ │ └── AudioSender.class
│ │ ├── socket
│ │ │ ├── DemoPackage.class
│ │ │ ├── JsonObjectDecoder.class
│ │ │ ├── JsonObjectEncoder.class
│ │ │ ├── PojoClient$1.class
│ │ │ ├── PojoClient$2$1.class
│ │ │ ├── PojoClient$2.class
│ │ │ ├── PojoClient.class
│ │ │ └── PojoClientHandler.class
│ │ └── util
│ │ ├── AudioWrapper.class
│ │ └── Speex.class
│ ├── classes.dex
│ ├── dexedLibs
│ │ ├── android-support-v4-be221076d17fc4af33a9dab7a71fdf88.jar
│ │ ├── android-support-v7-appcompat-e2230dc2457bef4693a4663673a93fe3.jar
│ │ ├── jackson-annotations-2.9.0-2cf542d7784094da52c2b89c3bc6160f.jar
│ │ ├── jackson-core-2.9.8-cf6347c2b22a9aa6dd5a37917be5cc32.jar
│ │ ├── jackson-databind-2.9.8-38d4d49e26739b67579ade4c91f3e2f1.jar
│ │ └── netty-all-4.1.32.Final-9c97ace3d7dc220d35759e43662a07b4.jar
│ ├── jarlist.cache
│ ├── res
│ │ └── crunch
│ │ ├── drawable-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-xhdpi
│ │ │ └── ic_launcher.png
│ │ └── drawable-xxhdpi
│ │ └── ic_launcher.png
│ ├── resources.ap_
│ ├── R.txt
│ └── VoipDemo_Speex.apk
├── gen
│ └── com
│ └── gyz
│ └── voipdemo_speex
│ ├── BuildConfig.java
│ └── R.java
├── ic_launcher-web.png
├── jni
│ ├── Android.mk
│ ├── Application.mk
│ ├── include
│ │ ├── Makefile.am
│ │ ├── Makefile.in
│ │ └── speex
│ │ ├── Makefile.am
│ │ ├── Makefile.in
│ │ ├── speex_bits.h
│ │ ├── speex_buffer.h
│ │ ├── speex_callbacks.h
│ │ ├── speex_config_types.h
│ │ ├── speex_config_types.h.in
│ │ ├── speex_echo.h
│ │ ├── speex.h
│ │ ├── speex_header.h
│ │ ├── speex_jitter.h
│ │ ├── speex_preprocess.h
│ │ ├── speex_resampler.h
│ │ ├── speex_stereo.h
│ │ └── speex_types.h
│ ├── libspeex
│ │ ├── arch.h
│ │ ├── bits.c
│ │ ├── buffer.c
│ │ ├── cb_search_arm4.h
│ │ ├── cb_search_bfin.h
│ │ ├── cb_search.c
│ │ ├── cb_search.h
│ │ ├── cb_search_sse.h
│ │ ├── echo_diagnostic.m
│ │ ├── exc_10_16_table.c
│ │ ├── exc_10_32_table.c
│ │ ├── exc_20_32_table.c
│ │ ├── exc_5_256_table.c
│ │ ├── exc_5_64_table.c
│ │ ├── exc_8_128_table.c
│ │ ├── fftwrap.c
│ │ ├── fftwrap.h
│ │ ├── filterbank.c
│ │ ├── filterbank.h
│ │ ├── filters_arm4.h
│ │ ├── filters_bfin.h
│ │ ├── filters.c
│ │ ├── filters.h
│ │ ├── filters_sse.h
│ │ ├── fixed_arm4.h
│ │ ├── fixed_arm5e.h
│ │ ├── fixed_bfin.h
│ │ ├── fixed_debug.h
│ │ ├── fixed_generic.h
│ │ ├── gain_table.c
│ │ ├── gain_table_lbr.c
│ │ ├── hexc_10_32_table.c
│ │ ├── hexc_table.c
│ │ ├── high_lsp_tables.c
│ │ ├── jitter.c
│ │ ├── kiss_fft.c
│ │ ├── _kiss_fft_guts.h
│ │ ├── kiss_fft.h
│ │ ├── kiss_fftr.c
│ │ ├── kiss_fftr.h
│ │ ├── lpc_bfin.h
│ │ ├── lpc.c
│ │ ├── lpc.h
│ │ ├── lsp_bfin.h
│ │ ├── lsp.c
│ │ ├── lsp.h
│ │ ├── lsp_tables_nb.c
│ │ ├── ltp_arm4.h
│ │ ├── ltp_bfin.h
│ │ ├── ltp.c
│ │ ├── ltp.h
│ │ ├── ltp_sse.h
│ │ ├── Makefile.am
│ │ ├── Makefile.in
│ │ ├── math_approx.h
│ │ ├── mdf.c
│ │ ├── misc_bfin.h
│ │ ├── modes.c
│ │ ├── modes.h
│ │ ├── modes_wb.c
│ │ ├── nb_celp.c
│ │ ├── nb_celp.h
│ │ ├── os_support.h
│ │ ├── preprocess.c
│ │ ├── pseudofloat.h
│ │ ├── quant_lsp_bfin.h
│ │ ├── quant_lsp.c
│ │ ├── quant_lsp.h
│ │ ├── resample.c
│ │ ├── resample_sse.h
│ │ ├── sb_celp.c
│ │ ├── sb_celp.h
│ │ ├── scal.c
│ │ ├── smallft.c
│ │ ├── smallft.h
│ │ ├── speex.c
│ │ ├── speex_callbacks.c
│ │ ├── speex_header.c
│ │ ├── stack_alloc.h
│ │ ├── stereo.c
│ │ ├── testdenoise.c
│ │ ├── testecho.c
│ │ ├── testenc.c
│ │ ├── testenc_uwb.c
│ │ ├── testenc_wb.c
│ │ ├── testjitter.c
│ │ ├── vbr.c
│ │ ├── vbr.h
│ │ ├── vorbis_psy.h
│ │ ├── vq_arm4.h
│ │ ├── vq_bfin.h
│ │ ├── vq.c
│ │ ├── vq.h
│ │ ├── vq_sse.h
│ │ └── window.c
│ └── speex_jni.cpp
├── libs
│ ├── armeabi
│ │ └── libspeex.so
│ ├── armeabi-v7a
│ │ └── libspeex.so
│ ├── jackson-annotations-2.9.0.jar
│ ├── jackson-core-2.9.8.jar
│ ├── jackson-databind-2.9.8.jar
│ └── netty-all-4.1.32.Final.jar
├── lint.xml
├── obj
│ └── local
│ ├── armeabi
│ │ ├── libspeex.so
│ │ ├── libstdc++.a
│ │ └── objs
│ │ └── speex
│ │ ├── libspeex
│ │ │ ├── bits.o
│ │ │ ├── bits.o.d
│ │ │ ├── buffer.o
│ │ │ ├── buffer.o.d
│ │ │ ├── cb_search.o
│ │ │ ├── cb_search.o.d
│ │ │ ├── exc_10_16_table.o
│ │ │ ├── exc_10_16_table.o.d
│ │ │ ├── exc_10_32_table.o
│ │ │ ├── exc_10_32_table.o.d
│ │ │ ├── exc_20_32_table.o
│ │ │ ├── exc_20_32_table.o.d
│ │ │ ├── exc_5_256_table.o
│ │ │ ├── exc_5_256_table.o.d
│ │ │ ├── exc_5_64_table.o
│ │ │ ├── exc_5_64_table.o.d
│ │ │ ├── exc_8_128_table.o
│ │ │ ├── exc_8_128_table.o.d
│ │ │ ├── fftwrap.o
│ │ │ ├── fftwrap.o.d
│ │ │ ├── filterbank.o
│ │ │ ├── filterbank.o.d
│ │ │ ├── filters.o
│ │ │ ├── filters.o.d
│ │ │ ├── gain_table_lbr.o
│ │ │ ├── gain_table_lbr.o.d
│ │ │ ├── gain_table.o
│ │ │ ├── gain_table.o.d
│ │ │ ├── hexc_10_32_table.o
│ │ │ ├── hexc_10_32_table.o.d
│ │ │ ├── hexc_table.o
│ │ │ ├── hexc_table.o.d
│ │ │ ├── high_lsp_tables.o
│ │ │ ├── high_lsp_tables.o.d
│ │ │ ├── jitter.o
│ │ │ ├── jitter.o.d
│ │ │ ├── kiss_fft.o
│ │ │ ├── kiss_fft.o.d
│ │ │ ├── kiss_fftr.o
│ │ │ ├── kiss_fftr.o.d
│ │ │ ├── lpc.o
│ │ │ ├── lpc.o.d
│ │ │ ├── lsp.o
│ │ │ ├── lsp.o.d
│ │ │ ├── lsp_tables_nb.o
│ │ │ ├── lsp_tables_nb.o.d
│ │ │ ├── ltp.o
│ │ │ ├── ltp.o.d
│ │ │ ├── mdf.o
│ │ │ ├── mdf.o.d
│ │ │ ├── modes.o
│ │ │ ├── modes.o.d
│ │ │ ├── modes_wb.o
│ │ │ ├── modes_wb.o.d
│ │ │ ├── nb_celp.o
│ │ │ ├── nb_celp.o.d
│ │ │ ├── preprocess.o
│ │ │ ├── preprocess.o.d
│ │ │ ├── quant_lsp.o
│ │ │ ├── quant_lsp.o.d
│ │ │ ├── resample.o
│ │ │ ├── resample.o.d
│ │ │ ├── sb_celp.o
│ │ │ ├── sb_celp.o.d
│ │ │ ├── scal.o
│ │ │ ├── scal.o.d
│ │ │ ├── smallft.o
│ │ │ ├── smallft.o.d
│ │ │ ├── speex_callbacks.o
│ │ │ ├── speex_callbacks.o.d
│ │ │ ├── speex_header.o
│ │ │ ├── speex_header.o.d
│ │ │ ├── speex.o
│ │ │ ├── speex.o.d
│ │ │ ├── stereo.o
│ │ │ ├── stereo.o.d
│ │ │ ├── vbr.o
│ │ │ ├── vbr.o.d
│ │ │ ├── vq.o
│ │ │ ├── vq.o.d
│ │ │ ├── window.o
│ │ │ └── window.o.d
│ │ ├── speex_jni.o
│ │ └── speex_jni.o.d
│ └── armeabi-v7a
│ ├── libspeex.so
│ ├── libstdc++.a
│ └── objs
│ └── speex
│ ├── libspeex
│ │ ├── bits.o
│ │ ├── bits.o.d
│ │ ├── buffer.o
│ │ ├── buffer.o.d
│ │ ├── cb_search.o
│ │ ├── cb_search.o.d
│ │ ├── exc_10_16_table.o
│ │ ├── exc_10_16_table.o.d
│ │ ├── exc_10_32_table.o
│ │ ├── exc_10_32_table.o.d
│ │ ├── exc_20_32_table.o
│ │ ├── exc_20_32_table.o.d
│ │ ├── exc_5_256_table.o
│ │ ├── exc_5_256_table.o.d
│ │ ├── exc_5_64_table.o
│ │ ├── exc_5_64_table.o.d
│ │ ├── exc_8_128_table.o
│ │ ├── exc_8_128_table.o.d
│ │ ├── fftwrap.o
│ │ ├── fftwrap.o.d
│ │ ├── filterbank.o
│ │ ├── filterbank.o.d
│ │ ├── filters.o
│ │ ├── filters.o.d
│ │ ├── gain_table_lbr.o
│ │ ├── gain_table_lbr.o.d
│ │ ├── gain_table.o
│ │ ├── gain_table.o.d
│ │ ├── hexc_10_32_table.o
│ │ ├── hexc_10_32_table.o.d
│ │ ├── hexc_table.o
│ │ ├── hexc_table.o.d
│ │ ├── high_lsp_tables.o
│ │ ├── high_lsp_tables.o.d
│ │ ├── jitter.o
│ │ ├── jitter.o.d
│ │ ├── kiss_fft.o
│ │ ├── kiss_fft.o.d
│ │ ├── kiss_fftr.o
│ │ ├── kiss_fftr.o.d
│ │ ├── lpc.o
│ │ ├── lpc.o.d
│ │ ├── lsp.o
│ │ ├── lsp.o.d
│ │ ├── lsp_tables_nb.o
│ │ ├── lsp_tables_nb.o.d
│ │ ├── ltp.o
│ │ ├── ltp.o.d
│ │ ├── mdf.o
│ │ ├── mdf.o.d
│ │ ├── modes.o
│ │ ├── modes.o.d
│ │ ├── modes_wb.o
│ │ ├── modes_wb.o.d
│ │ ├── nb_celp.o
│ │ ├── nb_celp.o.d
│ │ ├── preprocess.o
│ │ ├── preprocess.o.d
│ │ ├── quant_lsp.o
│ │ ├── quant_lsp.o.d
│ │ ├── resample.o
│ │ ├── resample.o.d
│ │ ├── sb_celp.o
│ │ ├── sb_celp.o.d
│ │ ├── scal.o
│ │ ├── scal.o.d
│ │ ├── smallft.o
│ │ ├── smallft.o.d
│ │ ├── speex_callbacks.o
│ │ ├── speex_callbacks.o.d
│ │ ├── speex_header.o
│ │ ├── speex_header.o.d
│ │ ├── speex.o
│ │ ├── speex.o.d
│ │ ├── stereo.o
│ │ ├── stereo.o.d
│ │ ├── vbr.o
│ │ ├── vbr.o.d
│ │ ├── vq.o
│ │ ├── vq.o.d
│ │ ├── window.o
│ │ └── window.o.d
│ ├── speex_jni.o
│ └── speex_jni.o.d
├── proguard-project.txt
├── project.properties
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ ├── drawable-xxhdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ ├── activity_main.xml
│ │ └── fragment_main.xml
│ ├── menu
│ │ └── main.xml
│ ├── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ ├── values-v11
│ │ └── styles.xml
│ ├── values-v14
│ │ └── styles.xml
│ └── values-w820dp
│ └── dimens.xml
└── src
└── com
└── gyz
└── voipdemo_speex
├── activity
│ └── MainActivity.java
├── model
│ ├── AudioConfig.java
│ ├── AudioData2.java
│ ├── AudioData.java
│ └── NetConfig.java
├── runnable
│ ├── AudioDecoder.java
│ ├── AudioEncoder.java
│ ├── AudioPlayer.java
│ ├── AudioReceiver.java
│ ├── AudioRecorder.java
│ └── AudioSender.java
├── socket
│ ├── DemoPackage.java
│ ├── JsonObjectDecoder.java
│ ├── JsonObjectEncoder.java
│ ├── PojoClientHandler.java
│ └── PojoClient.java
└── util
├── AudioWrapper.java
└── Speex.java
59 directories, 387 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论