Transesophageal echocardiography (TEE) is a test done to record images of your heart with a probe inside your throat (esophagus). These images help your doctor find and treat problems, such as infection, disease, or defects in your heart's function, walls, or valves. This test may be done when a chest echocardiogram (transthoracic) doesn't give your doctor enough information.