Most people think that inhaling helium changes the pitch or frequency of the voice. No! That is no what happens. It’s the timbre of the voice that changes.
When you inhale helium, the medium inside the vocal cavities changes from a dense medium, air, to a lighter medium, helium. And we know that in air, any vibrations travel at a speed of 343 m/s. For helium, it’s 1007 m/s. The helium medium now increases the natural frequencies of the cavities. In other words, it changes the responsiveness of the cavities to higher frequencies. This results in the amplification of a higher range of frequencies compared to that of when the air was the medium—causing the squeaky voice!
The key observation here is that the frequency at which the sound is produced by the vocal folds doesn’t change. It’s the resonant frequencies that change, forcing a change in the timbre of the voice.