PHPackages                             audero/audero-wav-extractor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. audero/audero-wav-extractor

ActiveLibrary[Image &amp; Media](/categories/media)

audero/audero-wav-extractor
===========================

Audero Wav Extractor is a PHP library that allows to extract a chunk from a wav file. The extracted chunk can be saved on the hard disk, can be forced to be prompted as download by the user's browser or returned as a string for a later processing.

2.1.0(13y ago)111.5k4CC-BY-NC-3.0JavaScriptPHP &gt;=5.3.0

Since Feb 2Pushed 12y ago1 watchersCompare

[ Source](https://github.com/AurelioDeRosa/Audero-Wav-Extractor)[ Packagist](https://packagist.org/packages/audero/audero-wav-extractor)[ Docs](https://bitbucket.org/AurelioDeRosa/audero-wav-extractor)[ RSS](/packages/audero-audero-wav-extractor/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

Audero Wav Extractor
====================

[](#audero-wav-extractor)

[Audero Wav Extractor](https://github.com/AurelioDeRosa/Audero-Wav-Extractor) is a PHP library that allows to extract a chunk from a wav file. The extracted chunk can be saved on the hard disk, can be forced to be prompted as download by the user's browser or returned as a string for a later processing.

Requirements
------------

[](#requirements)

This library requires PHP version 5.3 or higher.

Download
--------

[](#download)

### Download via [Composer](http://getcomposer.org/)

[](#download-via-composer)

You can obtain "Audero Wav Extractor" via [Composer](http://getcomposer.org/) adding the following lines to your `composer.json`:

```
"require": {
    "audero/audero-wav-extractor": "2.0.*"
}

```

And then run the `install` command to resolve and download the dependencies:

```
php composer.phar install

```

Composer will install the library to your project's `vendor/audero` directory.

### Download via [Git](http://git-scm.com/)

[](#download-via-git)

If you haven't or don't want to use [Composer](http://getcomposer.org/), you can download the library from its [repository](https://github.com/AurelioDeRosa/Audero-Wav-Extractor) via [Git](http://git-scm.com/) running the following command:

```
git clone https://github.com/AurelioDeRosa/Audero-Wav-Extractor.git

```

Usage
-----

[](#usage)

"Audero Wav Extractor" is very easy to use. However, since the library uses namespaces and follows the [PSR standards](https://github.com/php-fig/fig-standards), you've to use an autoloader to dynamically load the classes needed. After that, you have to create an `AuderoWavExtractor` instance and call the method that better fits your needs. With [Audero Wav Extractor](https://github.com/AurelioDeRosa/Audero-Wav-Extractor) you can download the chunk using `downloadChunk()`, save it on the hard disk using `saveChunk()` or retrieve it as a string using `getChunk()`.

### Installed via [Composer](http://getcomposer.org/)

[](#installed-via-composer)

If you installed "Audero Wav Extractor" using [Composer](http://getcomposer.org/), you can rely on the built autoloader. So, after included the latter, you can use one of the previously cited methods as shown in the following example.

#### Extract a chunk from a wav file and force the download to the user's browser

[](#extract-a-chunk-from-a-wav-file-and-force-the-download-to-the-users-browser)

```

```

### Installed via [Git](http://git-scm.com/)

[](#installed-via-git)

If you obtained the code via [Git](http://git-scm.com/), you can use the autoloader provided by the library. However, before using it, you've to add the path to the library to the PHP include path as shown in the following example.

#### Extract a chunk from a wav file and save it into the local disk

[](#extract-a-chunk-from-a-wav-file-and-save-it-into-the-local-disk)

```
