That's a very wide and generic question, there is plenty possible solutions you should study by yourself (simple buzzer, piezo, audio amplifier, etc...).
Limit is to have a control interface available on the board, could be a simple GPIO, but also Timer_PWM, I2C, SPI_I2S/SAI, etc... Obviously the external device should be also compatible with the capabilities of STM32MP157C (output current, protocol, speed, etc...) and with SW driver available (if needed).
Natively, the DK2 has an audio jack output, where you could connect an amplified speaker set. Then you could play any audio file using Linux.
In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent