Transesophageal echocardiography (TEE) is a test that allows your doctor to record images of your heart from inside your esophagus, or food pipe.