Coder Social home page Coder Social logo

ykankaya / snarp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from merlijnwajer/snarp

0.0 1.0 0.0 263 KB

Simple Noise Activated Recording in Python. Previously known as vacr.

Home Page: http://hetgrotebos.org/wiki/SNARP

Makefile 0.94% Shell 1.42% Python 97.64%

snarp's Introduction

SNARP

SNARP (Simple Noise Activated Recording in Python) is, as the title suggests, a program to record audio. It is primarily developed on the N900.

Eventually I'll split it up into a recording part and a Graphical frontend. The frontend would probably be specific to the N900 Maemo 5 QT Widget set.

Command Line Interface

To use SNARP from the UNIX command line, specify an output wav file to write to as a positional argument. By default, snarp.py reads wav data from stdin:

$ cat test.wav | python snarp.py output.wav

The audio in the output will have frames from silence sections of the input removed, but otherwise be a frame-for-frame copy of the input.

Reading data from the standard input makes it particularly easy to read from different audio devices using command line audio programs and pipes. Sox (cross platform) and arecord (Linux) are suggested. Using Sox' rec program to record system audio input, trimming out silences with SNARP:

$ rec -t wav - | python snarp.py output.wav

To specify an input file rather than reading from the standard input, use the -i flag:

$ python snarp.py -i test.wav output.wav

You may need to override the min and max sample levels used to define silent periods:

$ python snarp.py -i test.wav --silence-min -100 --silence-max 100 output.wav

Other options and usage information can be found with python snarp.py -h.

Original SNARP behavior

Use arecord via pipes to emulate SNARP's original default behavior:

$ arecord -D hw:0,0 -r 8000 |\
      python snarp.py --silence-min 120 --silence-max 135 output.wav

And SNARP's original "podcaster" behavior:

$ arecord -D front:CARD=Podcaster,DEV=0 -r 48000 -f S24_3LE |\
      python snarp.py --silence-min -1500000 --silence-max 1500000 output.wav

snarp's People

Contributors

casebeer avatar merlijnwajer avatar

Watchers

 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.