PHPackages                             jasny/audio - 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. jasny/audio

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

jasny/audio
===========

Process audio files using SoX

v0.1.1(11y ago)514.7k16MITPHPPHP &gt;=5.3.0

Since Aug 5Pushed 4y ago10 watchersCompare

[ Source](https://github.com/jasny/audio)[ Packagist](https://packagist.org/packages/jasny/audio)[ RSS](/packages/jasny-audio/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Jasny Audio
===========

[](#jasny-audio)

Process audio files using [SoX](http://sox.sourceforge.net/)

Waveform
--------

[](#waveform)

With the Jasny\\Audio\\Waveform class you can create a waveform as PNG like:

[![waveform](https://camo.githubusercontent.com/42db8fa55372c5027c9fb0958d761200b79576ee64b631784b5aae427908186e/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3130303832312f313034393438382f38633230393334322d313061362d313165332d393134392d6363353665316663666365612e706e67)](https://camo.githubusercontent.com/42db8fa55372c5027c9fb0958d761200b79576ee64b631784b5aae427908186e/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3130303832312f313034393438382f38633230393334322d313061362d313165332d393134392d6363353665316663666365612e706e67)

```
$waveform = new Waveform($filename, $options);
$waveform->output();
```

Alternatively you can request a set of samples. This can be used to set draw a waveform in JavaScript (see waveform.js).

### Options

[](#options)

optiondefaultunitdescriptionwidth1800pixelsImage widthheight280pixelsImage heightcolor000000hex or rgbaColor of the graphaxisnullhex or rgbaColor of the x axislevelnullThe max amplitute (y axis)offsetnullsecondsStarting point. Negative counts from enddurationnullsecondsDuration of the track of chartTrack statistics
----------------

[](#track-statistics)

```
$track = new Track($filename);
$track->getStats();
```

```
{
    channels: "1",
    dc_offset: "0.000016",
    min_level: "-0.162134",
    max_level: "0.153157",
    pk_lev: "-15.80",
    rms_lev: "-33.56",
    rms_pk: "-24.31",
    rms_tr: "-55.44",
    crest_factor: "7.72",
    flat_factor: "0.00",
    pk_count: "2",
    bit_depth: "30/32",
    length: "1.935601",
    scale_max: "1.000000",
    window: "0.050",
    samples: "42680",
    scaled_by: "2147483647.0",
    maximum_amplitude: "0.153157",
    minimum_amplitude: "-0.162134",
    midline_amplitude: "-0.004489",
    mean_norm: "0.010709",
    mean_amplitude: "0.000016",
    rms_amplitude: "0.020990",
    maximum_delta: "0.115579",
    minimum_delta: "0.000000",
    mean_delta: "0.003656",
    rms_delta: "0.008325",
    rough_frequency: "1391",
    volume_adjustment: "6.168",
    sample_rate: "22050"
}
```

Convert track
-------------

[](#convert-track)

Convert a track to a different format. Uses avconv (or ffmpeg).

```
$track = new Track("sometrack.wav");
$track->convert("sometrack.mp3");
```

Combine tracks
--------------

[](#combine-tracks)

Combine two tracks. Uses [`sox --combine`](http://sox.sourceforge.net/sox.html#OPTIONS).

Available methods

- concatenate
- merge
- mix
- mix-power
- multiply
- sequence

```
$track = new Track($track1);
$track->combine($method, $track2, $outputFilename);
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4304d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3379a93d51305df325df9045e1a8b205d195e4e8c01312dff53a000ee79002eb?d=identicon)[jasny](/maintainers/jasny)

---

Top Contributors

[![jasny](https://avatars.githubusercontent.com/u/100821?v=4)](https://github.com/jasny "jasny (16 commits)")

---

Tags

audio

### Embed Badge

![Health badge](/badges/jasny-audio/health.svg)

```
[![Health](https://phpackages.com/badges/jasny-audio/health.svg)](https://phpackages.com/packages/jasny-audio)
```

###  Alternatives

[php-ffmpeg/php-ffmpeg

FFMpeg PHP, an Object Oriented library to communicate with AVconv / ffmpeg

5.0k21.7M165](/packages/php-ffmpeg-php-ffmpeg)[danog/madelineproto

Async PHP client API for the telegram MTProto protocol.

3.4k855.0k18](/packages/danog-madelineproto)[happyworm/jplayer

jPlayer allows you to create a media player with a consistent interface and experience across all browsers.

4.6k114.2k1](/packages/happyworm-jplayer)[codescale/ffmpeg-php

PHP wrapper for FFmpeg application

495270.5k1](/packages/codescale-ffmpeg-php)[char0n/ffmpeg-php

PHP wrapper for FFmpeg application

495225.1k1](/packages/char0n-ffmpeg-php)[wapmorgan/mp3info

The fastest php library to extract mp3 tags &amp; meta information.

1481.4M7](/packages/wapmorgan-mp3info)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
