All Projects → squti → Android-Wave-Recorder

squti / Android-Wave-Recorder

Licence: MIT license
A powerful and efficient library to record WAVE form audio files (WAV) in Android

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Android-Wave-Recorder

Gsyrecordwave
MP3音频录制,支持类似IOS原生的单边或者双边波形显示,低版本音频权限兼容,本地或者在线音频播放的波形显示,录制波形和播放波形会根据声音频率变色的功能,边播边缓存功能,简书入口http://www.jianshu.com/p/2448e2903b07
Stars: ✭ 810 (+491.24%)
Mutual labels:  wave, recorder
simple-web-audio-recorder-demo
A simple HTML/JS demo that uses WebAudioRecorder.js to record audio on a web page
Stars: ✭ 141 (+2.92%)
Mutual labels:  wav, audio-recorder
Wavelineview
A memory-friendly recording wave animation一款性能内存友好的录音波浪动画
Stars: ✭ 597 (+335.77%)
Mutual labels:  wave, recorder
easywave
Easy WAVE file handling for Nim
Stars: ✭ 18 (-86.86%)
Mutual labels:  wav, wave
Recorder
html5 js 浏览器 web端录音
Stars: ✭ 429 (+213.14%)
Mutual labels:  wav, recorder
Wavefile
A Ruby gem for reading and writing sound files in Wave format (*.wav)
Stars: ✭ 193 (+40.88%)
Mutual labels:  wav, wave
SimpleWavSplitter
Split multi-channel WAV files into single channel WAV files.
Stars: ✭ 15 (-89.05%)
Mutual labels:  wav, wave
audio-metadata
A library for reading and, in the future, writing audio metadata. https://audio-metadata.readthedocs.io/
Stars: ✭ 41 (-70.07%)
Mutual labels:  wav, wave
PauseResumeAudioRecorder
An audio recorder that supports pause/resume functionality (WAV files only for now)
Stars: ✭ 19 (-86.13%)
Mutual labels:  wav, recorder
Javascript Media Recorder
WebRTC video recorder library for Javascript
Stars: ✭ 61 (-55.47%)
Mutual labels:  wav, recorder
Recorder
html5 js 录音 mp3 wav ogg webm amr 格式,支持pc和Android、ios部分浏览器、和Hybrid App(提供Android IOS App源码),微信也是支持的,提供H5版语音通话聊天示例 和DTMF编解码
Stars: ✭ 2,891 (+2010.22%)
Mutual labels:  wav, recorder
captureSystemAudio
Capture system audio ("What-U-Hear")
Stars: ✭ 29 (-78.83%)
Mutual labels:  recorder
DDSoundWave
根据语音绘制波浪动画
Stars: ✭ 16 (-88.32%)
Mutual labels:  wave
KTAudioSoundWave
🍐KTSoundWave-根据语音绘制波浪动画,录音波形图及分贝检测
Stars: ✭ 22 (-83.94%)
Mutual labels:  audio-recorder
audiobug
A simple Android app to record audio through the microphone.
Stars: ✭ 19 (-86.13%)
Mutual labels:  audio-recorder
RecordWaveView
a beatiful wave animation for recording ,support android Mp3 record
Stars: ✭ 62 (-54.74%)
Mutual labels:  wave
canvas-record
A one trick pony package to record and download a video from a canvas animation.
Stars: ✭ 64 (-53.28%)
Mutual labels:  recorder
Unity Android Screen Recorder
A simpler demo record screen plugin for record Android Screen
Stars: ✭ 87 (-36.5%)
Mutual labels:  recorder
DFPlayerMini Fast
Fast and easy to understand Arduino library to use the DFPlayer Mini MP3 module from DFRobot.com. This is a huge improvement (both in terms of execution speed and simplicity) to the standard library provided by DFRobot.com.
Stars: ✭ 164 (+19.71%)
Mutual labels:  wav
StegX
Steganography (BMP, PNG, WAV, MP3, AVI, FLV)
Stars: ✭ 22 (-83.94%)
Mutual labels:  wav

Android Wave Recorder

Android Arsenal

A powerful and efficient library to record WAVE form audio files (WAV) in Android

Android Wave Recorder is a lightweight library written in Kotlin to record audio files with WAVE (WAV due to its filename extension) format in Android. It's very memory efficient and easy to use library with recording customizations.

Download

Step 1. Add this in your root (Project) build.gradle at the end of repositories:

allprojects {
        repositories {
            ...
            maven { url "https://jitpack.io" }
        }
    }

Step 2. Add the dependency

dependencies{
    implementation 'com.github.squti:Android-Wave-Recorder:1.7.0'
}

Permission

Add these permissions into your AndroidManifest.xml and request for them in Android 6.0+

<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

Usage

Pass in the path of the output file to WaveRecorder class and call startRecording() like this:

/**
 * This path points to application cache directory.
 * you could change it based on your usage
 */
val filePath:String = externalCacheDir?.absolutePath + "/audioFile.wav"

val waveRecorder = WaveRecorder(filePath)
waveRecorder.startRecording()

To stop recording call stopRecording() function:

waveRecorder.stopRecording()

To pause and resume recording you could use pauseRecording() and resumeRecording() functions:

//Pause
waveRecorder.pauseRecording()

//Resume
waveRecorder.resumeRecording()

To activate Noise Suppressor you could set noiseSuppressorActive to true:

waveRecorder.noiseSuppressorActive = true

To listen to audio amplitude during recording you need to register a listener to onAmplitudeListener:

waveRecorder.onAmplitudeListener = {
    Log.i(TAG, "Amplitude : $it")
}

To listen to recording state changes (RECORDING, STOP and PAUSE) you need to register a listener to onStateChangeListener:

waveRecorder.onStateChangeListener = {
    when (it) {
        RecorderState.RECORDING -> TODO()
        RecorderState.STOP -> TODO()
        RecorderState.PAUSE -> TODO()
    }
}

Configuration

The default configuration for recording audio is like so:

Property Value
sampleRate 16000
channels AudioFormat.CHANNEL_IN_MONO
audioEncoding AudioFormat.ENCODING_PCM_16BIT

But you could change it using waveConfig property in WaveRecorder class based on your usage. This is an example:

val waveRecorder = WaveRecorder(filePath)
waveRecorder.waveConfig.sampleRate = 44100
waveRecorder.waveConfig.channels = AudioFormat.CHANNEL_IN_STEREO
waveRecorder.waveConfig.audioEncoding = AudioFormat.ENCODING_PCM_8BIT
waveRecorder.startRecording()

Note: Wrong configuration may impacts output quality

License

MIT License

Copyright (c) 2019 squti

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].