From 55b14641e0cefd72f6982f37c0a907130b1d040a Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Mon, 19 Jun 2023 22:30:59 -0300 Subject: [PATCH] conversion of audios for sending recorded audio, now it is possible to send mp3 audios and not just ogg --- src/whatsapp/services/whatsapp.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsapp/services/whatsapp.service.ts b/src/whatsapp/services/whatsapp.service.ts index 1d3d2881..f92b6ab1 100644 --- a/src/whatsapp/services/whatsapp.service.ts +++ b/src/whatsapp/services/whatsapp.service.ts @@ -1152,8 +1152,8 @@ export class WAStartupService { const response = await axios.get(audio, { responseType: 'arraybuffer' }); fs.writeFileSync(tempAudioPath, response.data); } else { - outputAudio = `${join(process.cwd(), 'temp', 'audio.opus')}`; - tempAudioPath = `${join(process.cwd(), 'temp', 'audio.mp3')}`; + outputAudio = `${join(process.cwd(), 'temp', 'audio.mp4')}`; + tempAudioPath = `${join(process.cwd(), 'temp', 'audioTemp.mp3')}`; const audioBuffer = Buffer.from(audio, 'base64'); fs.writeFileSync(tempAudioPath, audioBuffer);