Sanskrit was the spoken language. Classical Sanskrit has its origin in the end of the Vedic period when the Upanishads were the last sacred texts to be written down, after which Panini, a descendant of Pani and a grammar and linguistic researcher, introduced the refined version of the language.
Sanskrit is a standardized dialect of Old Indo-Aryan, originating as Vedic Sanskrit as early as 1700-1200 BCE. One of the oldest Indo-European languages for which substantial documentation exists, Sanskrit is believed to have been the general language of the greater Indian Subcontinent in ancient times. (Source: Google Search)
Sanskrit is not only a language of Gods as one of Kshatriya’s (Warrior Group) thought suggest that Gods and Godesses had “universal language of thought.” Humans are independent to think in any language and imagine to think in other language next time, it won’t be different than a cross-over of kavya granth dhavni & chitras. God and Goddess will understand. It was used for liturgical purposes i.e. as a worship language by Hinduism, Buddhism, Jainism and Sikhism.
Devanāgarī, (Sanskrit: deva, “god,” and nāgarī (lipi), “[script] of the city”) also called Nāgarī, script used to write the Sanskrit, Prākrit, Hindi, Marathi, and Nepali languages, developed from the North Indian monumental script known as Gupta and ultimately from the Brāhmī alphabet, from which all modern Indian writing systems are derived. Since, Indian ancestors used Sanskrit language therefore, people in modern era still learn to communicate to them supernaturally and recite vedic mantras.