Skip to content

This repository contains a MATLAB and a Python function which I find handy for playing and recording audio from external audiocards. The audio is recorded per buffer, so it is straightforward to include (low complexity) real-time processing, such as simple microphone-beamforming.

License

Notifications You must be signed in to change notification settings

D1mme/play_and_record

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Record and play audio from audiocard

This is a MATLAB function I personally find convenient to use when I need to playback and/or record audio from an external audiocard. It probably makes sense to add two more functions: one for recording only and one for playback only, but I usually take the lazy way and just playback audio with all-zeros or discard the recorded data.

The code is tested on Ubuntu 23.10 and Ubuntu 24.04, though I also expect it to work on Windows and maybe Mac. I tested it on an RME Fireface UFX III, an internal audio card and a Behringer U-Phoria UMC22.

The code is based on the audioPlayerRecorder.

Python

I also added a Python implementation which is thanks to Baturalp. The implementation is based on sounddevice. I made some small modifications to his code to make it better generalisable (it was originally written for the Fireface UFX III and including keyboard inputs). I didnt test it well, since I did not have an external loudspeaker available. I think it should work though! The original code at least worked :)

About

This repository contains a MATLAB and a Python function which I find handy for playing and recording audio from external audiocards. The audio is recorded per buffer, so it is straightforward to include (low complexity) real-time processing, such as simple microphone-beamforming.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published