Final answer:
Mechanical energy is converted to electrical energy in the inner ear, specifically within the cochlea where the hair cells of the organ of Corti transduce the vibrations into nerve signals.
Step-by-step explanation:
The part of the ear where mechanical energy is transferred to electrical energy is the inner ear. Specifically, this transduction occurs within the cochlea, which is a structure in the labyrinth of the inner ear. Sound waves enter the outer ear and are funneled towards the eardrum, causing it to vibrate.
These vibrations are then transferred via the three ossicles in the middle ear to the oval window of the cochlea. Inside the cochlea, the basilar membrane and the hair cells within the organ of Corti convert these mechanical vibrations into electrical nerve signals, which are sent to the brain for interpretation as sound.