CN112671966B - Ear-return time delay detection device, method, electronic equipment and computer readable storage medium - Google Patents

Ear-return time delay detection device, method, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN112671966B
CN112671966B CN202110059526.7A CN202110059526A CN112671966B CN 112671966 B CN112671966 B CN 112671966B CN 202110059526 A CN202110059526 A CN 202110059526A CN 112671966 B CN112671966 B CN 112671966B
Authority
CN
China
Prior art keywords
sound
sequences
receiving
ear
sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110059526.7A
Other languages
Chinese (zh)
Other versions
CN112671966A (en
Inventor
朱星鑫
江愉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110059526.7A priority Critical patent/CN112671966B/en
Publication of CN112671966A publication Critical patent/CN112671966A/en
Application granted granted Critical
Publication of CN112671966B publication Critical patent/CN112671966B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the disclosure discloses an ear-return delay detection device, an ear-return delay detection method, electronic equipment and a computer readable storage medium. The method for detecting the ear return time delay comprises the following steps: sound playing means for playing a first sound; the earphone is connected with the system to be tested and is used for receiving the first sound and sending the first sound to the system to be tested; the earphone is further used for receiving a second sound obtained by processing the first sound from the system to be tested and playing the second sound; the sound synthesis device is used for receiving the first sound and the second sound and synthesizing the first sound and the second sound according to the receiving sequence to obtain a synthesized sound signal; calculating means for calculating a time delay between the first sound and the second sound from the synthesized sound signal. The ear return time delay detection device solves the problems of complex and inaccurate calculation time delay through the mutual matching of a plurality of components.

Description

Ear-return time delay detection device, method, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of ear-return delay detection, and in particular, to an ear-return delay detection apparatus, an ear-return delay detection method, an electronic device, and a computer readable storage medium.
Background
With the rapid development of information technology, mobile internet technology is also rapidly advancing. Whether the intelligent equipment is appeared or the 5G age is coming, or the big data, AI intelligence, algorithm and other technologies are applied, the flying wings are inserted into the electronic mobile equipment. In real life, the technology is beneficial to the richness and the color of social interaction, especially the appearance of a smart phone, breaks the space-time limit of daily interaction of human beings, is a comprehensive palm mobile device truly integrating mass information, network audio-visual and leisure entertainment and the like, and meets the daily information demands and the social interaction of people.
Current devices produce some time delay from the time the information is received to the time the information is processed and presented. If some APP of K songs at present, the voice of singing of the user is received through the microphone, then the voice is played through the speaker after passing through the mobile phone audio link and the audio processing module of K songs APP, the microphone is usually the microphone of the earphone of the user, and the speaker is the speaker of the earphone of the user, so that the voice of the user has a time delay from sending to returning to the ear of the user through the earphone, which is called ear return time delay.
The scheme for testing the return time delay of the ear at present is troublesome, has great limitation on scenes and has low efficiency. The first is to use artificial ears and mouths for detection, which has a great limit on the field and expensive equipment; the other is to collect the ear-return audio manually and calculate the ear-return time delay manually by professional audio software, but the method is complex and inaccurate.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In order to solve the above technical problems, the embodiments of the present disclosure provide the following technical solutions.
In a first aspect, an embodiment of the present disclosure provides an earreturn delay detection apparatus, including:
sound playing means for playing a first sound;
the earphone is connected with the system to be tested and is used for receiving the first sound and sending the first sound to the system to be tested; the earphone is further used for receiving a second sound obtained by processing the first sound from the system to be tested and playing the second sound;
The sound synthesis device is used for receiving the first sound and the second sound and synthesizing the first sound and the second sound according to the receiving sequence to obtain a synthesized sound signal;
calculating means for calculating a time delay between the first sound and the second sound from the synthesized sound signal.
In a second aspect, an embodiment of the present disclosure provides an ear-return delay detection method, including:
playing the first sound;
receiving the first sound and sending the first sound to the system to be tested;
receiving a second sound obtained by processing the first sound from the system to be tested and playing the second sound;
receiving the first sound and the second sound, and synthesizing the first sound and the second sound according to the receiving sequence to obtain a synthesized sound signal;
and calculating the time delay between the first sound and the second sound according to the synthesized sound signal.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the preceding second aspects.
In a fourth aspect, embodiments of the present disclosure provide a non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer instructions for causing a computer to perform the method of any one of the preceding second aspects.
The embodiment of the disclosure discloses an ear-return delay detection device, an ear-return delay detection method, electronic equipment and a computer readable storage medium. The method for detecting the ear return time delay comprises the following steps: sound playing means for playing a first sound; the earphone is connected with the system to be tested and is used for receiving the first sound and sending the first sound to the system to be tested; the earphone is further used for receiving a second sound obtained by processing the first sound from the system to be tested and playing the second sound; the sound synthesis device is used for receiving the first sound and the second sound and synthesizing the first sound and the second sound according to the receiving sequence to obtain a synthesized sound signal; calculating means for calculating a time delay between the first sound and the second sound from the synthesized sound signal. The ear return time delay detection device solves the problems of complex and inaccurate calculation time delay through the mutual matching of a plurality of components.
The foregoing description is only an overview of the disclosed technology, and may be implemented in accordance with the disclosure of the present disclosure, so that the above-mentioned and other objects, features and advantages of the present disclosure can be more clearly understood, and the following detailed description of the preferred embodiments is given with reference to the accompanying drawings.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a schematic structural diagram of an earloop delay detection device according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating steps executed by the ear-return delay detection device according to the embodiment of the present disclosure;
fig. 3 is a further flowchart illustrating steps performed by the ear-return delay detection apparatus according to an embodiment of the present disclosure;
fig. 4 is a further flowchart illustrating steps performed by the ear-return delay detection apparatus according to an embodiment of the present disclosure;
fig. 5 is a flowchart of an earloop delay detection method according to an embodiment of the present disclosure;
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Fig. 1 is a schematic structural diagram of an earreturn delay detection device according to an embodiment of the present disclosure. As shown in fig. 1, the earloop delay detection device includes a sound playing device 101, an earphone 102, a sound synthesizing device 103, and a computing device 104. Wherein, the liquid crystal display device comprises a liquid crystal display device,
sound playing means 101 for playing a first sound;
the earphone 102 is connected to the system to be tested, and is configured to receive the first sound and send the first sound to the system to be tested; the earphone is further used for receiving a second sound obtained by processing the first sound from the system to be tested and playing the second sound;
Sound synthesizing means 103 for receiving the first sound and the second sound, and synthesizing the first sound and the second sound in the receiving order to obtain a synthesized sound signal;
computing means 104 for computing a time delay between the first sound and the second sound from the synthesized sound signal.
The sound playing device 101 is configured to play a preset audio for detecting the ear return time delay, where the first sound is generated by playing the audio by the sound playing device.
Optionally, the system to be tested that the earphone 102 is connected to is an intelligent terminal, such as a mobile phone, where the intelligent terminal includes a program for processing audio, for example, in an application scenario, the smart phone includes a K song APP, the smart phone receives the first sound through an earphone microphone, and then plays the first sound through an earphone audio link and the K song APP through an earphone speaker to send out the second sound, where the content of the first sound is the same as that of the second sound, and only the playing time of the second sound is later than that of the first sound.
Optionally, the sound synthesizing device 103 is a recording device, which is configured to record the first sound and the second sound, so that the synthesized sound signal includes the first sound signal and the second sound signal, and the processing delay of the system to be tested is also recorded in the synthesized sound signal.
Specifically, the sound synthesizing apparatus 103 is configured to:
receiving a first sound played by the sound playing device;
receiving a second sound played by the earphone;
combining the first sound and the second sound into a composite sound signal according to the receiving order.
Optionally, the computing device is a processor or a device with a processor for computing a time delay between the first sound and the second sound from the synthesized sound signal. By the detection device, the synthesized sound signal can be conveniently and rapidly obtained, and the time delay of the system to be detected is calculated by the synthesized sound signal. The system to be tested is replaceable for the time delay detection device, namely, the time delay of detecting different systems to be tested can be replaced by different systems to be tested when the system to be tested connected with the earphone.
Further, as shown in fig. 1, the earreturn delay detection device further includes: a headset securing device 105 for securing the headset 102 by a user. In order to make the detection more accurate, the ear time detection device further comprises an earphone fixing device for fixing the earphone, so that the earphone is fixed at a position close to the sound playing device and the sound synthesizing device.
Optionally, the earphone fixing device 105 includes: a trunking track 1051 for securing the cable of the headset; a headset securing wire 1052 for securing a cable of a headset positioned in the trunking track. As shown in fig. 1, the headset fixture 105 includes two raceway rails 1051 in which two cables of a headset are disposed; each wire slot track comprises two earphone fixing wires, and the directions of the earphone fixing wires are intersected with the directions of the wire slot tracks, so that the earphone fixing wires can fix cables of the earphones, and the positions of the earphones when receiving first sound and playing second sound are unchanged.
Optionally, the calculating means 104 is configured to calculate a time delay between the first sound and the second sound according to the synthesized sound signal, including performing the following steps:
step S201, a plurality of first sampling points of the synthesized sound signal are obtained;
step S202, calculating a plurality of autocorrelation coefficients of the synthesized sound signal according to the plurality of first sampling points;
step S203, acquiring a first synthesized sub-signal corresponding to the first sound from the synthesized sound signal;
Step S204, determining the maximum correlation coefficient in the plurality of sub-correlation coefficients according to the first synthesized sub-signal;
step S205, the time delay is obtained through calculation according to the maximum autocorrelation coefficient.
In this alternative embodiment, the synthesized sound signal is represented by a sampling rate and a sampling point, and the synthesized sound signal is typically obtained by sampling an analog sound signal using a sampling rate, such as 5KHz, 22KHz, 44KHz, 48KHz, etc., which represents the number of samples per second or the number of samples obtained by sampling per second, such as 5KHz, i.e., 5000 samples per second, to obtain 5000 sampling points.
In the above step S201, a plurality of first sampling points in the synthesized sound signal are acquired, where the plurality of first sampling points may be all sampling points or part of sampling points in the synthesized sound signal. Since the first sampling points may represent the synthesized sound signal itself, a plurality of autocorrelation coefficients of the synthesized sound signal may be obtained through correlation between a plurality of first sampling points in step S202.
Further, in executing the step S202, the computing device 104 is further configured to execute the following steps:
Step S301, forming a first sequence of the plurality of first sampling points in sequence;
step S302, a plurality of second sequences are sequentially intercepted from the first sequences according to the sequence of the first sampling points;
step S303, calculating correlation coefficients of the plurality of second sequences and the first sequence in turn according to lengths of the plurality of second sequences to obtain the plurality of autocorrelation coefficients.
In the above step S301, the plurality of first sampling points form a first sequence in order, where the order is the sampling order of the first sampling points, that is, the arrangement order of the sampling points in the synthesized sound signal, and in an exemplary embodiment, there are 100 sampling points in the synthesized sound signal, which are x1, x2 … … x100, respectively, and then the first sequence is [ x1, x2, … … x100]. Optionally, for facilitating subsequent calculation, the step S301 includes: and storing the plurality of first sampling points into a first array in sequence, wherein each first sampling point is an element in the first array. If the first array is numbered from 1, the 1 st position of the first array is stored in x1, the 1 st position is stored in x2, and the 100 th position of … … is stored in x100, so that each first sampling point is an element in the first data, and the first array forms the first sequence.
In the step S302, a plurality of second sequences are intercepted from the first sequences, and optionally, the steps include, in order of the first sampling points: and starting from the Nth first sampling point, intercepting M-N+1 first sampling points as a second sequence, wherein the value of N is added with 1 every time of interception until N is more than M. Wherein N is more than or equal to 1 and less than or equal to M, and M is the number of first sampling points or the length of the first sequence. Describing the above example, the step S302 includes: one bit is moved back in sequence starting from the first element in the first array to intercept a plurality of second sequences. Illustratively, the first sequence is [ x1, x2, … … x100], and the second sequence is [ x1, x2, … … x100], [ x2, x3, … … x100], [ x3, x4, … … x100] … …, [ x100], thereby truncating 100 second sequences; for convenience of subsequent calculations, the second sequence may also be stored in a second array, where the elements of the second array are denoted by y, and the second sequence is [ y1, y2 … … y100] [ y2, y3, … … y100], [ y3, y4, … … y100] … …, [ y100].
In the step S303, the correlation coefficients of the second sequences and the first sequences are sequentially calculated according to the lengths of the second sequences, so as to obtain the autocorrelation coefficients. In this step, the number of the first sampling points participating in calculation in the first sequence is controlled according to the lengths of the plurality of second sequences. Optionally, the step S303 further includes:
Intercepting a plurality of third sequences from the first array in sequence according to the lengths of the plurality of second sequences, wherein the plurality of third sequences are in one-to-one correspondence with the plurality of second sequences, and the lengths of the third sequences and the second sequences which are in one-to-one correspondence are the same;
and calculating correlation coefficients between the second sequence and the third sequence which are in one-to-one correspondence in sequence to obtain the plurality of autocorrelation coefficients.
Taking the above example as an example, the second sequences are [ y1, y2 … … y100] [ y2, y3, … … y100], [ y3, y4, … … y100] … …, [ y100], and the first group number is [ x1, x2, … … x100], and then the third sequences are sequentially truncated from the first group by the length of the second sequences: [ x1, x2, … … x100], [ x1, x2, … … x99], [ x1, x2, … … x98] … …, [ x1], wherein the plurality of third sequences and the plurality of second sequences are in one-to-one correspondence through length, and the lengths of the corresponding third sequences and second sequences are the same. And then sequentially calculating correlation coefficients between the two corresponding third sequences and the second sequences, so that a plurality of autocorrelation coefficients of the synthesized signal can be obtained.
Optionally, the autocorrelation coefficients are calculated by the following formula:
Figure BDA0002901903510000091
Wherein n is the length of the third sequence and the second sequence. That is, the value of n is changed from the length M of the first sequence to 1 in a decreasing manner, and M autocorrelation coefficients are calculated. The M autocorrelation coefficients are stored in a third array to obtain a plurality of autocorrelation coefficients [ r1, r2, … … rM ] arranged in sequence, where m=100 in the above example, the autocorrelation coefficients are [ r1, r2, … … r100].
Optionally, in the step S203, the first synthesized sub-signal may be obtained by using the number of sampling points, where the sampling rate of the first sound is the same as the sampling rate of the synthesized sound signal, and since the sampling rates are the same, the same sampling points obtained by sampling the signals with the same length are the same, and thus the sampling points of the first synthesized sub-signal may be obtained by using the sampling points of the first sound. In some cases the sampling rate of the first sound may be different from the sampling rate of the synthesized sound signal, so optionally, in this step the first synthesized sub-signal may also be acquired by the length of the first sound. That is, even though the sampling rates are different, since the duration of the first sound and the duration of the first synthesized sub-signal are the same, the corresponding length may be truncated from the start point of the synthesized sound signal by the length of the first sound to acquire the first synthesized sub-signal.
In the step S204, since the first sound and the second sound are the same or similar, the component corresponding to the first sound and the component corresponding to the second sound are also the same or similar in the synthesized signal, by moving the 1 st sampling point of the sequence in sequence by the method in the step S102, when the component corresponding to the first sound and the component corresponding to the second sound overlap, the obtained autocorrelation coefficient should be significantly higher than other autocorrelation coefficients, and thus the starting point of the component corresponding to the second sound in the synthesized sound signal can be obtained.
Optionally, when performing the step S204, the computing device 104 further includes performing the following steps:
step S401, obtaining the number of second sampling points corresponding to the first synthesized sub-signal, where the second sampling points are part of the plurality of first sampling points;
step S402, calculating a maximum autocorrelation coefficient of the autocorrelation coefficients whose positions are arranged after the number of the second sampling points.
In the step S401, after the first composite sub-signal is obtained, the number of second sampling points corresponding to the first composite sub-signal is obtained, and the first composite sub-signal is a part of the composite signal, so that the second sampling points are a part of the plurality of first sampling points.
Since the component corresponding to the first sound and the component corresponding to the second sound are identical or similar in the synthesized sound signal, in the process of calculating the autocorrelation coefficients, two autocorrelation coefficients are significantly higher than other autocorrelation coefficients, that is, when the component corresponding to the first sound and the component corresponding to the first sound overlap, the component corresponding to the first sound and the component corresponding to the second sound overlap. Therefore, as long as the situation that the component corresponding to the first sound and the component corresponding to the first sound are overlapped is eliminated, the position of the component corresponding to the second sound in the synthesized sound signal can be determined by finding the maximum autocorrelation coefficient.
Therefore, in step S402, a plurality of autocorrelation coefficients whose positions are after the number of the second sampling points are truncated from the third array, and the maximum autocorrelation coefficient is determined from the autocorrelation coefficients, where the position of the maximum autocorrelation coefficient in the third array is the position of the component corresponding to the second signal in the composite signal. For example, as an implementation manner, if the number of the second sampling points is k, the first k elements in the third array are set to 0, and then the maximum value of all the elements in the third array is calculated to be the maximum autocorrelation coefficient. In the above example, the third array is [ r1, r2, … … r100], and if the number of the second sampling points is 10, the first 10 elements of the third array are set to 0, so as to obtain the third array as follows: [0, … …,0, r11 … … r100], whereby the largest autocorrelation coefficient in the third array and its position in the third array can be obtained.
In the step S205, after the maximum autocorrelation coefficient is obtained, the starting position of the component corresponding to the second sound is obtained, and the time length from the starting position of the synthesized signal to the starting position of the component corresponding to the second sound is the delay.
Optionally, when performing the step S205, the computing device 104 further includes performing the following steps:
the time delay is calculated based on the position of the maximum autocorrelation among the plurality of autocorrelation coefficients and the sampling frequency of the synthesized sound signal.
The position of the maximum autocorrelation among the autocorrelation coefficients is the position of the maximum autocorrelation coefficient in the third array, that is, the position of the first sampling point of the component corresponding to the second sound in the first sequence. The position of the sampling point is related to the sampling rate and time, if the sampling rate is 2Hz, that is, the sampling is carried out 2 times per second, the 5 th sampling point is generated in the 2.5 th second, and the time delay between the 5 th sampling point and the 1 st sampling point is 2.5 seconds, so that the time delay can be calculated according to the position and the sampling rate. In this alternative embodiment, the quotient of the number of the locations and the sampling frequency is calculated as the time delay. That is, the time delay is calculated by dividing the position number of the maximum coefficient in the third array by the sampling frequency. As in the example above, the time delay between the 5 th sample point to the first sample point is 5/2Hz = 2.5 seconds.
Fig. 5 is a schematic diagram of an ear-return time delay detection method according to another embodiment of the present disclosure, which is executed by the ear-return time delay detection device according to the above embodiment. The ear return time delay detection method comprises the following steps:
step S501, playing a first sound;
step S502, receiving the first sound and sending the first sound to the system to be tested;
step S503, receiving a second sound obtained by processing the first sound from the system to be tested and playing the second sound;
step S504, receiving the first sound and the second sound, and synthesizing the first sound and the second sound according to the receiving sequence to obtain a synthesized sound signal;
step S505 calculates a time delay between the first sound and the second sound from the synthesized sound signal.
The implementation details of the corresponding steps are the same as those of the steps executed by each part in the above-mentioned ear return delay detection device, and are not repeated here.
The embodiment of the disclosure discloses an ear-return delay detection device, an ear-return delay detection method, electronic equipment and a computer readable storage medium. The method for detecting the ear return time delay comprises the following steps: sound playing means for playing a first sound; the earphone is connected with the system to be tested and is used for receiving the first sound and sending the first sound to the system to be tested; the earphone is further used for receiving a second sound obtained by processing the first sound from the system to be tested and playing the second sound; the sound synthesis device is used for receiving the first sound and the second sound and synthesizing the first sound and the second sound according to the receiving sequence to obtain a synthesized sound signal; calculating means for calculating a time delay between the first sound and the second sound from the synthesized sound signal. The ear return time delay detection device solves the problems of complex and inaccurate calculation time delay through the mutual matching of a plurality of components.
In the foregoing, although the steps in the foregoing method embodiments are described in the foregoing order, it should be clear to those skilled in the art that the steps in the embodiments of the disclosure are not necessarily performed in the foregoing order, but may be performed in reverse order, parallel, cross, etc., and other steps may be further added to those skilled in the art on the basis of the foregoing steps, and these obvious modifications or equivalent manners are also included in the protection scope of the disclosure and are not repeated herein.
Referring now to fig. 6, a schematic diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: the above-described delay detection method is performed.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a delay detection apparatus including:
sound playing means for playing a first sound;
the earphone is connected with the system to be tested and is used for receiving the first sound and sending the first sound to the system to be tested; the earphone is further used for receiving a second sound obtained by processing the first sound from the system to be tested and playing the second sound;
the sound synthesis device is used for receiving the first sound and the second sound and synthesizing the first sound and the second sound according to the receiving sequence to obtain a synthesized sound signal;
calculating means for calculating a time delay between the first sound and the second sound from the synthesized sound signal.
Further, the device further comprises:
and the earphone fixing device is used for fixing the earphone.
Further, the earphone fixing device includes:
the wire slot rail is used for fixing the cable of the earphone;
and the earphone fixing wire is used for fixing a cable of the earphone in the trunking track.
Further, the computing device is configured to:
acquiring a plurality of first sampling points of the synthesized sound signal;
Calculating a plurality of autocorrelation coefficients of the synthesized sound signal according to the plurality of first sampling points;
acquiring a first synthesized sub-signal corresponding to the first sound from the synthesized sound signal;
determining a maximum correlation coefficient of the plurality of sub-correlation coefficients according to the first synthesized sub-signal;
and calculating the time delay according to the maximum autocorrelation coefficient.
Further, the computing device is further configured to:
sequentially forming a first sequence from the plurality of first sampling points;
intercepting a plurality of second sequences from the first sequences in sequence according to the order of the first sampling points;
and calculating correlation coefficients of the plurality of second sequences and the first sequence in sequence according to the lengths of the plurality of second sequences to obtain the plurality of autocorrelation coefficients.
Further, the computing device is further configured to:
storing the plurality of first sampling points into a first array in sequence, wherein each first sampling point is an element in the first array;
the step of intercepting a plurality of second sequences from the first sequences in the order of the first sampling points comprises the following steps:
sequentially moving one bit backward from a first element in the first array to intercept a plurality of second sequences;
The calculating the correlation coefficients of the plurality of second sequences and the first sequence according to the lengths of the plurality of second sequences to obtain the plurality of autocorrelation coefficients sequentially includes:
intercepting a plurality of third sequences from the first array in sequence according to the lengths of the plurality of second sequences, wherein the plurality of third sequences are in one-to-one correspondence with the plurality of second sequences, and the lengths of the third sequences and the second sequences which are in one-to-one correspondence are the same;
and calculating correlation coefficients between the second sequence and the third sequence which are in one-to-one correspondence in sequence to obtain the plurality of autocorrelation coefficients.
Further, the computing device is further configured to:
acquiring the number of second sampling points corresponding to the first synthesized sub-signal, wherein the second sampling points are part of the plurality of first sampling points;
and calculating the maximum autocorrelation coefficient in the autocorrelation coefficients of which the positions are arranged behind the number of the second sampling points.
Further, the computing device is further configured to:
the time delay is calculated according to the position of the maximum autocorrelation coefficient in the autocorrelation coefficients and the sampling frequency of the synthesized sound signal.
Further, the computing device is further configured to:
and calculating the quotient of the number of the position and the sampling frequency as the time delay.
Further, the sound synthesizing device is further configured to:
receiving a first sound played by the sound playing device;
receiving a second sound played by the earphone;
combining the first sound and the second sound into a composite sound signal according to the receiving order.
According to one or more embodiments of the present disclosure, there is provided a delay detection method including:
playing the first sound;
receiving the first sound and sending the first sound to the system to be tested;
receiving a second sound obtained by processing the first sound from the system to be tested and playing the second sound;
receiving the first sound and the second sound, and synthesizing the first sound and the second sound according to the receiving sequence to obtain a synthesized sound signal;
and calculating the time delay between the first sound and the second sound according to the synthesized sound signal.
According to one or more embodiments of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any one of the latency detection methods of the first aspect described above.
According to one or more embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer instructions for causing a computer to perform any of the latency detection methods of the foregoing first aspect.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).

