As the bottle fills up, the air column or amount of air inside the bottle decreases. So as a result, the pitch or shrillness of the sound will increase, as frequency or pitch of sound is inversely proportional to the length of vibrating air column. Also the amplitude or the loudness of the sound will decrease, as the amount of the air column vibrating decreases as the bottle fills up. So with the increase in shrillness of the sound, you can detect the filling up of the bottle. So the more the shrillness, the more the bottle has been filled.