Getting sampling rate and other metadata of an audio being played

Hi,

I was wondering if it’s possible to seek your help regarding obtaining metadata of an audio file being played.

I have a push button in a PySide6-based frame window. When I click on it, it plays the audio with no problem. Is it possible to retrieve information about the audio file being played (such as its sampling rate, bit resolution, and number of channels) to display it in a text list? I am new to this field and not sure how to extract audio metadata correctly.

Thank you for your time.
Best regards,