If I remember correctly, you can make a sound file with software suited for that, like Nero etc...
Then you need to substitute your own sound file for an appropriate sound file config in Trainz.
The whistle for the Big Boy in Trainz came from one of my sound files. Actually, it was a Challenger whistle. I also made a great sound of a cross compound compressor to use in large steam locomotives. The one provided was a single stage compressor. Not very good for large steam locomotives.
That took a little extra doing, because you have to make, if I remember, three or four sound files. The reason being you have different stages, such as working hard, slowing down, and idle.
Just check the Content Creation Guide for any relevant instructions.
If you run into problems, just yell here, and if I can't help, there are many great people here who can.
Pete