Skip to main content

Overview

AMRAudioRecorder is an Android library that enables AMR audio recording with pause and resume functionality. Since Android’s native MediaRecorder doesn’t support pausing AMR recordings, this library implements a clever solution by managing multiple audio segments and merging them seamlessly.

Key features

Pause and resume

Pause your recording at any time and resume without losing any audio data

AMR format support

Records audio in AMR-NB format, ideal for voice recordings with small file sizes

Automatic merging

Automatically merges multiple audio segments into a single file when stopped

Simple API

Clean, intuitive API with just a few methods to start, pause, resume, and stop recording

Why AMRAudioRecorder?

Android’s built-in MediaRecorder doesn’t support pause and resume functionality for AMR audio recordings. AMRAudioRecorder solves this by:
  • Creating separate audio files for each recording segment
  • Managing the file headers correctly (skipping AMR’s 6-byte header on subsequent files)
  • Merging all segments into a single playable AMR file when you stop recording
  • Providing a simple, developer-friendly API that handles all the complexity for you

Get started

Installation

Add AMRAudioRecorder to your Android project

Quickstart

Record your first audio file in minutes

API reference

Explore all available methods and options

Guides

Learn best practices and advanced usage

Use cases

AMRAudioRecorder is perfect for:
  • Voice memo applications
  • Interview or lecture recording apps
  • Voice messaging features
  • Any app requiring pause/resume audio recording
  • Applications needing small audio file sizes

How it works

The library uses a smart approach to enable pause/resume functionality:
  1. Start recording: Creates a new AMR file and begins recording
  2. Pause: Stops the current MediaRecorder and releases resources
  3. Resume: Creates a new MediaRecorder instance and starts a new file
  4. Stop: Merges all audio segments by:
    • Keeping the first file’s 6-byte AMR header
    • Skipping headers on subsequent files
    • Combining all audio data into a single file
    • Cleaning up temporary files
The result is a single, seamless AMR audio file that plays back as if it was recorded continuously.

Build docs developers (and LLMs) love