If you knew lua you would know where to start.
So I advise that you learn lua before trying anything like this!
But if you did know lua, you should probably start with a PlayerSay or OnPlayerChat hook that will allow you to see what people type nad see if you want to paly sounds or w/e. But be advised that PlayerSay needs networking as it is serverside.
[editline]9th February 2017[/editline]
Hmm… Looking at this now I realize it doesn’t look like that would do anything.