You should use this version instead; it's better.
Note that this uses a bilinear transform and so is not accurate at high frequencies.
Apply an A-weighting filter to a sound stored as a NumPy array.
Use Audiolab or other module to import .wav or .flac files, for example. http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/audiolab/
Translated from MATLAB script (BSD license) at: http://www.mathworks.com/matlabcentral/fileexchange/69
@rickou The values I used are from https://law.resource.org/pub/us/cfr/ibr/002/ansi.s1.4.1983.pdf
I think I only posted the MZTi code above https://gist.github.com/endolith/148112?permalink_comment_id=3928477#gistcomment-3928477
and again I have qualms about it, I'm not sure if it's handling the high-frequency poles/zeros correctly.