Socket
Socket
Sign inDemoInstall

@pencilpix/peaks

Package Overview
Dependencies
152
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @pencilpix/peaks

nodejs server that accept posting a url of audio file and respond with it's peaks.


Version published
Weekly downloads
6
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Audio Files Peaks Generator.

it depends on ffmpeg and canvas. please be sure you have it on the machine before use this server.

installation

clone or download this repo

usage

  1. be sure you have ffmpeg is installed at your machine.
  2. install requirments of node canvas
  3. cd /path/to/repo/clone
  4. npm install or yarn
  5. yarn run start
  6. now you can make get request as follow
const url = 'http://localhost:2500/peaks'
const waveformOptions = {
  barGap: 2,
  barWidth: 2,
  height: 128,
  width: 1200,
  waveColor: '#757575',
  maxWidth: 4000,
  pxRatio: 2,
  numOfSample: 1800,
  waveformType: 1,
}


axios.get(url, {
  track: 'http://kolber.github.io/audiojs/demos/mp3/06-suicidal-fantasy.mp3', // could be ['url']
  ...waveformOptions
})

// -> response { track: 'http://kolber.github.io/audiojs/demos/mp3/06-suicidal-fantasy.mp3', image: 'data:image/png;base64...', peaks: [0.324, 0.3243, ....]}

Keywords

FAQs

Last updated on 10 Aug 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc