mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
conversion of audios for sending recorded audio, now it is possible to send mp3 audios and not just ogg
This commit is contained in:
parent
4936d7fcc6
commit
55b14641e0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user