承接 audero/audero-wav-extractor 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

audero/audero-wav-extractor

Composer 安装命令:

composer require 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.

README 文档

README

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

This library requires PHP version 5.3 or higher.

Download

Download via Composer

You can obtain "Audero Wav Extractor" via Composer 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

If you haven't or don't want to use Composer, you can download the library from its repository via Git running the following command:

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

Usage

"Audero Wav Extractor" is very easy to use. However, since the library uses namespaces and follows the PSR 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 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

If you installed "Audero Wav Extractor" using Composer, 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

<?php
    // Include the Composer autoloader
    require_once 'vendor/autoload.php';

    $inputFile = 'sample1.wav';
    $outputFile = 'chunk.wav';
    $start = 0 * 1000; // From 0 seconds
    $end = 2 * 1000; // To 2 seconds

    // Extract the chunk and save it on the hard disk
    try {
       $extractor = new \Audero\WavExtractor\AuderoWavExtractor($inputFile);
       $extractor->downloadChunk($start, $end, $outputFile);
       echo 'Chunk extraction completed.';
    } catch (\Exception $ex) {
       echo 'An error has occurred: ' . $ex->getMessage();
    }
?>

Installed via Git

If you obtained the code via Git, 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

<?php
    // Set include path
    set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/../src/');
    // Include the class loader
    require_once 'Audero\Loader\AutoLoader.php';
    // Set the classes' loader method
    spl_autoload_register('Audero\Loader\AutoLoader::autoload');

    $inputFile = 'sample1.wav';
    $outputFile = 'chunk.wav';
    $start = 0 * 1000; // From 0 seconds
    $end = 2 * 1000; // To 2 seconds

    // Extract the chunk and force the download to the user browser
    try {
       $extractor = new \Audero\WavExtractor\AuderoWavExtractor($inputFile);
       $extractor->saveChunk($start, $end, $outputFile);
       echo 'Chunk extraction completed.';
    } catch (\Exception $ex) {
       echo 'An error has occurred: ' . $ex->getMessage();
    }
?>

Resources

License

Audero Wav Extractor is licensed under the CC BY-NC 3.0 ("Creative Commons Attribution NonCommercial 3.0")

Authors

Aurelio De Rosa (Twitter: @AurelioDeRosa)

audero/audero-wav-extractor 适用场景与选型建议

audero/audero-wav-extractor 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 1.46k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2013 年 02 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「audio」 「extractor」 「wav」 「wave」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 audero/audero-wav-extractor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 audero/audero-wav-extractor 我们能提供哪些服务?
定制开发 / 二次开发

基于 audero/audero-wav-extractor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.46k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 28
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 4
  • 开发语言: JavaScript

其他信息

  • 授权协议: CC-BY-NC-3.0
  • 更新时间: 2013-02-02