Sanskrit was both a written and spoken language in ancient India. Panini's grammar was designed for spoken Sanskrit, and the language was actively used in scholarly discourse, debates, and oral traditions. The idea that Sanskrit was only textual is incorrect.