Whistled languages use whistling to emulate speech and facilitate communication. A whistled language is a system of whistled communication which allows fluent whistlers to transmit and comprehend a potentially unlimited number of messages over long distances. Whistled languages are different in this respect from the restricted codes sometimes used by herders or animal trainers to transmit simple messages or instructions. Generally, whistled languages emulate the tones or vowel formants of a natural spoken language, as well as aspects of its intonation and prosody, so that trained listeners who speak that language can understand the encoded message.
Whistled language is rare compared to spoken language, but it is found in cultures around the world. It is especially common in tone languages where the whistled tones transmit the tones of the syllables (tone melodies of the words). This might be because in tone languages the tone melody carries more of the "functional load" of communication while non-tonal phonology carries proportionally less. The genesis of a whistled language has never been recorded in either case and has not yet received much productive study.
Tonal languages are often stripped of articulation, leaving only suprasegmental features such as duration and tone, and when whistled retain the spoken melodic line. Thus whistled tonal languages convey phonemic information solely through tone, length, and, to a lesser extent, stress, and most segmental phonemic distinctions of the spoken language are lost.
In non-tonal languages, more of the articulatory features of speech are retained, and the normally timbral variations imparted by the movements of the tongue and soft palate are transformed into pitch variations.  Certain consonants can be pronounced while whistling, so as to modify the whistled sound, much as consonants in spoken language modify the vowel sounds adjacent to them.
"All whistled languages share one basic characteristic: they function by varying the frequency of a simple wave-form as a function of time, generally with minimal dynamic variations, which is readily understandable since in most cases their only purpose is long-distance communication." 
Different whistling styles may be used in a single language. Sochiapam Chinantec has three different words for whistle-speech: sie3 for whistling with the tongue against the alveolar ridge, jui̵32 for bilabial whistling, and juo2 for finger-in-the-mouth whistling. These are used for communication over varying distances. There is also a kind of loud falsetto (hóh32) which functions in some ways like whistled speech.
The expressivity of whistled speech is likely to be somewhat limited compared to spoken speech (although not inherently so), but such a conclusion should not be taken as absolute, as it depends heavily on various factors including the phonology of the language. For example in some tonal languages with few tones, whistled messages typically consist of stereotyped or otherwise standardized expressions, are elaborately descriptive, and often have to be repeated. However, in languages which are heavily tonal, and therefore convey much of their information through pitch even when spoken, such as Mazatec and Yoruba, extensive conversations may be whistled. In any case, even for non-tonal languages, measurements indicate that high intelligibility can be achieved with whistled speech (90% of intelligibility of non-standardized sentences for Greek  and the equivalent for Turkish.
In continental Africa, speech may be conveyed by a whistle or other musical instrument, most famously the "talking drums". However, while drums may be used by griots singing praise songs or for inter-village communication, and other instruments may be used on the radio for station identification jingles, for regular conversation at a distance whistled speech is used. As two people approach each other, one may even switch from whistled to spoken speech in mid-sentence.
Silbo on the island of La Gomera in the Canary Islands, based on Spanish, is one of the best-studied whistled languages. The number of distinctive sounds or phonemes in this languages is a matter of disagreement, varying according to the researcher from two to five vowels and four to nine consonants. This variation may reflect differences in speakers' abilities as well as in the methods used to elicit contrasts. The work of Meyer   clarifies this debate by providing the first statistical analyzes of production for various whistlers as well as psycholinguistic tests of vowel identification.
Other whistled languages exist or existed in such parts of the world as Turkey (Kuşköy, "Village of the Birds"), France (the village of Aas in the Pyrenees), Mexico (the Mazatecs and Chinantecs of Oaxaca), South America (Pirahã), Asia (the Chepang of Nepal), and New Guinea. They are especially common and robust today in parts of West Africa, used widely in such populous languages as Yoruba and Ewe. Even French is whistled in some areas of western Africa.
Whistling is also used a means of communication throughout the streets of inner city Dublin. This type of whistling is basic and only has one vowel and one consonant. Locals missing lower or upper teeth usually have a more pronounced whistle. It can be heard over great distances – for example from one end of Lower Abbey street all the way up to the top of Upper Abbey street (over 1 mile).
"The city is very busy, with lots of alleyways, which makes shoutin very difficult," whistled one local. As a result, a tradition developed whereby if one person heard a whistle, they passed it on. Locals got so skilled at it that messages have been successfully passed right from one end of the city to the other. Unlike other countries, Dublin locals also use the whistling language even when they are a mere 5 feet from each other. This method is usually combined with a style of Irish overtone singing
Most whistle languages, of which there are several hundred, are based on tonal languages.
Only the tone of the speech is saved in the whistle, things such as articulation and phonation are eliminated. These are replaced by other features such as stress and rhythmical variations. However, some languages, like that of the people of Aas in the Zezuru who speak a Shona-derived dialect, include articulation so that consonants interrupt the flow of the whistle. A similar language is the Tsonga whistle language used in the highlands in the Southern parts of Mozambique.
This should not be confused with the whistled sibilants of Shona.
In the Greek village of Antia, only few whistlers remain now  but in 1982 the entire population knew how to whistle their speech.
Whistled speech may be very central and highly valued in a culture. Shouting is very rare in Sochiapam Chinantec. Men in that culture are subject to being fined if they do not handle whistle-speech well enough to perform certain town jobs. They may whistle for fun in situations where spoken speech could easily be heard.
In Sochiapam, Oaxaca, and other places in Mexico, and reportedly in West Africa as well, whistled speech is men's language: although women may understand it, they do not use it.
Though whistled languages are not secret codes or secret languages (with the exception of a whistled language used by ñañigos insurgencies in Cuba during Spanish occupation) , they may be used for secretive communication among outsiders or others who do not know or understand the whistled language though they may understand its spoken origin. Stories are told of farmers in Aas during World War II, or in La Gomera, who were able to hide evidence of such nefarious activities as milk-watering because they were warned in whistle-speech that the police were approaching. 
Whistled languages are normally found in locations with difficult mountainous terrain, slow or difficult communication, low population density and/or scattered settlements, and other isolating features such as shepherding and cultivation of hillsides.  Thery have been more recently found in dense forests like the Amazon where they may replace spoken dialogues in the villages, while hunting or fishing to overcome the pressure of the acoustic environment.   The main advantage of whistling speech is that it allows the speaker to cover much larger distances (typically 1 – 2 km but up to 5 km in mountains and less in reverberating forests) than ordinary speech, without the strain (and lesser range) of shouting. The long range of whistling is enhanced by the mountainous terrain found in areas where whistled languages are used. Many areas with such languages work hard to preserve their ancient traditions, in the face of rapidly advancing telecommunications systems in many areas.
A whistled tone is essentially a simple oscillation (or sine wave), and thus timbral variations are impossible. Normal articulation during an ordinary lip-whistle is relatively easy though the lips move little causing a constant of labialization and making labial and labiodental consonants (p, b, m, f, etc.) problematical.  "Apart from the five vowel-phonemes [of Silbo Gomero] — and even these do not invariably have a fixed or steady pitch — all whistled speech-sound realizations are glides which are interpreted in terms of range, contour, and steepness." 
In a non-tonal language, segments may be differentiated as follows:
The following list is of languages that exist or existed in a whistled form, or of ethnic groups that speak such languages. In some cases (e.g. Chinantec) the whistled speech is an important and integral part of the language and culture; in others (e.g. Nahuatl) its role is much lesser.