A lightweight system audio recorder for Ubuntu Linux that captures system audio (not microphone) with a simple keyboard shortcut (Ctrl+Alt+R).
- Record system audio with a keyboard shortcut (Ctrl+Alt+R)
- Desktop notifications for recording status
- Optimized for speech recording (using Opus codec)
- Small file sizes without compromising speech quality
- Ubuntu Linux (tested on 22.04 LTS)
- Python 3.8+
- FFmpeg
- PulseAudio
- Required packages:
sudo apt-get install ffmpeg python3-notify2 netcat-openbsd
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/audio-recorder.git
cd audio-recorder
- Run the installer:
chmod +x install.sh
./install.sh
- Use Ctrl+Alt+R to start/stop recording
- Recordings are saved in
~/projects/audio-recorder/recordings
This project intentionally deviates from the Filesystem Hierarchy Standard (FHS) to maintain a more maintainable and portable structure:
/projects/audio-recorder/
├── bin/ # Executable scripts
│ └── audio-recorder-toggle
├── src/ # Python source files
│ ├── recorder.py # Core recording functionality
│ └── recorder_service.py # System service implementation
├── config/ # Configuration files
│ └── audio-recorder.service
├── logs/ # Log files
│ ├── debug.log
│ └── service.log
├── recordings/ # Recorded audio files
└── install.sh # Installation script
Instead of spreading files across the system, this project:
- Keeps all files in one project directory
- Uses symbolic links to integrate with the system:
/usr/local/bin/audio-recorder-toggle → bin/audio-recorder-toggle ~/.config/systemd/user/audio-recorder.service → config/audio-recorder.service
-
Uses FFmpeg with PulseAudio for recording
-
Implements a systemd user service for background operation
-
Uses Unix domain sockets for inter-process communication
-
Optimized for speech recording using the Opus codec
-
Default recording settings:
- Codec: Opus
- Bitrate: 32k
- Channels: Mono
- Sample Rate: 16kHz
- Filters: Speech-optimized bandpass
chmod +x uninstall.sh
./uninstall.sh