A SwiftUI app that lets you record audio from the microphone, save clips locally, and play them back — complete with a live multi-bar waveform visualizer during recording and playback.
This project demonstrates how to build a full audio recorder and player in SwiftUI using AVAudioRecorder and AVAudioPlayer. It includes a live animated visualizer that reacts to audio levels in real time, split across a clean MiniRecorder and MiniPlayer component architecture.
- MiniRecorder — handles mic permissions, recording state, and live audio metering
- MiniPlayer — manages playback, scrubbing, and playback progress
- MultiBarVisualizerView — animated bar chart that responds to real-time audio amplitude
- Self-contained — no third-party audio libraries; pure AVFoundation
This project was built for the NoahDoesCoding YouTube channel.
git clone https://github.com/NDCSwift/AudioRecorder-PlaybackDemo.git
cd AudioRecorder-PlaybackDemo- Double-click
AudioRecorderDemo2.xcodeproj
In Xcode: TARGET → Signing & Capabilities → Team
Change com.example.MyApp to a unique identifier (e.g., com.yourname.AudioRecorderDemo).
- Microphone permission (
NSMicrophoneUsageDescription) must be set in Info.plist. - Recordings are saved to the app's documents directory.
- If you see a code signing error, check that Team and Bundle ID are set.
- iOS 16+
- Xcode 15+
- Swift 5.9+