Package Exports
- mp3-to-wav
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mp3-to-wav) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
mp3-to-wav
Convert mp3
audio data to wav
type, for both audio type mono and stero
1. Install
$ npm install --save mp3-to-wav
2. Usage
const Mp32Wav = require('mp3-to-wav')
new Mp32Wav('mp3 file absolute dir / .mp3 file').exec()
// will produce wav file on provided dir
3. Api
Init
const Mp32Wav = require('mp3-to-wav')
const mp32Wav = new Mp32Wav('mp3 file dir / .mp3 file','wav file saving dir')
arguments | required | description |
---|---|---|
mp3_file_path | true | absolute path to for mp3 file |
wav_file_saving_dir | false | default to same with mp3 file |
Function
mp32Wav.exec()
convert mp3 file to wav file
mp32Wav.decodeMp3()
decode mp3 file
arguments | required | description |
---|---|---|
mp3_file_path | true | absolute path to for mp3 file |
mp32Wav.saveForWav()
encode wav file and saving
arguments | required | description |
---|---|---|
buffer | true | pure voice data wrapped by array |
savePath | true | saving path |
filename | false | filename without postfix |
sampleRate | true | sampleRate |
channels | true | channels number |
float | false | saving type inside |