End sox recording once silence is detected

I’m writing a script that uses sox to record me talking.
Now I need sox to wait until it detects sound before it begins recording, and I do have that figured out. But I also need sox to exit once there has been silence for at least 3 seconds.
As it is now, I have to manually kill sox once I finish talking, otherwise sox just waits again until I talk some more, appending to the output file (That’s not what I want).
Here is the command for recording I am using now:

Somehow managed to mute mplayer and can’t figure out how to restore sound

I was randomly/experimentally pressing buttons while playing a video with mplayer. Something I did caused the video to mute. I then exited the video and tried a different one, but that one was muted too. I didn’t think that mplayer saved its settings across invocations, except for the settings in .mplayer, and I certainly did not save any settings in there, nor do I see anything in there now that could be causing this.