$access_key
$access_key : string
The ACRCloud class
__construct( $access_key, $access_secret, string|null $base_url = null, string|null $ffmpeg_path = null)
Constructs the ACRCloud library class for use.
| $access_key | ||
| $access_secret | ||
| string|null | $base_url | The API url for ACRCloud |
| string|null | $ffmpeg_path | The path to the ffmpeg executable on the system |
identify(string $file_path, integer $start = 5, integer $duration = 20) : array
Fingerprints audio files returning track data
| string | $file_path | System file path for the track to identify |
| integer | $start | Seconds from start to trim for fingerprinting |
| integer | $duration | Length in seconds for trimming for fingerprinting |
ACRCloud metadata response
getWavData(string $file_path, integer $start, integer $duration) : string
Trims down input file to PCM data using ffmpeg
Using ffmpeg to transcode to wav and dump a fragment to stdout then reading it with popen() example command: ffmpeg -i "somefile.mp3" -ac 1 -ar 8000 -f wav -ss 5 -t 10 - 2>/dev/null
| string | $file_path | System file path for the track to identify |
| integer | $start | Seconds from start to trim for fingerprinting |
| integer | $duration | Length in seconds for trimming for fingerprinting |
PCM data as a string