A method for detecting and locating a defect in a housing, in particular for an electronic device, comprising: arranging of at least two loudspeakers (L i) and at least two microphones (M j) in the interior space of the housing; characterized by: for each possible pairing (m) of a loudspeaker (L i) and a microphone (M j): measuring a reference frequency response (REF m) of the sound transmission (S i,j) from the loudspeaker (L i) to the microphone (M j) of that pairing (m); at a later time, for each pairing (m): measuring a current frequency response (SPEC m) of the sound transmission (S i,j) from the loudspeaker (L i) to the microphone (M j) of that pairing (m); for each pairing (m): determining a frequency response difference (DIF m) as the difference between the current frequency response (SPEC m) of that pairing (m) and the reference frequency response (REF m) of that pairing (m); for at least one pairing (m): determining a detection measure (V m) of the frequency response difference (DIF m) of that pairing and, when this at least one detection measure (V m) meets a predefined detection criterion: detecting a defect, for each possible combination (m, n) of two pairings: calculating a correlation measure (R m,n) between the frequency response differences (DIF m, DIF n) of the pairings of that combination, determining the combination (m, n) with the highest correlation measure (R m,n), and, when the same loudspeaker (L i) or the same microphone (M j) is present in the two pairings of this combination, locating the defect as being closer to this loudspeaker (L i) or microphone (M j), than to any other loudspeaker or microphone, respectively. arranging of at least two loudspeakers (L i) and at least two microphones (M j) in the interior space of the housing; characterized by: for each possible pairing (m) of a loudspeaker (L i) and a microphone (M j): measuring a reference frequency response (REF m) of the sound transmission (S i,j) from the loudspeaker (L i) to the microphone (M j) of that pairing (m); at a later time, for each pairing (m): measuring a current frequency response (SPEC m) of the sound transmission (S i,j) from the loudspeaker (L i) to the microphone (M j) of that pairing (m); for each pairing (m): determining a frequency response difference (DIF m) as the difference between the current frequency response (SPEC m) of that pairing (m) and the reference frequency response (REF m) of that pairing (m); for at least one pairing (m): determining a detection measure (V m) of the frequency response difference (DIF m) of that pairing and, when this at least one detection measure (V m) meets a predefined detection criterion: detecting a defect, for each possible combination (m, n) of two pairings: calculating a correlation measure (R m,n) between the frequency response differences (DIF m, DIF n) of the pairings of that combination, determining the combination (m, n) with the highest correlation measure (R m,n), and, when the same loudspeaker (L i) or the same microphone (M j) is present in the two pairings of this combination, locating the defect as being closer to this loudspeaker (L i) or microphone (M j), than to any other loudspeaker or microphone, respectively. for each possible pairing (m) of a loudspeaker (L i) and a microphone (M j): measuring a reference frequency response (REF m) of the sound transmission (S i,j) from the loudspeaker (L i) to the microphone (M j) of that pairing (m); at a later time, for each pairing (m): measuring a current frequency response (SPEC m) of the sound transmission (S i,j) from the loudspeaker (L i) to the microphone (M j) of that pairing (m); for each pairing (m): determining a frequency response difference (DIF m) as the difference between the current frequency response (SPEC m) of that pairing (m) and the reference frequency response (REF m) of that pairing (m); for at least one pairing (m): determining a detection measure (V m) of the frequency response difference (DIF m) of that pairing and, when this at least one detection measure (V m) meets a predefined detection criterion: detecting a defect, for each possible combination (m, n) of two pairings: detecting a defect, for each possible combination (m, n) of two pairings: calculating a correlation measure (R m,n) between the frequency response differences (DIF m, DIF n) of the pairings of that combination, determining the combination (m, n) with the highest correlation measure (R m,n), and, when the same loudspeaker (L i) or the same microphone (M j) is present in the two pairings of this combination, locating the defect as being closer to this loudspeaker (L i) or microphone (M j), than to any other loudspeaker or microphone, respectively.