Giter Club home page Giter Club logo

linux_alsa_audio_record's Introduction

Alsa_record (C++) : this code, after compilation, allows to record audio on Linux in one simple command line (approx 1 hour max if I'm not too wrong)

It should work on any recent Linux box using Pulseaudio, and the compilation depends on alsa (libasound2, lib libasound2-dev), pulseaudio and the pthread library.

Be carefull, this code is provided without any warranty it will work on your machine, and you use it at your own risks !

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Windows version : work in progress, but any contribution is welcome !!

Copyright Eric Bachard / 2020 August 23rd, 13:24:52 (UTC+0200)

License

This project is under GPL v3 License. See : http://www.gnu.org/licenses/gpl-3.0.html and has been inspired from https://github.com/vrxfile/trik_alsa_record_test, with a big thank you to Rostislav Varzar who provides the initial code, and the ideas under a free license.

Questions ? Please file an issue !

Building (Linux only for instance):

  1. Open a terminal
  2. clone alsa_record
  3. cd alsa_record
  4. install the dependencies
  5. in the root dir type "make"

Testing

Then connect a microphone (seen as hw:1,0) and verify it can record : arecord -l For further information : arecord --dump-hw-params -D hw:1,0

N.B. : if you don't own amicrophone, just connect a webcam instead

Once everything is ok, you can start recording anything typing :

./alsa_record test.wav

(type ESC to stop recording and quit)

Important: the output file is a .wav, and you'll have to convert it using ffmpeg (e.g.) intp .mp3 or whatever compressed format.

ffmpeg -i test.wav -vn -ar 44100 -ac 2 -b:a 192k test.mp3

Feedback

Any constructive feedback is welcome !

linux_alsa_audio_record's People

Contributors

ebachard avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.