A microphone is used to convert sound into an electrical signal, so that it can be recorded or transmitted