Claims (11)

1. An ear return delay detection device, comprising:
sound playing means for playing a first sound;
the earphone is connected with the system to be tested and is used for receiving the first sound and sending the first sound to the system to be tested; the earphone is further used for receiving a second sound obtained by processing the first sound from the system to be tested and playing the second sound;
The sound synthesis device is used for receiving the first sound and the second sound and synthesizing the first sound and the second sound according to the receiving sequence to obtain a synthesized sound signal;
calculating means for calculating a time delay between the first sound and the second sound from the synthesized sound signal.
2. The ear return delay detection device of claim 1, wherein said device further comprises:
and the earphone fixing device is used for fixing the earphone.
3. The ear-return-delay detecting apparatus of claim 2, wherein said earphone fixing means comprises:
the wire slot rail is used for fixing the cable of the earphone;
and the earphone fixing wire is used for fixing a cable of the earphone in the trunking track.
4. The ear return delay detection apparatus of claim 1, wherein said computing means is for:
acquiring a plurality of first sampling points of the synthesized sound signal;
calculating a plurality of autocorrelation coefficients of the synthesized sound signal according to the plurality of first sampling points;
acquiring a first synthesized sub-signal corresponding to the first sound from the synthesized sound signal;
Determining a maximum autocorrelation coefficient of the plurality of autocorrelation coefficients based on the first composite sub-signal;
and calculating the time delay according to the maximum autocorrelation coefficient.
5. The ear loop delay detection device of claim 4 wherein said computing means is further for:
sequentially forming a first sequence from the plurality of first sampling points;
intercepting a plurality of second sequences from the first sequences in sequence according to the order of the first sampling points;
and calculating correlation coefficients of the plurality of second sequences and the first sequence in sequence according to the lengths of the plurality of second sequences to obtain the plurality of autocorrelation coefficients.
6. The ear loop delay detection device of claim 5 wherein said computing means is further for:
storing the plurality of first sampling points into a first array in sequence, wherein each first sampling point is an element in the first array;
the step of intercepting a plurality of second sequences from the first sequences in the order of the first sampling points comprises the following steps:
sequentially moving one bit backward from a first element in the first array to intercept a plurality of second sequences;
the calculating the correlation coefficients of the plurality of second sequences and the first sequence according to the lengths of the plurality of second sequences to obtain the plurality of autocorrelation coefficients sequentially includes:
Intercepting a plurality of third sequences from the first array in sequence according to the lengths of the plurality of second sequences, wherein the plurality of third sequences are in one-to-one correspondence with the plurality of second sequences, and the lengths of the third sequences and the second sequences which are in one-to-one correspondence are the same;
and calculating correlation coefficients between the second sequence and the third sequence which are in one-to-one correspondence in sequence to obtain the plurality of autocorrelation coefficients.
7. The ear loop delay detection device of claim 4 wherein said computing device is further configured to:
acquiring the number of second sampling points corresponding to the first synthesized sub-signal, wherein the second sampling points are part of the plurality of first sampling points;
and calculating the maximum autocorrelation coefficient in the autocorrelation coefficients of which the positions are arranged behind the number of the second sampling points.
8. The ear loop delay detection device of claim 4 wherein said computing device is further configured to:
the time delay is calculated according to the position of the maximum autocorrelation coefficient in the autocorrelation coefficients and the sampling frequency of the synthesized sound signal.
9. The ear loop delay detection device of claim 8 wherein said computing device is further configured to:
And calculating the quotient of the number of the position and the sampling frequency as the time delay.
10. The ear return time delay detection apparatus of claim 1, wherein said sound synthesizing means is further for:
receiving a first sound played by the sound playing device;
receiving a second sound played by the earphone;
combining the first sound and the second sound into a composite sound signal according to the receiving order.
11. An ear-return time delay detection method, characterized by comprising:
playing the first sound;
receiving the first sound and sending the first sound to a system to be tested;
receiving a second sound obtained by processing the first sound from the system to be tested and playing the second sound;
receiving the first sound and the second sound, and synthesizing the first sound and the second sound according to the receiving sequence to obtain a synthesized sound signal;
and calculating the time delay between the first sound and the second sound according to the synthesized sound signal.
CN202110059526.7A 2021-01-18 2021-01-18 Ear-return time delay detection device, method, electronic equipment and computer readable storage medium Active CN112671966B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110059526.7A CN112671966B (en) 2021-01-18 2021-01-18 Ear-return time delay detection device, method, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110059526.7A CN112671966B (en) 2021-01-18 2021-01-18 Ear-return time delay detection device, method, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112671966A CN112671966A (en) 2021-04-16
CN112671966B true CN112671966B (en) 2023-06-27

