0.1.11 • Published 5 years ago

mp3-to-wav v0.1.11

Weekly downloads
42
License
MIT
Repository
github
Last release
5 years ago

mp3-to-wav

Convert mp3 audio data to wav type, for both audio type mono and stero

npm install mp3-to-wav

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')
argumentsrequireddescription
mp3_file_pathtrueabsolute path to for mp3 file
wav_file_saving_dirfalsedefault to same with mp3 file

Function

mp32Wav.exec()

convert mp3 file to wav file

mp32Wav.decodeMp3()

decode mp3 file

argumentsrequireddescription
mp3_file_pathtrueabsolute path to for mp3 file

mp32Wav.saveForWav()

encode wav file and saving

argumentsrequireddescription
buffertruepure voice data wrapped by array
savePathtruesaving path
filenamefalsefilename without postfix
sampleRatetruesampleRate
channelstruechannels number
floatfalsesaving type inside