https://github.com/masterfermin02/audio
Extracts attributes of audio-files & Visualization
https://github.com/masterfermin02/audio
Last synced: 5 months ago
JSON representation
Extracts attributes of audio-files & Visualization
- Host: GitHub
- URL: https://github.com/masterfermin02/audio
- Owner: masterfermin02
- License: mit
- Created: 2023-12-04T15:03:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-12T21:44:03.000Z (over 2 years ago)
- Last Synced: 2024-12-31T05:26:50.334Z (over 1 year ago)
- Language: PHP
- Size: 50.2 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Extracts attributes of audio-files & Visualization
[](https://packagist.org/packages/masterfermin02/audio)
[](https://github.com/masterfermin02/audio/actions/workflows/run-tests.yml)
[](https://packagist.org/packages/masterfermin02/audio)
This package was designed to identify various attributes of audio files such as frequency, format, channels, resolution, compression, length, and id3-tags. Currently, it supports audio files in .wav, .aif, .mp3, and .ogg formats. Additionally, the latest version comes with a feature that allows users to visualize audio samples similar to popular audio software such as waveLab and CoolEdit, using the GD library.
inspire by [PHP-Extracts-attributes-of-audio-files-Visualization.html](https://www.phpclasses.org/package/482-PHP-Extracts-attributes-of-audio-files-Visualization.html)
## Installation
You can install the package via composer:
```bash
composer require masterfermin02/audio
```
## Usage
```php
use Masterfermin02\Audio\Audio;
$audio = Audio::create();
$audio->loadFile(getenv('filename'));
$audio->printSampleInfo();
if ($audio->waveId == "RIFF")
{
$imageSrc = $audio->getVisualization();
print "
";
}
```
## You can add the image dir
```php
use Masterfermin02\Audio\Audio;
$audio = Audio::create();
$audio->loadFile(getenv('filename'));
$audio->printSampleInfo();
if ($audio->waveId == "RIFF")
{
$imageSrc = $audio->setImageBaseDir('./images/')
->getVisualization($filename);
print "
";
}
```
## Screenshots

## Testing
```bash
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Fermin](https://github.com/masterfermin02)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.