That code does not use sound as input. It sythesizes DTMF tones according to the known frequencies of the buttons and it uses sound() to play them.
If you have a different input source, then just make sure that the sounds are put into the variable y and that the sample times are put into the variable t and then call subdecode()
Note: that code is only set up to decode one key per call. If you want to decode from a file with multiple key presses, then you will need to find the boundaries between the key presses and send only one at a time to the script.
