Skip to content

arkq/svar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVAR - Simple Voice Activated Recorder

Build Status REUSE status

It is a simple console application (low memory footprint and CPU usage) designed for recording audio when a specified signal level is exceeded. It is commonly known solution called Voice Operated Recording (VOR). When the signal level is low for longer than the fadeout time, audio recording is paused.

Supported audio backends:

  • ALSA - Advanced Linux Sound Architecture (Linux only)
  • PipeWire - Multimedia Processing Framework (Linux only)
  • PortAudio - Cross-platform Audio I/O Library (all platforms)

Supported output formats:

For low CPU consumption WAV is recommended - it is the default selection.

There is also possible to split output file into chunks containing continuous recording. New output file is generated every time a new signal appears (after the split time period). In such a case, the time of signal appearance can be determined by the output file name, which by default is in the format of "rec-DD-HH:MM:SS". It is possible to customize it with a strftime(3) format string.

For the fine adjustment of the activation threshold level, one can run svar with the --sig-meter option which activates the signal meter mode. This mode shows root mean square (RMS) value of the live signal. The RMS is calculated from the last 100 ms of captured audio.

Installation

Dependencies (Debian/Ubuntu)

# Basic build tools and CMake
sudo apt install build-essential cmake
# Audio backends
sudo apt install libasound2-dev libpipewire-0.3-dev portaudio19-dev
# Output formats
sudo apt install libmp3lame-dev libogg-dev libsndfile1-dev libopusenc-dev libvorbis-dev

Building

cmake -B build \
  -DCMAKE_BUILD_TYPE=Release \
  -DENABLE_ALSA=ON -DENABLE_PIPEWIRE=ON -DENABLE_PORTAUDIO=ON \
  -DENABLE_SNDFILE=ON -DENABLE_MP3LAME=ON -DENABLE_OPUS=ON -DENABLE_VORBIS=ON
cmake --build build

Installing

sudo cmake --install build

About

SVAR - Simple Voice Activated Recorder

Topics

Resources

License

Stars

Watchers

Forks