Skip to content

Commit d2f1985

Browse files
Merge pull request #1425 from edisonmartinsmkt/develop
fix(audio): ensure full WhatsApp compatibility for audio conversion
2 parents ccbd866 + c4ddfe6 commit d2f1985

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,7 +3001,29 @@ export class BaileysStartupService extends ChannelStartupService {
30013001
.noVideo()
30023002
.audioCodec('libopus')
30033003
.addOutputOptions('-avoid_negative_ts make_zero')
3004+
.audioBitrate('128k')
3005+
.audioFrequency(48000)
30043006
.audioChannels(1)
3007+
.outputOptions([
3008+
'-write_xing',
3009+
'0',
3010+
'-compression_level',
3011+
'10',
3012+
'-application',
3013+
'voip',
3014+
'-fflags',
3015+
'+bitexact',
3016+
'-flags',
3017+
'+bitexact',
3018+
'-id3v2_version',
3019+
'0',
3020+
'-map_metadata',
3021+
'-1',
3022+
'-map_chapters',
3023+
'-1',
3024+
'-write_bext',
3025+
'0',
3026+
])
30053027
.pipe(outputAudioStream, { end: true })
30063028
.on('error', function (error) {
30073029
console.log('error', error);

0 commit comments

Comments
 (0)