The internal geometry of a wind instrument can be estimated from acoustic measurements. For woodwind instruments, it implies to characterize the inner shape (bore) but also the side holes (dimensions and location). In this study, the geometric parameters are recovered by a gradient-based optimization process, which minimizes the deviation between simulated and measured linear acoustic responses of the resonator for several fingerings through an observable function. The acoustic fields are computed by solving a linear system resulting from the 1D spectral finite elements spatial discretization of the wave propagation equations (including thermo-viscous effects, radiation and side holes). The "full waveform inversion" (FWI) technique exploits the fact that the gradient of the cost function can be computed by solving the same linear system that the one of the direct problem with a different source term. The dependence of the cost function with respect to the choice of the observed quantity, the frequency range and the fingerings used, is first analyzed. Then, the FWI is used to reconstruct, from measured impedances, an elementary instrument with 14 design variables. The results, obtained in about 1 minute on a laptop, are in great agreement with the direct geometric measurements.