Closed remoremorali closed 10 months ago
The reason why I hardcode audio/ogg
is because message recorded by element client is audio/ogg
.
Besides audio/ogg
is rarely used in other scenarios. If we add formats(m4a,wav,etc) to the list, bot will transcribe it as well which we may not want it to do so when it is music or something else.
How do you think?
I did some other tests and it seems that the difference that I see depends on the source of the audio message: whatsapp sends ogg while fluffychat for matrix sends mp4s. Also, when sending encrypted messages, fluffychat sends an application/octet-stream and event.mimetype contains the correct audio/mp4 value. And the name of the file starts with "recording" in the case of encrypted messages sent from matrix. I'll udpate my patch accordingly
Thank you for your contribution.
m4a is a showing up in encrypted rooms, so I thought to try and decode anything that start with audio/ for future compatibility.