<commit_before># Ruby SoX

A Ruby wrapper for the `sox` command line tool to process sound.


## Dependencies

* SoX
* Bash (for process substitution combiner strategy)

### Debian / Ubuntu

```bash
apt-get install sox
```

### Mac

```bash
# One of the following
sudo port install sox
brew install sox
```

# Usage

Remember that it's a wrapper for `sox` to provide Ruby API.
It's assumed that you know the basics of sound computing theory and how
the `sox` tool works. Otherwise, `man sox` is your good friend.

## Sox::Cmd

Allows you to do everything that the `sox` command does.

Mix 3 files into one (ruby-sox assumes that input files have same rate and number of channels):

```ruby
sox = Sox::Cmd.new(:combine => :mix)
sox.add_input("guitar1.flac")
sox.add_input("guitar2.flac")
sox.add_input("drums.flac")
sox.set_output("hell_rock-n-roll.mp3")<commit_msg>Update README with chromaprint dependecy<commit_after># Ruby SoX

A Ruby wrapper for the `sox` command line tool to process sound.


## Dependencies

* SoX
* Bash (for process substitution combiner strategy)
* Chromaprint (only to run tests)

### Debian / Ubuntu

```bash
apt-get install sox libchromaprint-dev
```

### Mac

```bash
# One of the following
sudo port install sox chromaprint
brew install sox chromaprint
```

# Usage

Remember that it's a wrapper for `sox` to provide Ruby API.
It's assumed that you know the basics of sound computing theory and how
the `sox` tool works. Otherwise, `man sox` is your good friend.

## Sox::Cmd

Allows you to do everything that the `sox` command does.

Mix 3 files into one (ruby-sox assumes that input files have same rate and number of channels):

```ruby
sox = Sox::Cmd.new(:combine => :mix)
sox.add_input("guitar1.flac")
sox.add_input("guitar2.flac")
sox.add_input("drums.flac")
sox.set_output("hell_rock-n-roll.mp3")
{'fraction_non_alphanumeric': 0.1079607415485278, 'fraction_numerical': 0.004362050163576881, 'mean_word_length': 4.51051051051051, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6293734', 'n_tokens_mistral': 662, 'n_tokens_neox': 607, 'n_words': 239}