What you're looking for is probably a Fast Fourier Transform, or "Frequency Analysis".
Audacity can do this, with the
Analyze -> Plot Spectrum… tool.
This will output a graph, and you simply find where it peaks to ascertain the Hertz value of whatever sound you were analyzing. This of course only works if the tone is constant.
If your sound file consists of multiple frequencies (pitches) in sequence, then you're likely going to need to get into customized programming of a tool called Max/MSP or something similar, depending on what you're actually trying to do.
If it's not apparent already, a single-in single-out program that takes a piece of music or arbitrary recorded sound and outputs a single Hertz value would not be a useful program. At best, it would be an average frequency value for the entire clip, and if that's really what you need, you should look into automating one of the options above.
Programmatic transcription of recorded sound to Hz values:
(only reliable for music with a single line melody in a clear recording)
- Take as input a waveform, consisting of +/- amplitude over time.
- Decide on a temporal resolution with which to analyze the waveform, n seconds.
- Break the sound file into n-second-long chunks, and run an FFT on each chunk
- Find the peak frequency for each FFT curve
- Transform your results into frequency over time
- Design logic to decide how to break this frequency curve up into "notes".