Skip to content

Commit a978c86

Browse files
authored
Merge pull request EvolutionAPI#1425 from edisonmartinsmkt/develop
fix(audio): ensure full WhatsApp compatibility for audio conversion
1 parent b9d9761 commit a978c86

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2945,6 +2945,28 @@ export class BaileysStartupService extends ChannelStartupService {
29452945
.audioCodec('libopus')
29462946
.addOutputOptions('-avoid_negative_ts make_zero')
29472947
.audioChannels(1)
2948+
.audioBitrate('128k')
2949+
.audioFrequency(48000)
2950+
.outputOptions([
2951+
'-write_xing',
2952+
'0',
2953+
'-compression_level',
2954+
'10',
2955+
'-application',
2956+
'voip',
2957+
'-fflags',
2958+
'+bitexact',
2959+
'-flags',
2960+
'+bitexact',
2961+
'-id3v2_version',
2962+
'0',
2963+
'-map_metadata',
2964+
'-1',
2965+
'-map_chapters',
2966+
'-1',
2967+
'-write_bext',
2968+
'0',
2969+
])
29482970
.pipe(outputAudioStream, { end: true })
29492971
.on('error', function (error) {
29502972
console.log('error', error);

0 commit comments

Comments
 (0)