
It depends on what you mean with "quality".
One method could be a plain file compare:
diff (or fc.exe) T.wav R.wav
If the files are equal then T.wav has 100% quality, otherwise it is crap.
More sophisticated methods could be:
-subtract T.wav from R.wav (sample-by-sample) and calculate the power of the difference.wav
-perform listening (blind) tests to find out if there are any audible differences (see other posts for links)