When an audio message is received, the bot downloads the audio file, converts it to a numpy array, loads the Whisper model, transcribes the audio, and sends back the result as a text message. The bot uses the Matrix Client from the mautrix library to interact with Matrix.