mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-18 13:06:32 -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' });
|
const response = await axios.get(audio, { responseType: 'arraybuffer' });
|
||||||
fs.writeFileSync(tempAudioPath, response.data);
|
fs.writeFileSync(tempAudioPath, response.data);
|
||||||
} else {
|
} else {
|
||||||
outputAudio = `${join(process.cwd(), 'temp', 'audio.opus')}`;
|
outputAudio = `${join(process.cwd(), 'temp', 'audio.mp4')}`;
|
||||||
tempAudioPath = `${join(process.cwd(), 'temp', 'audio.mp3')}`;
|
tempAudioPath = `${join(process.cwd(), 'temp', 'audioTemp.mp3')}`;
|
||||||
|
|
||||||
const audioBuffer = Buffer.from(audio, 'base64');
|
const audioBuffer = Buffer.from(audio, 'base64');
|
||||||
fs.writeFileSync(tempAudioPath, audioBuffer);
|
fs.writeFileSync(tempAudioPath, audioBuffer);
|
||||||
|
Loading…
Reference in New Issue
Block a user