In this article, a method for determination of photoacoustic detector transfer function as an accurate representation of microphone frequency response is presented. The method is based on supervised machine learning techniques, classification and regression, performed by two artificial neural networks. The transfer function is obtained by determining the microphone type and characteristic parameters closely related to its filtering properties. This knowledge is crucial within the signal correction procedure. The method is carefully designed in order to maintain requirements of photoacoustic experiment accuracy, reliability and real-time performance. The networks training is performed using large base of theoretical signals simulating frequency response of three types of commercial electret microphones frequently used in photoacoustic measurements extended with possible flat response of the so-called ideal microphone. The method test is performed with simulated and experimental signals assuming the usage of open-cell photoacoustic set-up. Experimental testing leads to the microphone transfer function determination used to correct the experimental signals, targeting the “true” undistorted photoacoustic response which can be further used in material characterization process.