<commit_before># waveform

![](http://i.imgur.com/oNy41Cr.png)

## Command Line Usage:

    waveform [options] audiofile pngfile

    Available options with their defaults:
    --width 256                 width of the image
    --height 64                 height of the image
    --color-bg 00000000         bg color, rrggbbaa
    --color-center 000000ff     gradient center color, rrggbbaa
    --color-outer 000000ff      gradient outer color, rrggbbaa

    Substitute '-' for a filename to use stdio.

## Node.js Usage:

```js
var generateWaveform = require('waveform');
generateWaveform(audiofile, pngfile, {
    width: 256,                // width of the image
    height: 64,                // height of the image
    'color-bg': '00000000',    // bg color, rrggbbaa
    'color-center': '000000ff',// gradient center color, rrggbbaa
    'color-outer': '000000ff', // gradient outer color, rrggbbaa
}, function(err) {
    // done generating waveform
});
```js

## PHP Usage:

https://github.com/polem/WaveformGenerator

## Dependencies:

 * libsox
 * libpng
 * zlib

## Compile:

    gcc -o waveform main.c -O3 -lsox -lz -lpng

## Compile on osx using macport:

 1. install depedencies:

        sudo port install sox
        sudo port install libpng
        sudo port install zlib

 2. run compiler:

        gcc -o waveform main.c -O3 -lsox -lz -lpng -I/opt/local/include -L/opt/local/lib
<commit_msg>fix readme<commit_after># waveform

![](http://i.imgur.com/oNy41Cr.png)

## Command Line Usage:

    waveform [options] audiofile pngfile

    Available options with their defaults:
    --width 256                 width of the image
    --height 64                 height of the image
    --color-bg 00000000         bg color, rrggbbaa
    --color-center 000000ff     gradient center color, rrggbbaa
    --color-outer 000000ff      gradient outer color, rrggbbaa

    Substitute '-' for a filename to use stdio.

## Node.js Usage:

```js
var generateWaveform = require('waveform');
generateWaveform(audiofile, pngfile, {
    width: 256,                // width of the image
    height: 64,                // height of the image
    'color-bg': '00000000',    // bg color, rrggbbaa
    'color-center': '000000ff',// gradient center color, rrggbbaa
    'color-outer': '000000ff', // gradient outer color, rrggbbaa
}, function(err) {
    // done generating waveform
});
```

## PHP Usage:

https://github.com/polem/WaveformGenerator

## Dependencies:

 * libsox
 * libpng
 * zlib

## Compile:

    gcc -o waveform main.c -O3 -lsox -lz -lpng

## Compile on osx using macport:

 1. install depedencies:

        sudo port install sox
        sudo port install libpng
        sudo port install zlib

 2. run compiler:

        gcc -o waveform main.c -O3 -lsox -lz -lpng -I/opt/local/include -L/opt/local/lib

{'fraction_non_alphanumeric': 0.11035955856176576, 'fraction_numerical': 0.03987184051263795, 'mean_word_length': 2.313679245283019, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1230210', 'n_tokens_mistral': 1038, 'n_tokens_neox': 871, 'n_words': 284}