yeboahnanaosei/acoust 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

yeboahnanaosei/acoust

Composer 安装命令:

composer require yeboahnanaosei/acoust

包简介

A simple one-class wrapper for acoustid.org API

README 文档

README

What this package can do 🔨

  • Uses chromaprint to generate or retrieve fingerprint and duration of songs
  • Perform a lookup using the fingerprint of the song against acoustid.org database

Installation

Just run

composer require yeboahnanaosei/acoust

How to use the package

You can use this package in two ways

  • To perform a lookup. (You will need an application API key from acoustid.org for this)
  • To generate the fingerprint and duration of the song for any other purpose you might have.

1. Perform a lookup

Performing a lookup is as simple as calling just one method.

IMPORTANT: To perform a lookup of a song on acoustid.org database, you should have already obtained an application API key from acoustid.org

try {
    // Set the needed parameters
    $song   = 'Path to song';      # Always required
    $apiKey = 'API key'; 	       # Required when performing a lookup
    $format = 'json or xml'        # Optional. Defaults to 'json' if not supplied

    // Create instance of acoust
    // $format is optional and can be omitted
    // In that case $format will default to 'json'
    $acoust = new Acoust($apiKey, $song, $format);

    // All you need to do is to just call query() method
    // This method will return data from acoustid.org in
    // json format by default or in xml if you set your
    // format to xml
    $response = $acoust->query();
} catch (Throwable $e) {
    echo $e->getMessage();
}

2. Generate fingerprint or duration of song

To only generate fingerprints of songs or durations of songs you only need the song. No need of an API key or a response format

try {
    // Set needed parameters
    $song = 'Path to song';

    // Create an instance of acoust
    $acoust = new Acoust($song)

    // Generate fingerprint or duration of the song as you wish
    $fingerprint = $acoust->getFingerprint();
    $duration = $acoust->getDuration();


} catch (Throwable $e) {
    echo $e->getMessage();
}

Contributing ❤️

  • As always pull requests are graciously welcomed
  • Feel free to report bugs and also suggest improvements

统计信息

  • 总下载量: 16
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-06-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固