A method for detecting an echo delay, applied to a first electronic device provided with a counter, comprising: in a case that the first electronic device plays an audio and the counter is in an on state, acquiring an N th recording data block received after the counter is turned on, wherein the N th recording data block is a currently received recording data block, and N is an integer greater than 1; performing matching between the N th recording data block and a reference data block that is in a buffer, wherein both the recording data block and the reference data block are data blocks with the same target duration, and after the counter is turned on, the first electronic device starts to buffer an audio data block played by the first electronic device as reference data blocks and store in the buffer; in a case that the N th recording data block matches the reference data block in the buffer, acquiring a first counting value of the counter, wherein the counter performs counting in a case that the recording data block does not match the reference data block in the buffer; in a case that the N th recording data block does not match the reference data block in the buffer, continuing to acquire an (N+1) th recording data block, performing matching between the (N+1) th recording data block and a first reference data block, in a case that the (N+1) th recording data block matches the first reference data block in the buffer, performing matching between a (N+2) th recording data block and a second reference data block in the buffer, and acquiring a third counting value of the counter in a case that each reference data block buffered in the buffer matches a recording data block;; wherein the first reference data block is a first one of the reference data blocks buffered by the first electronic device after the counter is turned on, and the second reference data block is a second one of the reference data blocks buffered by the first electronic device after the counter is turned on; and determining the echo delay based on the target duration and the first or third counting value. in a case that the first electronic device plays an audio and the counter is in an on state, acquiring an N th recording data block received after the counter is turned on, wherein the N th recording data block is a currently received recording data block, and N is an integer greater than 1; performing matching between the N th recording data block and a reference data block that is in a buffer, wherein both the recording data block and the reference data block are data blocks with the same target duration, and after the counter is turned on, the first electronic device starts to buffer an audio data block played by the first electronic device as reference data blocks and store in the buffer; in a case that the N th recording data block matches the reference data block in the buffer, acquiring a first counting value of the counter, wherein the counter performs counting in a case that the recording data block does not match the reference data block in the buffer; in a case that the N th recording data block does not match the reference data block in the buffer, continuing to acquire an (N+1) th recording data block, performing matching between the (N+1) th recording data block and a first reference data block, in a case that the (N+1) th recording data block matches the first reference data block in the buffer, performing matching between a (N+2) th recording data block and a second reference data block in the buffer, and acquiring a third counting value of the counter in a case that each reference data block buffered in the buffer matches a recording data block;; wherein the first reference data block is a first one of the reference data blocks buffered by the first electronic device after the counter is turned on, and the second reference data block is a second one of the reference data blocks buffered by the first electronic device after the counter is turned on; and determining the echo delay based on the target duration and the first or third counting value.