Skip to content

Commit 55b1464

Browse files
committed
conversion of audios for sending recorded audio, now it is possible to send mp3 audios and not just ogg
1 parent 4936d7f commit 55b1464

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/whatsapp/services/whatsapp.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,8 +1152,8 @@ export class WAStartupService {
11521152
const response = await axios.get(audio, { responseType: 'arraybuffer' });
11531153
fs.writeFileSync(tempAudioPath, response.data);
11541154
} else {
1155-
outputAudio = `${join(process.cwd(), 'temp', 'audio.opus')}`;
1156-
tempAudioPath = `${join(process.cwd(), 'temp', 'audio.mp3')}`;
1155+
outputAudio = `${join(process.cwd(), 'temp', 'audio.mp4')}`;
1156+
tempAudioPath = `${join(process.cwd(), 'temp', 'audioTemp.mp3')}`;
11571157

11581158
const audioBuffer = Buffer.from(audio, 'base64');
11591159
fs.writeFileSync(tempAudioPath, audioBuffer);

0 commit comments

Comments
 (0)