Family

ID=75415391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110059526.7A Active CN112671966B (en) 2021-01-18 2021-01-18 Ear-return time delay detection device, method, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112671966B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106448698A (en) * 2016-11-17 2017-02-22 北京世纪东方国铁科技股份有限公司 Test device for analyzing voice delay of voice device, system and method
CN110767203A (en) * 2018-07-27 2020-02-07 北京达佳互联信息技术有限公司 Audio processing method and device, mobile terminal and storage medium
CN110931053A (en) * 2019-12-09 2020-03-27 广州酷狗计算机科技有限公司 Method, device, terminal and storage medium for detecting recording time delay and recording audio

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9358454B2 (en) * 2012-09-13 2016-06-07 Performance Designed Products Llc Audio headset system and apparatus
US20170223474A1 (en) * 2015-11-10 2017-08-03 Bender Technologies, Inc. Digital audio processing systems and methods

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106448698A (en) * 2016-11-17 2017-02-22 北京世纪东方国铁科技股份有限公司 Test device for analyzing voice delay of voice device, system and method
CN110767203A (en) * 2018-07-27 2020-02-07 北京达佳互联信息技术有限公司 Audio processing method and device, mobile terminal and storage medium
CN110931053A (en) * 2019-12-09 2020-03-27 广州酷狗计算机科技有限公司 Method, device, terminal and storage medium for detecting recording time delay and recording audio

