Pronouncing Sanskrit and other Indic languages such as Pāli accurately can be quite difficult for native English speakers. Some of the Indian sounds such as the various nasal consonants are indistinquishable for most of us, and the retroflex stops are difficult to distinguish from dental stops. Since a wrongly pronounced word usually means something different, it is worth making the effort. Diacritics are important.

A rough guide

About 80% of pronouncing Sanskrit can be covered by a few basic rules

Follow this and your mantras won't sound too awful. If you are a bit more ambitious read on...

Comprehensive Guide

Vowels

Human vocal tract

Consonants

as for English except for

Aspirated consonants (kh, gh, ch, jh, th, dh, ph, bh): the h's are pronounced so that th as in hothouse, not as in theatre.

Retroflex articulation diagram

The dental consonants (t th d dh) are pronounced with the tongue on the teeth. In English our tongue is often on the gum behind the teeth, making our dental stops sound like something between a true dental and a retroflex.

Retroflex consonants (ṭa ṭha ḍa ḍha ṇa) the tongue is curled back to touch the aveolar ridge.


Notes

To hear the Sanskrit alphabet spoken try the sound files which go with Samskrta-Subodhini: A Sanskrit Primer, spoken by the author, Madhav M. Deshpande.

It is worth noting that those traditions which use mantra are inconsistant on the subject of pronunciation. The old traditions, and the texts themselves, speak of the absolute necessity of correctly pronouncing the syllables for the mantras to have the desired effect. The Chinese are sensitive to this issue and retain the Siddhaṃ characters in the Taisho edition of the Tripiṭaka to ensure that the original pronunciation is not lost in transliterating mantras into Chinese characters.

However in practice those not born to Indic langauges may never really get the hang of the sounds and tend in incorporate 'fudges' into their pronunciation. So the Tibetans apparently struggle with svāhā and pronounce it soha; while the Japanese who have quite a restricted pallet of sounds pronounce it sowa. In fact around India there is variation in pronunciation of Sanskrit, so that a Bengali will pronounce namaskar as though it is written nomoskar (ie the vowel becomes rounded towards an /o/ sound).

There is an old story about someone who mistakenly was pronouncing their mantra incorrectly, but was making great progress with it. When a passing lama corrected their diction, the progress ceased! In one version the someone runs across the top of the lake to catch up with the lama because he has forgotten how the mantra is supposed to sound. When Donald Lopez quotes this story in Prisoners of Shangrila (p.114) he notes that it is a short story by Tolstoy called The Three Hermits. Tolstoy apparently picked this story up from a wandering story teller in 1879, and it's origins are obscure. Was the source in Tibetan, or has it been adapted by Tibetan Buddhists to explain changes in pronunciation? The story is reproduced in "The Autobiography of a Yogi" (p.309) by Paramhansa Yogananda, first published 1946. I suspect that this is the immediate source of the story in Buddhist circles.

There are good aesthetic grounds for attempting to pronounce a language as it is supposed to be pronounced - think how we often wince to hear our mother tongue mangled by a non-native speaker, and how we value words well spoken. Imagine that Sanskrit is the language of the Buddha or Bodhisattva whose mantra you are chanting... would it not be a good idea to pronounce their name well?

However it is also true that if you change the sound of a word, substituting a dental for a retroflex consonant, or a long vowel for a short one, you are frequently using a different word which may well exist indepently and have a different meaning. For instance : dharma is the teachings, reality, and phenomena; while dhārma (long ā) is "justice"; dāma (close to how dharma is frequently pronounced by English speakers) is "a donor or giver"; and darma is "a demolisher" (so don't drop that h!). Our English /d/ sounds a little like the Indian /ḍ/ and this can make a huge difference: ḍama for instance means "a despised mixed caste".

Finally I may say that in attempting to pronounce Sanskrit accurately, in paying attention to what our tonugue is doing when we speak, and paying attention to the details of Sanskrit generally: we are more likely to fulfil the Buddha's injunction that we are mindful of our speech.