For general recorders
Audacity is freeware and, although it is classed as an audio editor, it does have recording capability with the added bonus of being able to edit out the bits that you don't want when you're done.
There are some dedicated stream recorders available that will do extras such as automatically cut silence. You'll probably find that these aren't free but if you download the trial and it's what you're looking for then the price is worth it. Have a look at
Replay Radio and
Replay Music.