Within different media the frequency of a sound wave doesn't change. However, the wavelength and velocity changes, but when we see that frequency and wavelength are inversely proportional, that means that when the wavelength increases the frequency will decrease.
2 Answers
The relationship between wavelength and frequency is $v=\lambda f$, where $\lambda$ is the wavelength, $f$ is the frequency, and $v$ is the speed. In order for a wave to be continuous at the interface between two media, the frequency must not change. This gives us $v\propto\lambda$, so when the wavelength increases, the speed increases by the same factor. It's also worth noting that this boundary condition of continuity applies more generally, not just to sound waves.
The frequency of wave depends on its source ,look if a tuning fork has 256 hz frequency then frequency of sound produced by it will also be 256 hz .frequency is constant and it depends on characteristics of source only . Sound is a longitudinal wave , for a wave to be continuous at interface of two boundary media,frequency of wave must remain same.