How to Calculate temperature, given speed of sound and relative humidity? I know the solution in reverse direction, but I find it very complex to go the other way around and calculate the temperature when given the speed of sound and relative humidity, any ideas?
 A: I don't think there's any particular reason you couldn't do this.  It just might be really hard in practice with real equipment, working out the sensitivities.  I would first seek some law that would allow combinations of different gases for the speed of sound.

Humidity has a small but measurable effect on sound speed (causing it to increase by about 0.1%-0.6%), because oxygen and nitrogen molecules of the air are replaced by lighter molecules of water. This is a simple mixing effect.

I would assume that you have a measure of the atmospheric pressure as well as the temperature.  An approximation of the maximum water vapor pressure would then be suitable.  I then put this in terms of pressure ratios, which is also the number ratio if I understand correctly.  If you have a better computer program to do the lookup, then might be necessary in practice.  This answer could only hope to establish viability in principle anyway.
$$ r = \frac{ P_{H_2O} }{ P} = \frac{ \exp\left(20.386-\frac{5132\,\mathrm{K}}{T}\right)\,\mathrm{mmHg} }{ P } $$
The best equation for the speed of sound in a gas is the following.
$$ c = \sqrt{ \frac{ \gamma k T }{ m } } $$
Some values for normal conditions:


*

*air: gamma = 1.4     m = 28.97 amu

*water:   gamma = 1.33        m = 18 amu


The adiabatic index does change with conditions, but it changes significantly less-so than other values, so it's the best one to take as constant (for each species) for the purposes of proof-of-principle.  Then as per the argument for the speed of sound in mixed gases, I would just presume that we algebraically combine the air and the water vapor for these values.
$$ \gamma' = x r \gamma_{H_20} + (1-x r) \gamma \\
m' = x r m_{H_20} + (1-x r) m $$
I wrote an extra $x$ variable, in order to indicate that the humidity is some fraction of the maximum possible humidity, which is the entire idea as I understand it.
So I think I've defined how to find everything.  The idea is that you measure $c$, so that's the equation that would be solved.  So it's just an iterative solve for $T$, if that's what you want.
Could there be problems?  Absolutely.  My calculation for speed of sound in pure steam is something like $491 m/s$, which is about 25% higher than for dry air.  But in normal conditions the maximum humidity is something like 2.3% partial pressure.  That means that the largest range we could imagine for the speed of sound is more like a 5% range with regard to humidity.
But I guess the biggest question is, if you have an accurate measure of $P$, why can you not get an accurate measure of $T$.  But maybe it would make sense, I don't know what you're doing.  Hope this helps.
