Skip to content

Commit b6c6ae8

Browse files
committed
fix(audio): ensure full WhatsApp compatibility for audio conversion EvolutionAPI#1425
1 parent 4d0c538 commit b6c6ae8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2998,7 +2998,20 @@ export class BaileysStartupService extends ChannelStartupService {
29982998
.noVideo()
29992999
.audioCodec('libopus')
30003000
.addOutputOptions('-avoid_negative_ts make_zero')
3001+
.audioBitrate('128k')
3002+
.audioFrequency(48000)
30013003
.audioChannels(1)
3004+
.outputOptions([
3005+
'-write_xing', '0',
3006+
'-compression_level', '10',
3007+
'-application', 'voip',
3008+
'-fflags', '+bitexact',
3009+
'-flags', '+bitexact',
3010+
'-id3v2_version', '0',
3011+
'-map_metadata', '-1',
3012+
'-map_chapters', '-1',
3013+
'-write_bext', '0'
3014+
])
30023015
.pipe(outputAudioStream, { end: true })
30033016
.on('error', function (error) {
30043017
console.log('error', error);

0 commit comments

Comments
 (0)