wangshanhai / voicerecorder Goto Github PK
View Code? Open in Web Editor NEW录制语音和播放语音,仿微信语音模块
录制语音和播放语音,仿微信语音模块
正在播放时,滑出屏幕再滑回来就没有动画了。。
/**
* 设置播放语音的动画
*
* @param drawableResoureId
*/
public void setPlayingIconDrawableResoure(int drawableResoureId) {
isSetingPlayingIcon = true;
voiceIconView.setImageResource(R.drawable.voice_to_icon);
}
一句话调用语音录制爽多了~(╹▽╹)
录制的语音在编码上有问题,问题是:在手机上查看没任何问题,但是把语音文件上传到后台,后台会发现这个文件是坏的,非正常文件。如果是mp3格式较明显,如果使用电脑打开手机中语音文件所在的文件夹目录,根本就找到不到语音文件。但是你可以明明看到语音文件在那里!!
recorder.setAudioChannels(1); // MONO
recorder.setAudioChannels(AudioFormat.CHANNEL_IN_DEFAULT); // MONO
因为还没有导入import android.media.AudioFormat; 所以直接写参数1回导致record.prepare failed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.