CN110519680B - Audio device testing method and device - Google Patents

Audio device testing method and device Download PDF

Info

Publication number
CN110519680B
CN110519680B CN201911028325.XA CN201911028325A CN110519680B CN 110519680 B CN110519680 B CN 110519680B CN 201911028325 A CN201911028325 A CN 201911028325A CN 110519680 B CN110519680 B CN 110519680B
Authority
CN
China
Prior art keywords
signal
time
tone signal
audio file
digital audio
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
CN201911028325.XA
Other languages
Chinese (zh)
Other versions
CN110519680A (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.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai 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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN201911028325.XA priority Critical patent/CN110519680B/en
Publication of CN110519680A publication Critical patent/CN110519680A/en
Application granted granted Critical
Publication of CN110519680B publication Critical patent/CN110519680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/03Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements
    • H04R29/001Monitoring arrangements; Testing arrangements for loudspeakers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements
    • H04R29/004Monitoring arrangements; Testing arrangements for microphones

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • General Health & Medical Sciences (AREA)
  • Otolaryngology (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Testing Electric Properties And Detecting Electric Faults (AREA)

Abstract

The embodiment of the invention provides an audio device testing method and device, after electronic equipment obtains a request instruction for requesting to test an audio device of terminal equipment, the electronic equipment triggers the audio device to play a first digital audio file, namely, a first mute signal with a first time length, a pilot tone signal with a second time length, a second mute signal with a third time length and a sweep tone signal with a fourth time length are sequentially played. And collecting the sound emitted by the audio device to obtain a sound signal, recording a second digital audio file according to the sound signal, and determining the test result of the audio device according to the second digital audio file, the first time length, the second time length, the third time length and the fourth time length. By adopting the scheme, variable factors such as time synchronization, delay estimation, propagation path length and the like do not need to be considered, and the test process is simple and high in accuracy.

Description

Audio device testing method and device
Technical Field
The embodiment of the invention relates to the technical field of testing, in particular to a method and a device for testing an audio device.
Background
At present, terminal equipment such as a mobile phone becomes a necessity of daily life of people. The terminal equipment is generally internally provided with audio devices such as a loudspeaker, a receiver and the like, and the audio devices can be tested in order to ensure the audio performance of the devices in the large-scale production process of the terminal equipment.
In the traditional test process, an audio test instrument is respectively connected with a standard sound receiving device and an audio device of the terminal equipment to be tested, the audio test instrument plays a section of digital audio file, the digital audio file is converted into an electric signal from a digital signal, and the electric signal excites the audio device of the terminal equipment to be tested to make the audio device sound; meanwhile, the sound receiving device receives sound emitted by the audio device, converts the sound into an electric signal and converts the electric signal into a digital audio file. Then, the recorded digital audio file is analyzed by combining the synchronous time of the digital audio file playing and the digital audio file recording, the signal processing delay in the digital audio file playing process, the signal processing delay in the digital audio file recording process, the delay of a sound propagation path from the audio device to the sound receiving device and the like, and the test of the audio device can be completed.
In the test process, variable factors such as time synchronization, delay estimation, propagation path length and the like need to be considered, so that the test process is complex and the accuracy is low.
Disclosure of Invention
The embodiment of the invention provides a method and a device for testing an audio device, which aim to improve the testing accuracy by simplifying the testing process.
In a first aspect, an embodiment of the present invention provides an audio device testing method, including:
acquiring a request instruction, wherein the request instruction is used for requesting to test an audio device of terminal equipment;
triggering the audio device to sequentially play a first mute signal, a pilot tone signal, a second mute signal and a sweep tone signal which are contained in a first digital audio file according to the request instruction, wherein the playing time of the first mute signal is a first time, the playing time of the pilot tone signal is a second time, the playing time of the second mute signal is a third time, and the playing time of the sweep tone signal is a fourth time;
collecting the sound emitted by the audio device when the first data audio file is played to obtain a sound signal;
and determining a test result of the audio device according to a second digital audio file, the first time length, the second time length, the third time length and the fourth time length, wherein the second digital audio file is obtained according to the sound signal.
In one possible design, the determining the test result of the audio device according to the second digital audio file, the first duration, the second duration, the third duration, and the fourth duration includes:
convolving the sinusoidal signal and the sound signal from the beginning of playing the first mute signal to obtain at least one convolution result;
determining a target convolution result from the at least one convolution result, the target convolution result being a maximum of the at least one convolution result;
determining the starting time of the pilot tone signal in the second digital audio file according to the target convolution result;
and determining the test result of the audio device according to the second digital audio file, the starting time of the pilot tone signal, the second time length, the third time length and the fourth time length.
In one possible design, the determining the test result of the audio device according to the second digital audio file, the start time of the pilot tone signal, the second time period, the third time period, and the fourth time period includes:
postponing the initial time of the pilot tone signal backwards for the first time length and the second time length to obtain the initial time of the sweep tone signal in the second digital audio file;
determining the sweep frequency sound signal from the second digital audio file according to the starting time of the sweep frequency sound signal in the second digital audio file;
and determining the test result of the audio device according to the frequency sweeping sound signal determined from the second digital audio file.
In one possible design, the sinusoidal signal and the pilot tone signal have the same parameters: frequency, period.
In one possible design, the test results include at least one of the following parameters: frequency response, total harmonic distortion, or abnormal tones.
In a possible design, a difference between the volume of the pilot tone signal and the volume of the swept tone signal is greater than a first preset value, and the second duration is greater than a second preset value.
In one possible design, the pilot tone signal is a single-frequency sine wave, and the frequency of the sweep tone signal falls within a preset frequency range.
In a second aspect, an embodiment of the present invention provides an audio device testing apparatus, including:
the device comprises an acquisition module, a test module and a control module, wherein the acquisition module is used for acquiring a request instruction which is used for requesting to test an audio device of the terminal equipment;
the triggering module is used for triggering the audio device to sequentially play a first mute signal, a pilot tone signal, a second mute signal and a frequency sweeping tone signal which are contained in a first digital audio file according to the request instruction, wherein the playing time of the first mute signal is a first time, the playing time of the pilot tone signal is a second time, the playing time of the second mute signal is a third time, and the playing time of the frequency sweeping tone signal is a fourth time;
the acquisition module is used for acquiring the sound emitted by the audio device when the first data audio file is played to obtain a sound signal;
a determining module, configured to determine a test result of the audio device according to a second digital audio file, the first duration, the second duration, the third duration, and the fourth duration, where the second digital audio file is obtained according to the sound signal.
In a feasible design, the determining module is specifically configured to, from the beginning of playing the first mute signal, convolve a sinusoidal signal with the sound signal to obtain at least one convolution result, determine a target convolution result from the at least one convolution result, where the target convolution result is a maximum value in the at least one convolution result, determine a start time of the pilot tone signal in the second digital audio file according to the target convolution result, and determine a test result of the audio device according to the second digital audio file, the start time of the pilot tone signal, the second duration, the third duration, and the fourth duration.
In a possible design, the determining module, when determining a test result of the audio device according to the second digital audio file, the start time of the pilot tone signal, the second time length, the third time length, and the fourth time length, is configured to delay the start time of the pilot tone signal backward by the first time length and the second time length to obtain the start time of the frequency sweep tone signal in the second digital audio file, determine the frequency sweep tone signal from the second digital audio file according to the start time of the frequency sweep tone signal in the second digital audio file, and determine the test result of the audio device according to the frequency sweep tone signal determined from the second digital audio file.
In one possible design, the sinusoidal signal and the pilot tone signal have the same parameters: frequency, period.
In one possible design, the test results include at least one of the following parameters: frequency response, total harmonic distortion, or abnormal tones.
In a possible design, a difference between the volume of the pilot tone signal and the volume of the swept tone signal is greater than a first preset value, and the second duration is greater than a second preset value.
In one possible design, the pilot tone signal is a single-frequency sine wave, and the frequency of the sweep tone signal falls within a preset frequency range.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the method according to the first aspect or the various possible implementations of the first aspect.
In a fourth aspect, embodiments of the present invention provide a storage medium, which stores instructions that, when executed on an electronic device, cause the electronic device to perform the method according to the first aspect or any of the possible implementations of the first aspect.
In a fifth aspect, embodiments of the present invention provide a computer program product, which, when run on an electronic device, causes the electronic device to perform the method according to the first aspect or the various possible implementations of the first aspect.
According to the audio device testing method and device provided by the embodiment of the invention, after the electronic equipment acquires the request instruction for requesting to test the audio device of the terminal equipment, the audio device is triggered to play the first digital audio file, namely, the first mute signal with the first duration, the pilot tone signal with the second duration, the second mute signal with the third duration and the sweep tone signal with the fourth duration are sequentially played. And collecting the sound emitted by the audio device to obtain a sound signal, recording a second digital audio file according to the sound signal, and determining the test result of the audio device according to the second digital audio file, the first time length, the second time length, the third time length and the fourth time length. By adopting the scheme, the electronic equipment can determine the initial time of the sweep pinyin signal in the second digital audio file through the first time length, the second time length, the third time length and the fourth time length, further analyze the part corresponding to the sweep pinyin signal in the second digital audio file to obtain a test result, and does not need to consider variable factors such as time synchronization, delay estimation, propagation path length and the like, so that the test process is simple and high in accuracy.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a block diagram of a conventional test system;
fig. 2 is a schematic diagram of a network architecture to which the method for testing the audio device 4 according to the embodiment of the present invention is applied;
FIG. 3 is a flow chart of a method for testing an audio device according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an excitation source in the audio device testing method according to the embodiment of the invention;
fig. 5 is a schematic structural diagram of an audio device testing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, audio devices such as a loudspeaker and a loudspeaker are arranged in most terminal equipment, and in the process of mass production, the audio devices of the terminal equipment need to be tested in a production line so as to ensure that the audio devices are good after the terminal equipment leaves a factory. Fig. 1 is a schematic diagram illustrating a conventional test system. Referring to fig. 1, in the architecture, an audio test instrument plays a segment of digital audio file, the digital audio file is converted from a digital signal to an electrical signal after digital-to-analog conversion, the electrical signal is amplified by an amplifier, and then an audio device of a terminal device is excited to make the audio device sound. When the audio device sounds, the sound receiving device receives the sound emitted by the audio device and converts the sound into an electric signal, the electric signal is amplified by the amplifier, and then the electric signal is converted into a digital signal after analog-to-digital conversion, so that a digital audio file is obtained. In the process, a clock is arranged in the audio test instrument, and the audio test instrument controls the clock to enable the playing of the digital audio file and the recording of the digital audio file to be time-synchronized, so that the time point of playing the digital audio file is aligned with the time point of recording the digital audio file, and the sound starting position of the recorded digital audio file can be accurately determined. And then, analyzing the recorded digital audio file according to the sound initial position of the recorded digital audio file to obtain the frequency response, total harmonic distortion, abnormal sound and the like of the audio device, thereby completing the test of the audio device.
In the above test process, in addition to ensuring that the time point of playing the digital audio file is aligned with the time point of recording the digital audio file, the signal processing delay in the playing process of the digital audio file, the signal processing delay in the recording process of the digital audio file, the delay of the sound propagation path from the audio device to the sound receiving device, and the like need to be considered.
In summary, the following can be found: in the traditional audio device testing process, too many variable factors such as time synchronization, delay estimation, propagation path length and the like need to be considered, so that the testing process is complex and the accuracy is low.
In view of this, embodiments of the present invention provide a method for testing an audio device, which achieves the goal of improving the testing accuracy by simplifying the testing process.
Fig. 2 is a schematic diagram of a network architecture to which the audio device testing method according to the embodiment of the present invention is applied. Referring to fig. 2, the network architecture includes an electronic device 1, a terminal device 2, and a sound receiving device 3. The electronic equipment 1 is connected with the terminal equipment 2 and the sound receiving device 3 through a data line and the like, the terminal equipment 2 is provided with an audio device 4 such as a loudspeaker and a loudspeaker, the electronic equipment 1 collects sound signals while controlling the audio device 4 to play a first digital audio file, and a test result of the audio device 4 is determined according to the sound signals. The sound receiving device 3 is, for example, a sound receiving microphone, and may be provided separately from the electronic apparatus 1 or may be integrated with the electronic apparatus 1.
In the embodiment of fig. 2, the electronic device 1 may be a computer or the like installed on a production line, the terminal device 2 may be a mobile phone, a Personal Digital Assistant (PDA), a tablet computer (Pad), a computer with a wireless transceiving function, or the like, and the electronic device 1 tests the audio device 4 of each terminal device 2 in the batch production process of the terminal devices 2.
Next, on the basis of the architecture shown in fig. 2, a detailed description is given of the audio device testing method according to the embodiment of the present application. For example, see fig. 3.
Fig. 3 is a flowchart of an audio device testing method according to an embodiment of the present invention. The present embodiment is explained from the perspective of an electronic device, and the present embodiment includes:
101. and acquiring a request instruction, wherein the request instruction is used for requesting to test an audio device of the terminal equipment.
For example, in a high volume production process, a test station for testing audio devices may be provided on the production line. For example, in an automated production process, when the electronic device detects that the terminal device reaches the test station, the audio device of the terminal device is automatically connected. After the electronic equipment detects the audio device connected to the terminal equipment, a request instruction is automatically generated to request for testing the audio device. For another example, a "test" button is displayed on a user interface of the electronic device, and when the terminal device arrives at the test station, a manufacturer clicks the "test" button through a mouse or the like, so that the electronic device obtains the request instruction.
102. And the electronic equipment triggers the audio device to sequentially play the first mute signal, the pilot tone signal, the second mute signal and the frequency sweep tone signal contained in the first digital audio file according to the request instruction.
The first digital audio file sequentially comprises a first mute signal with the playing time length being a first time length, a pilot tone signal with the playing time length being a second time length, a second mute signal with the playing time length being a third time length and a sweep tone signal with the playing time length being a fourth time length.
Illustratively, after the request instruction is acquired, the electronic device converts the first digital audio file into an electrical signal through digital-to-analog conversion, amplifies the electrical signal, and sends the amplified electrical signal to an audio device of the terminal device to excite the audio device so that the audio device can sound. Wherein the electrical signal comprises four parts: the method comprises the steps of playing a first mute signal with the first duration, playing a pilot tone signal with the second duration, playing a second mute signal with the third duration and playing a sweep tone signal with the fourth duration. Therefore, the audio device can sequentially play the first mute signal, the pilot tone signal, the second mute signal and the sweep tone signal with corresponding time lengths.
103. And the electronic equipment collects the sound emitted by the audio device when the first data audio file is played to obtain a sound signal.
Illustratively, the electronic device does not need to maintain a clock, but starts to play the first mute signal of the first duration, collects the sound generated by the audio device to obtain a sound signal, and further amplifies the sound signal, and the amplified sound signal is subjected to analog-to-digital conversion to obtain the second digital audio file.
104. And the electronic equipment determines the test result of the audio device according to the second digital audio file, the starting time, the second time length, the third time length and the fourth time length.
For example, in the embodiment of the present invention, the first mute signal, the pilot tone signal and the second mute signal may be understood as auxiliary signals in the test process, which are used to determine the start time of recording the sweep tone signal in the second audio file, and the sweep tone signal is the signal actually used to determine the test result of the audio device. That is, although the recorded second audio file sequentially includes the first mute signal, the pilot tone signal, the second mute signal, and the frequency-sweep tone signal, what is really used for analyzing the test result of the audio device is only the portion of the second digital audio file corresponding to the frequency-sweep tone signal, and therefore, the start time of the frequency-sweep tone signal needs to be determined from the second digital audio file. And then, analyzing the part corresponding to the sweep-frequency sound signal in the second digital audio file to obtain the test results of the audio device, such as frequency response, total harmonic distortion, abnormal sound and the like.
In the audio device testing method provided by the embodiment of the invention, after the electronic device obtains a request instruction for requesting to test the audio device of the terminal device, the audio device is triggered to play the first digital audio file, namely, the first mute signal with the first duration, the pilot tone signal with the second duration, the second mute signal with the third duration and the sweep tone signal with the fourth duration are sequentially played. And collecting the sound emitted by the audio device to obtain a sound signal, recording a second digital audio file according to the sound signal, and determining the test result of the audio device according to the second digital audio file, the first time length, the second time length, the third time length and the fourth time length. By adopting the scheme, the electronic equipment can determine the initial time of the sweep pinyin signal in the second digital audio file through the first time length, the second time length, the third time length and the fourth time length, further analyze the part corresponding to the sweep pinyin signal in the second digital audio file to obtain a test result, and does not need to consider variable factors such as time synchronization, delay estimation, propagation path length and the like, so that the test process is simple and high in accuracy.
In the following, how the electronic device determines the test result of the audio device is explained in detail.
In a feasible time slot mode, when determining a test result of an audio device according to a second digital audio file, a first time length, a second time length, a third time length and a fourth time length, an electronic device performs convolution on a sinusoidal signal and the sound signal from the beginning of playing a first mute signal to obtain at least one convolution result, determines a target convolution result from the at least one convolution result, wherein the target convolution result is the maximum value of the at least one convolution result, determines the starting time of the pilot tone signal in the second digital audio file according to the target convolution result, and determines the test result of the audio device according to the second digital audio file, the starting time of the pilot tone signal, the second time length, the third time length and the fourth time length.
Further, when determining the test result of the audio device according to the second digital audio file, the start time of the pilot tone signal, the second time, the third time and the fourth time, the electronic device delays the start time of the pilot tone signal backwards by the first time and the second time to obtain the start time of the frequency sweep tone signal in the second digital audio file, determines the frequency sweep tone signal of the fourth time from the second digital audio file according to the start time of the frequency sweep tone signal in the second digital audio file, and determines the test result of the audio device according to the frequency sweep tone signal determined from the second digital audio file.
Illustratively, when the pilot tone signal is a single-frequency sine wave, the electronic device sets a sine signal according to the single-frequency sine wave, and the sine signal has the same parameters as the period, frequency, and the like of the pilot tone signal. The electronic equipment starts to play the mute with the first duration, convolutes the sound signal and the sinusoidal signal according to a sampling frequency, wherein the sampling frequency is 44100Hz, obtains at least one convolution result, determines the maximum convolution result from the convolution results, and takes the convolution result as a target convolution result, wherein the time point corresponding to the target convolution result is the starting point of the pilot tone signal. Each convolution result corresponds to a time point, and the time point corresponding to the target convolution result is the time for recording the pilot tone signal. Because the difference between the time point of the pilot tone signal and the time point of the sweep tone signal is the first time length and the second time length, after the electronic equipment determines the starting time of the pilot tone signal in the second digital audio file, the electronic equipment delays the starting time backwards by the first time length and the second time length, and then the starting time of the sweep tone signal in the second digital audio file can be obtained. Because the time length of the sweep frequency sound signal is the fourth time length, the electronic equipment can determine the part corresponding to the sweep frequency sound signal from the second digital audio file according to the starting time and the fourth time length of the sweep frequency sound signal in the second digital audio file. And then, analyzing a part corresponding to the sweep frequency sound signal in a second digital audio file of the electronic equipment to obtain a test result.
By adopting the scheme, the electronic equipment does not need to consider variable factors such as time synchronization, delay estimation, propagation path length and the like, and the test process is simple and high in accuracy.
In the above embodiment, since the first mute signal, the pilot tone signal, the second mute signal and the sweep tone signal sequentially contained in the first digital audio file are used to excite the audio device to generate sound, these signals may also be referred to as excitation sound sources. Fig. 4 is a schematic diagram of an excitation source in the audio device testing method according to the embodiment of the invention. Referring to fig. 4, the excitation source at least includes four parts: the first mute signal with the playing time length of the first time length, the pilot tone signal with the playing time length of the second time length, the third mute signal with the playing time length of the third time length and the sweep tone signal with the playing time length of the fourth time length, wherein the horizontal axis in the graph is a time axis and the unit is second(s), and the vertical axis is a signal amplitude axis and the unit is volt. Table 1 is a parameter table of excitation sources.
TABLE 1
Type (B) Frequency of Duration of time Amplitude of Remarks for note
A first mute signal and a second mute signal Is free of 0.1 second Is free of Guard interval
Pilot tone signal 3KHz 0.1 second 0dB
Sweep frequency sound signal 20~20KHz 1 second -3dB
Referring to fig. 4 and table 1, the playing duration of the first signal is, for example, 0.1 second, the duration of the pilot tone signal is, for example, 0.1 second, the pilot tone signal is a single-frequency sine wave, the frequency is, for example, 3KHz, the frequency of the sweep tone signal belongs to a predetermined frequency range, for example, 20-20 KHz, and the playing duration of the sweep tone signal is, for example, 1 second. If the starting time of the pilot frequency sound signal is determined, the starting time of the frequency sweeping sound signal can be obtained by delaying backwards for 0.2 seconds, namely the second time length and the third time length.
In the above embodiment, in order to distinguish the pilot tone signal from the swept tone signal, the volume of the pilot tone signal may be set to be higher, and the volume of the swept tone signal may be set to be lower, for example, the volume of the pilot tone signal is 0dB, and the volume of the swept tone signal is-3 dB. In addition, because a second mute signal exists between the pilot tone signal and the sweep tone signal, the sweep tone signal can be identified through the second mute signal.
In the above embodiment, the time length of the pilot tone signal needs to be long enough, that is, the length of the second time length is maximum enough, to ensure that the maximum convolution result after convolution can occur in the time range of the pilot tone signal.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. For details which are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the embodiments of the method of the present invention.
Fig. 5 is a schematic structural diagram of an audio device testing apparatus according to an embodiment of the present invention. The audio device testing apparatus 100 may be implemented by software and/or hardware. As shown in fig. 5, the audio device testing apparatus 100 includes:
the acquiring module 11 is configured to acquire a request instruction, where the request instruction is used to request an audio device of a terminal device to be tested;
the triggering module 12 is configured to trigger the audio device to sequentially play a first mute signal, a pilot tone signal, a second mute signal, and a swept tone signal that are included in a first digital audio file according to the request instruction, where a play duration of the first mute signal is a first duration, a play duration of the pilot tone signal is a second duration, a play duration of the second mute signal is a third duration, and a play duration of the swept tone signal is a fourth duration;
the acquisition module 13 is configured to acquire sound emitted by the audio device when the first data audio file is played, so as to obtain a sound signal;
a determining module 14, configured to determine a test result of the audio device according to a second digital audio file, the first duration, the second duration, the third duration, and the fourth duration, where the second digital audio file is obtained according to the sound signal.
In a possible design, the determining module 14 is specifically configured to, starting from playing the first mute signal, convolve a sinusoidal signal and the sound signal to obtain at least one convolution result, determine a target convolution result from the at least one convolution result, where the target convolution result is a maximum value of the at least one convolution result, determine a start time of the pilot tone signal in the second digital audio file according to the target convolution result, and determine a test result of the audio device according to the second digital audio file, the start time of the pilot tone signal, the second duration, the third duration, and the fourth duration.
In a possible design, the determining module 14 is configured to, when determining a test result of the audio device according to the second digital audio file, the start time of the pilot tone signal, the second time duration, the third time duration, and the fourth time duration, delay the start time of the pilot tone signal backward by the first time duration and the second time duration to obtain the start time of the sweep tone signal in the second digital audio file, determine the sweep tone signal from the second digital audio file according to the start time of the sweep tone signal in the second digital audio file, and determine the test result of the audio device according to the sweep tone signal determined from the second digital audio file.
In one possible design, the sinusoidal signal and the pilot tone signal have the same parameters: frequency, period.
In one possible design, the test results include at least one of the following parameters: frequency response, total harmonic distortion, or abnormal tones.
In a possible design, a difference between the volume of the pilot tone signal and the volume of the swept tone signal is greater than a first preset value, and the second duration is greater than a second preset value.
In one possible design, the pilot tone signal is a single-frequency sine wave, and the frequency of the sweep tone signal falls within a preset frequency range.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 6, the electronic apparatus 200 includes:
at least one processor 21 and memory 22;
the memory 22 stores computer-executable instructions;
the at least one processor 21 executes computer-executable instructions stored by the memory 22 to cause the at least one processor 21 to perform the audio device testing method as described above.
Optionally, the electronic device 200 further comprises a communication component 23. The processor 21, the memory 22, and the communication unit 23 may be connected by a bus 24.
The embodiment of the invention also provides a storage medium, wherein the storage medium stores computer execution instructions, and the computer execution instructions are used for realizing the audio device testing method when being executed by the processor.
Embodiments of the present invention further provide a computer program product, which, when running on an electronic device, enables the electronic device to execute the above audio device testing method.
In the above embodiments, it should be understood that the described apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The unit formed by the modules can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable an electronic device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the method according to various embodiments of the present invention.
It should be understood that the processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present invention are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in a terminal or server.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The term "plurality" herein means two or more. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship; in the formula, the character "/" indicates that the preceding and following related objects are in a relationship of "division".
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (14)

1. An audio device testing method, comprising:
acquiring a request instruction, wherein the request instruction is used for requesting to test an audio device of terminal equipment;
triggering the audio device to sequentially play a first mute signal, a pilot tone signal, a second mute signal and a sweep tone signal which are contained in a first digital audio file according to the request instruction, wherein the playing time of the first mute signal is a first time, the playing time of the pilot tone signal is a second time, the playing time of the second mute signal is a third time, and the playing time of the sweep tone signal is a fourth time;
collecting the sound emitted by the audio device when the first data audio file is played to obtain a sound signal;
determining a test result of the audio device according to a second digital audio file, the first duration, the second duration, the third duration and the fourth duration, wherein the second digital audio file is obtained according to the sound signal;
determining a test result of the audio device according to the second digital audio file, the first duration, the second duration, the third duration, and the fourth duration, including:
convolving the sinusoidal signal and the sound signal from the beginning of playing the first mute signal to obtain at least one convolution result;
determining a target convolution result from the at least one convolution result, the target convolution result being a maximum of the at least one convolution result;
determining the starting time of the pilot tone signal in the second digital audio file according to the target convolution result;
and determining the test result of the audio device according to the second digital audio file, the starting time of the pilot tone signal, the second time length, the third time length and the fourth time length.
2. The method of claim 1, wherein determining the test result of the audio device according to the second digital audio file, the start time of the pilot tone signal, the second time duration, the third time duration, and the fourth time duration comprises:
postponing the starting time of the pilot tone signal backwards for the second time length and the third time length to obtain the starting time of the sweep tone signal in the second digital audio file;
determining the sweep frequency sound signal from the second digital audio file according to the starting time of the sweep frequency sound signal in the second digital audio file;
and determining the test result of the audio device according to the frequency sweeping sound signal determined from the second digital audio file.
3. The method according to claim 1 or 2, characterized in that the sinusoidal signal and the pilot tone signal have the same parameters: frequency, period.
4. The method according to claim 1 or 2, wherein the test results comprise at least one of the following parameters: frequency response, total harmonic distortion, or abnormal tones.
5. The method according to claim 1 or 2, wherein the difference between the volume of the pilot tone signal and the volume of the swept tone signal is greater than a first preset value, and the second duration is greater than a second preset value.
6. The method according to claim 1 or 2, wherein the pilot tone signal is a single-frequency sine wave, and the frequency of the swept tone signal falls within a predetermined frequency range.
7. An audio device testing apparatus, comprising:
the device comprises an acquisition module, a test module and a control module, wherein the acquisition module is used for acquiring a request instruction which is used for requesting to test an audio device of the terminal equipment;
the triggering module is used for triggering the audio device to sequentially play a first mute signal, a pilot tone signal, a second mute signal and a frequency sweeping tone signal which are contained in a first digital audio file according to the request instruction, wherein the playing time of the first mute signal is a first time, the playing time of the pilot tone signal is a second time, the playing time of the second mute signal is a third time, and the playing time of the frequency sweeping tone signal is a fourth time;
the acquisition module is used for acquiring the sound emitted by the audio device when the first data audio file is played to obtain a sound signal;
a determining module, configured to determine a test result of the audio device according to a second digital audio file, the first duration, the second duration, the third duration, and the fourth duration, where the second digital audio file is obtained according to the sound signal;
the determining module is specifically configured to, from the beginning of playing the first mute signal, convolve a sinusoidal signal and the sound signal to obtain at least one convolution result, determine a target convolution result from the at least one convolution result, where the target convolution result is a maximum value in the at least one convolution result, determine, according to the target convolution result, a start time of the pilot tone signal in the second digital audio file, and determine, according to the second digital audio file, the start time of the pilot tone signal, the second duration, the third duration, and the fourth duration, a test result of the audio device.
8. The apparatus of claim 7,
the determining module, when determining a test result of the audio device according to the second digital audio file, the start time of the pilot tone signal, the second time, the third time and the fourth time, is configured to delay the start time of the pilot tone signal backward by the second time and the third time to obtain the start time of the frequency sweep tone signal in the second digital audio file, determine the frequency sweep tone signal from the second digital audio file according to the start time of the frequency sweep tone signal in the second digital audio file, and determine the test result of the audio device according to the frequency sweep tone signal determined from the second digital audio file.
9. The apparatus of claim 7 or 8, wherein the sinusoidal signal and the pilot tone signal have the same parameters: frequency, period.
10. The apparatus of claim 7 or 8, wherein the test results comprise at least one of the following parameters: frequency response, total harmonic distortion, or abnormal tones.
11. The apparatus of claim 7 or 8, wherein a difference between the volume of the pilot tone signal and the volume of the swept tone signal is greater than a first preset value, and the second duration is greater than a second preset value.
12. The apparatus of claim 7 or 8, wherein the pilot tone signal is a single-frequency sine wave, and the frequency of the swept tone signal falls within a predetermined frequency range.
13. An electronic device, comprising: a processor, a memory, and a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor, the computer program comprising instructions for performing the method of any of claims 1-6.
14. A storage medium having stored therein instructions that, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1-6.
CN201911028325.XA 2019-10-28 2019-10-28 Audio device testing method and device Active CN110519680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911028325.XA CN110519680B (en) 2019-10-28 2019-10-28 Audio device testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911028325.XA CN110519680B (en) 2019-10-28 2019-10-28 Audio device testing method and device

Publications (2)

Publication Number Publication Date
CN110519680A CN110519680A (en) 2019-11-29
CN110519680B true CN110519680B (en) 2020-04-07

Family

ID=68633572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911028325.XA Active CN110519680B (en) 2019-10-28 2019-10-28 Audio device testing method and device

Country Status (1)

Country Link
CN (1) CN110519680B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI717052B (en) * 2019-10-09 2021-01-21 佐臻股份有限公司 Smart glasses test frame
CN111243625B (en) * 2020-01-03 2023-03-24 合肥讯飞数码科技有限公司 Method, device and equipment for testing definition of equipment and readable storage medium
CN112201283B (en) * 2020-09-09 2022-02-08 北京小米松果电子有限公司 Audio playing method and device
CN112135235B (en) * 2020-09-22 2022-05-24 歌尔科技有限公司 Quality detection method, system and computer readable storage medium
CN115835111A (en) * 2022-10-20 2023-03-21 武汉海微科技有限公司 Signal detection circuit, method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101365261A (en) * 2008-09-26 2009-02-11 嘉兴中科声学科技有限公司 Method for speaker parameter fast detection analog synchronization signal and detection system
CN108419199A (en) * 2017-02-10 2018-08-17 阿里巴巴集团控股有限公司 Fault detection method, device and the equipment of acoustic signals, readable medium
CN108718438A (en) * 2018-05-16 2018-10-30 桂林电子科技大学 A kind of judgment method of the response signal start time of electro-acoustic product detecting system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101334964B1 (en) * 2008-12-12 2013-11-29 삼성전자주식회사 apparatus and method for sound processing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101365261A (en) * 2008-09-26 2009-02-11 嘉兴中科声学科技有限公司 Method for speaker parameter fast detection analog synchronization signal and detection system
CN108419199A (en) * 2017-02-10 2018-08-17 阿里巴巴集团控股有限公司 Fault detection method, device and the equipment of acoustic signals, readable medium
CN108718438A (en) * 2018-05-16 2018-10-30 桂林电子科技大学 A kind of judgment method of the response signal start time of electro-acoustic product detecting system

Also Published As

Publication number Publication date
CN110519680A (en) 2019-11-29

Similar Documents

Publication Publication Date Title
CN110519680B (en) Audio device testing method and device
CN111798852B (en) Voice wakeup recognition performance test method, device, system and terminal equipment
US20090052678A1 (en) Audio test apparatus and test method thereof
CN109195090B (en) Method and system for testing electroacoustic parameters of microphone in product
CN109831733A (en) Test method, device, equipment and the storage medium of audio broadcast performance
CN107360530B (en) Echo cancellation testing method and device
CN109498030B (en) Free sound field hearing test system and method
CN108702568B (en) Method and equipment for testing time delay of audio loop
CN110691314B (en) Linear microphone array performance test method and clamp
CN111128253B (en) Audio editing method and device
CN109712608B (en) Multi-sound zone awakening test method, device and storage medium
CN108234793B (en) Communication method, communication device, electronic equipment and storage medium
CN111866690A (en) Microphone testing method and device
CN113010139B (en) Screen projection method and device and electronic equipment
CN113259832A (en) Microphone array detection method and device, electronic equipment and storage medium
CN110290453B (en) Delay testing method and system of wireless playing device
CN113470618A (en) Wake-up test method and device, electronic equipment and readable storage medium
CN113726600B (en) Transmission delay determining method, device, terminal and storage medium
EP3605535A1 (en) Audio device and computer readable program
CN109243472B (en) Audio processing method and audio processing system
CN112685083A (en) Method and system for measuring wake-up rate
CN113517000A (en) Echo cancellation test method, terminal and storage device
WO2022083502A1 (en) Voice interaction method and related apparatus, and method for establishing correspondence
CN109274826B (en) Voice playing mode switching method and device, terminal and computer readable storage medium
CN112086106A (en) Test scene alignment method, device, medium and equipment

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