This code allows for simultaneous playback and recording of audio files stored in a directory. It applies naive latency removal and normalisation of the input files. When used be remember to adjust input and output levels of your playback and recording device.
Audio files in input_db_small directory from TIMIT database.
Tested on Windows 10 with Python 3.6.7.