The respiratory system produces sounds through a process called phonation. Phonation occurs when air from the lungs passes through the vocal cords in the larynx (voice box).
When we breathe normally, the vocal cords are relaxed and open, allowing air to pass through freely. However, when we want to produce sound, the muscles in the larynx tighten, causing the vocal cords to come together. As air is forced through the narrow opening between the vocal cords, they vibrate, creating sound waves.
The pitch and volume of the sound produced depend on the tension and thickness of the vocal cords, as well as the force of the air passing through them. The sound produced by the vocal cords is then modified by the resonating chambers of the throat, mouth, and nasal cavity, which shape the sound into recognizable speech or singing.