One suggestion: turn down your speakers.
Another: depending on what app you're using, you should have the option to mute the speakers while recording or some such. Also, reducing the gain on the mic should help as long as keep it high enough for it to pick up what you intend to record.
Basically, though, lower the speaker volume and you might be fine.