Speaking tubes (or voice tubes) were the communication system that was widely used on ships up until the mid-20th c. Pipes ran through all the compartments of the ship, and through them transmission of information and verbal commands was possible between the bridge and all of the key ship compartments (engine rooms, boiler rooms etc.). Very often the ends of the speaking tube were closed with caps, which had the ability to produce whistling sound when someone was blowing hard on the other side.
The speaking tubes on ships were used for the transmission of reports from the positions of vigilance high on the deck, and from the bridge to the position f the helmsman and the engine room. These had somewhat larger diameter than the usual one, and they were often covered with sound-absorbing material in order to augment their performance.
Copper voice tubes were placed on British warships of two and three decks as early as 1803. One notable use was on HMS Victory at the battle of Trafalgar in 1805; the helm of the Victory ship was destroyed by cannon shot early in the battle. A speaking tube was used later on in order to transfer steering commands from the main deck, three decks further down, where a group of sailors were directly handling the helm of the ship using ropes and pulleys.
A disadvantage of the voice tubes is that they can violate the tightness of watertight spaces. This led to the introduction of shut-off valves at both ends of the speaking tubes in order to impede the water from a flooded compartment from entering other compartments through them.
The permanently placed, rigid voice tubes continue to be used, and they are generally covered with heavy lids in order to prevent water from entering. The speaker must place his/her mouth in the mouth of the tube, which has the shape of a funnel or bell, and the recipient must approach his/her ear at the mouthpiece from his/her side in order to listen to what is being said.
The speaking tubes on ships have now been replaced by magnetic telephones.
Goodwin, P., HMS Victory, Haynes, 2012.
Elliot S., "Voice Pipes" in United States Naval History Proceedings, vol. 35/3/131, 1909 (https://www.usni.org/magazines/proceedings/1909/september/voice-pipes).