fun project! if you arent married to python, or the idea of writing a bunch of superfluous code (:P) fft'ing a sound is pretty trivial, and creating a sound at that frequency is also trivial from command line. i google for 15 seconds, looks like this library https://aubio.org/manual/latest/cli.html would work fine with something like
aubio notes -r $(aubio pitch myfile.wav)
would probably do it. i love python as much as the next person, but sometimes... ah well, cool project anyway!