Also Published As

Publication number Publication date
CN112671966A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
CN111309962B (en) Method and device for extracting audio clips and electronic equipment
CN110418183B (en) Audio and video synchronization method and device, electronic equipment and readable medium
CN111343410A (en) Mute prompt method and device, electronic equipment and storage medium
CN110489179A (en) Obtain method, apparatus, medium and the equipment of call stack stack frame function signature
CN110312162A (en) Selected stage treatment method, device, electronic equipment and readable medium
US11783865B2 (en) Method and apparatus for displaying video playback page, and electronic device and medium
WO2020224294A1 (en) Method, system, and apparatus for processing information
CN113257218B (en) Speech synthesis method, device, electronic equipment and storage medium
CN113923390A (en) Video recording method, device, equipment and storage medium
CN113889140A (en) Audio signal playing method and device and electronic equipment
CN113144620A (en) Detection method, device, platform, readable medium and equipment for frame synchronization game
CN112671966B (en) Ear-return time delay detection device, method, electronic equipment and computer readable storage medium
WO2022228067A1 (en) Speech processing method and apparatus, and electronic device
CN112946576B (en) Sound source positioning method and device and electronic equipment
CN113766303B (en) Multi-screen interaction method, device, equipment and storage medium
CN111709342B (en) Subtitle segmentation method, device, equipment and storage medium
CN111444384B (en) Audio key point determining method, device, equipment and storage medium
CN111832279B (en) Text partitioning method, apparatus, device and computer readable medium
CN114495941A (en) Method and device for converting single-channel audio into text, electronic equipment and storage medium
CN109375892B (en) Method and apparatus for playing audio
CN113495712A (en) Automatic volume adjustment method, apparatus, medium, and device
CN111652002A (en) Text division method, device, equipment and computer readable medium
CN113674739B (en) Time determination method, device, equipment and storage medium
JP2017521638A (en) Measuring distances between devices using audio signals
CN111145769A (en) Audio processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant