How to convert WAV audio file to FLAC format in javascript or php
I am recording audio in wav format using recorder.js https://github.com/mattdiamond/Recorderjs , but the speech-to-speech API only accepts FLAC audio format. Can anyone please direct me to either a FLAC recorder or how to convert the recorded wav file to FLAC file on client side or server side (Linux server).
+3
Vikash
source
to share
1 answer
WAV files can be simply converted to FLAC ffmpeg
via this command:
ffmpeg -i input.wav output.flac
You can find more documents on ffmpeg
the official website. There is also a php
wrapper for the binary ffmpeg
on github .
+3
Alireza Ahmadi
source
to share