It doesn't go in a txt file, at least not as (agent_play_sound)...that refers to the operation as it appears in the Module System code. Are you using the module system at all in your mod, or just the .txts from another mod?
My statement was based on the assumption that you were referring to a special kind of weapon or some other special feature that required coding. If that isn't the case, then my comment is likely irrelevant. Perhaps then your sound is just too loud? If that's the case someone else will need to let you know what to do there.