Recording cassette audio through a USB port
I'd like to record audio from a cassette onto my iMac (Sierra 10.12.6, Retina 4K). I have a cassette player with a 1/8 inch headphone output only - no line out or RCA outs. I've found that there are cables available with a 1/8 inch jack on one end and a male USB plug on the other which would enable the cassette player to be connected to the iMac. The question is will this allow me to record analogue audio using Garagaband, Audacity etc?
Thanks for any advice.
iMac, macOS Sierra (10.12.6), Retina 4K