Problem
When sending voice notes via WhatsApp Web, using mimetype: "audio/ogg" doesn't work properly. WhatsApp requires the full codec specification "audio/ogg; codecs=opus" for voice notes to be recognized as playable PTT (push-to-talk) messages.
Affected files
src/web/auto-reply.ts - when delivering auto-reply audio
src/web/outbound.ts - when sending outbound audio via sendMessageWeb()
Proposed fix
When media.contentType === "audio/ogg", explicitly set the mimetype to "audio/ogg; codecs=opus":
const audioMimetype =
media.contentType === "audio/ogg"
? "audio/ogg; codecs=opus"
: media.contentType;