mirror of
https://github.com/EvolutionAPI/evolution-audio-converter.git
synced 2025-07-13 15:14:50 -06:00
add wav
This commit is contained in:
parent
3a8356f5fa
commit
ead2e11b5f
2
main.go
2
main.go
@ -82,6 +82,8 @@ func convertAudio(inputData []byte, format string) ([]byte, int, error) {
|
||||
switch format {
|
||||
case "mp3":
|
||||
cmd = exec.Command("ffmpeg", "-i", "pipe:0", "-f", "mp3", "pipe:1")
|
||||
case "wav":
|
||||
cmd = exec.Command("ffmpeg", "-i", "pipe:0", "-f", "wav", "pipe:1")
|
||||
default:
|
||||
cmd = exec.Command("ffmpeg", "-i", "pipe:0", "-ac", "1", "-ar", "16000", "-c:a", "libopus", "-f", "ogg", "pipe:1")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user