Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsantell/s3-waveform
Generate and store waveform data given an s3 key to an audio file via streams
https://github.com/jsantell/s3-waveform
Last synced: about 1 month ago
JSON representation
Generate and store waveform data given an s3 key to an audio file via streams
- Host: GitHub
- URL: https://github.com/jsantell/s3-waveform
- Owner: jsantell
- License: mit
- Created: 2015-09-13T22:39:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-13T22:55:22.000Z (over 9 years ago)
- Last Synced: 2024-10-16T05:44:38.595Z (3 months ago)
- Language: JavaScript
- Size: 7.2 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# s3-waveform
[![Build Status](http://img.shields.io/travis/jsantell/s3-waveform.svg?style=flat-square)](https://travis-ci.org/jsantell/s3-waveform)
[![Build Status](http://img.shields.io/npm/v/s3-waveform.svg?style=flat-square)](https://www.npmjs.org/package/s3-waveform)Takes an audio file key on S3, creates waveform data for the file, and uploads it back to S3 via streaming.
## Installation
```
$ npm install s3-waveform --save
```## API
### exports.createWaveform(config, callback)
Takes a configuration object, and a callback upon stream completion. Possible configurations below:
* {S3} s3 [required]
* An [AWS.S3](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html) instance, or something with the same interface (mock S3 instance for example).
* {Number} byteSize [required]
* {String} srcBucket [required]
* {String} srcKey [required]
* {String} destBucket [required]
* {String} destKey [required]
* {Number} samples
* How many data points should be in the resulting waveform data. [default=5000]
* {Number} config.channels
* How many channels is the audio file. [default=2]
* {Number} config.outputBitDepth
* Bit depth of the output waveform data. [default=8]## Test
```
$ npm test
```Only mock tests right now, need to add integration.
## License
MIT License, Copyright (c) 2014 Jordan Santell