Abstract: Methods are disclosed for determining an optimal distance between an electronic device and a user providing an audio sample of a respiratory manoeuvre for use in assessing the lung function of the user. An audio sample dataset comprising a plurality of audio samples of respiratory manoeuvres performed by the user at a plurality of distances between the electronic device and the user is received from an audio sensor in the electronic device. The audio sample dataset is analysed to determine an optimum audio sample of a respiratory manoeuvre for use in assessing the lung function of the user. The optimum distance corresponding with the optimum audio sample is determined. The user is instructed to place the electronic device within a threshold distance of the optimum distance and perform a respiratory manoeuvre. Audio samples of the respiratory manoeuvre at the optimum distance can be used in assessing user lung function.