The point of this answer:
- There isn't just a unit conversion in the calculations, we need $P_s$.
Also, less critical but still important:
- Moist air isn't always ideal, since shifts in $T$ can cause water to condense, for example. In this case, the ideal gas law is inappropriate.
- $C_p$ and $C_v$ also change with temperature, but not much in small ranges. This variation is neglected in most cases.
The key formulas
\begin{align}
c = \sqrt{\gamma R T} \\
\gamma = \frac{C_p}{C_v} \\
C_p = 1.005 + 1.820 \times H \\ C_v = C_p - R
\end{align}
$C_i$ being the specific heats ($C_p$, $C_v$).
Temperature
For the speed of sound ($c$) one Taylor expansion of the second factor, centred at $0$ C (for $\theta$.):
\begin{align}
c &= \sqrt{\gamma R T} = \sqrt{\gamma R \times 273.15} \sqrt{1 + \theta/273.15} \\
c &\approx \sqrt{\gamma R 273.15} + 0.606 \theta
\end{align}
Where $T$ is the temperature in Kelvin and $\theta$ in Celsius.
For dry air the first term is (~331.3 m/s.) See range of validity.
Varying composition changes $R$, $C_v$ and $C_p$ which makes moist air a bit more complex to calculate.
Relative Humidity
To link it to specific humidity:
\begin{align}
H = \large \frac{m_v}{m_d} &= \frac{P_v}{P} \frac{M_w}{M_d}\\
&\approx X_v \times \frac{18.015}{28.9645} \\
&= \frac{\%RH}{100} \times \frac{P_s}{P} \times 0.622
\end{align}
With atmospheric pressure $P$, $P_v$ water vapour pressure, $M_d=28.9645~\rm{g/mol}$ is the molecular weight of dry air, and $M_w = 18.015 ~\rm{g/mol}$ for water.
Note that we need $P_s$.
Saturation pressure
We need $P_s$ to calculate $RH$ and $H$. The Arden-Buck equation yields $P_s$ at a specific temperature. And then do: $P_v = \frac{\%RH}{100} \times P_s$.
An enhancement factor can be used, see guide here or the Wikipedia link above.
Misc.
We need $M$ to calculate $R$ which requires the partial pressure of water vapour in the mix.
The molecular weight of a mixture ($M$) will be given by the fraction ($f$) of each specie ($i$):
$$\large M_{mix} = \sum f_i M_i $$
For dry air it is $28.96~\rm{ g/mol}$. More details on Wikipedia: Air Composition
The molar fraction is calculated with Dalton's Law as $X_v = \frac{P_v}{P}$ of water in air, but we need $P_v$. This makes $P_s$ essential (next section.)
Finally, \begin{align}
M_{mix} (X_v) &= (1 - X_v) \times M_{dry} + X_v\times 18.015 \\
&= - X_v \times 10.945 + 28.96
\end{align}
And for each molar fraction we get $\large R = \frac{R_u}{M}$.