CN111726740A - Electronic equipment testing method and device - Google Patents
Electronic equipment testing method and device Download PDFInfo
- Publication number
- CN111726740A CN111726740A CN201910225391.XA CN201910225391A CN111726740A CN 111726740 A CN111726740 A CN 111726740A CN 201910225391 A CN201910225391 A CN 201910225391A CN 111726740 A CN111726740 A CN 111726740A
- Authority
- CN
- China
- Prior art keywords
- frequency
- electronic equipment
- recording file
- determining
- sound recording
- 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.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 54
- 238000000034 method Methods 0.000 claims abstract description 47
- 230000008569 process Effects 0.000 claims abstract description 16
- 238000004891 communication Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 13
- 230000015654 memory Effects 0.000 claims description 13
- 238000010998 test method Methods 0.000 claims description 11
- 238000006243 chemical reaction Methods 0.000 claims description 5
- 238000000605 extraction Methods 0.000 claims description 5
- 230000005540 biological transmission Effects 0.000 claims description 3
- 230000000694 effects Effects 0.000 description 15
- 230000006870 function Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 14
- 230000002159 abnormal effect Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 4
- 230000000737 periodic effect Effects 0.000 description 3
- 238000010276 construction Methods 0.000 description 2
- 238000011990 functional testing Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 239000000758 substrate Substances 0.000 description 2
- 108010001267 Protein Subunits Proteins 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000011426 transformation method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R29/00—Monitoring arrangements; Testing arrangements
- H04R29/001—Monitoring arrangements; Testing arrangements for loudspeakers
Landscapes
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Otolaryngology (AREA)
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The present disclosure provides a method for testing an electronic device, including: instructing the electronic device to play a designated audio file, wherein the designated audio file comprises a left channel audio and a right channel audio, the left channel audio having a first frequency, the right channel audio having a second frequency, the first frequency being different from the second frequency; recording the playing process of the electronic equipment to obtain a recording file; analyzing the signal components of the sound recording file; when the sound recording file contains a signal component with a first frequency meeting a first preset condition, determining that the left channel of the electronic equipment is tested normally; and when the sound recording file contains a signal component of a second frequency meeting a second preset condition, determining that the right channel of the electronic equipment is tested normally. The present disclosure also provides a testing apparatus of an electronic device, a computer device, and a computer-readable storage medium.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for testing an electronic device, a computer device, and a computer-readable storage medium.
Background
In the prior art, when the audio playing function of the electronic equipment is tested, the left channel and the right channel of the electronic equipment need to be tested respectively by repeating multiple operations, manual work needs to participate in the testing process, the testing efficiency is low, and the method is not suitable for large-batch electronic equipment testing scenes.
Disclosure of Invention
In view of the above, the present disclosure provides an improved method and apparatus for testing an electronic device.
One aspect of the present disclosure provides a method for testing an electronic device, including: instructing the electronic equipment to play a specified audio file, wherein the specified audio file comprises a left channel audio and a right channel audio, the left channel audio has a first frequency, the right channel audio has a second frequency, and the first frequency is different from the second frequency. And recording the playing process of the electronic equipment to obtain a recording file. Analyzing the signal components of the sound recording file, determining that the left channel of the electronic equipment is tested normally when the sound recording file contains signal components of a first frequency meeting a first preset condition, and determining that the right channel of the electronic equipment is tested normally when the sound recording file contains signal components of a second frequency meeting a second preset condition.
According to an embodiment of the present disclosure, the analyzing the signal components of the audio file includes: and converting the sound recording file from a time domain signal to a frequency domain signal. Frequency components of a first frequency and frequency components of a second frequency are extracted from the frequency domain signal, respectively. When the extracted amplitude value exceeds a first threshold value and exceeds a frequency component of a first frequency of the amplitude value of a frequency component of a first predetermined ratio in the frequency domain signal, determining that the sound recording file contains a signal component of the first frequency meeting a first predetermined condition, and when the extracted amplitude value exceeds a second threshold value and exceeds a frequency component of a second frequency of the amplitude value of a frequency component of a second predetermined ratio in the frequency domain signal, determining that the sound recording file contains a signal component of a second frequency meeting a second predetermined condition.
According to an embodiment of the present disclosure, the instructing the electronic device to play the specified audio file includes: and instructing the electronic equipment to play the specified audio file in a linear output mode through a universal asynchronous receiving and transmitting transmission interface, a serial communication port or a universal serial bus interface.
According to an embodiment of the present disclosure, the method further includes: when the sound recording file does not contain a signal component of a first frequency meeting a first preset condition, determining that the left channel of the electronic equipment is abnormal in test, and outputting first prompt information, and when the sound recording file does not contain a signal component of a second frequency meeting a second preset condition, determining that the right channel of the electronic equipment is abnormal in test, and outputting second prompt information.
According to the embodiment of the disclosure, the electronic equipment is a smart sound box.
Another aspect of the present disclosure provides a test apparatus for an electronic device, including: the device comprises an indication module, a recording module, an analysis module, a first result determination module and a second result determination module. The indicating module is used for indicating the electronic equipment to play a specified audio file, wherein the specified audio file comprises a left channel audio and a right channel audio, the left channel audio has a first frequency, the right channel audio has a second frequency, and the first frequency is different from the second frequency. The recording module is used for recording the playing process of the electronic equipment to obtain a recording file. The analysis module is used for analyzing the signal components of the sound recording file. The first result determining module is used for determining that the left channel of the electronic equipment is tested normally when the sound recording file contains a signal component with a first frequency meeting a first preset condition. And the second result determining module is used for determining that the right channel of the electronic equipment is tested normally when the sound recording file contains a signal component of a second frequency meeting a second preset condition.
According to an embodiment of the present disclosure, an analysis module includes: the device comprises a conversion submodule, an extraction submodule, a first determination submodule and a second determination submodule. And the conversion submodule is used for converting the sound recording file from a time domain signal to a frequency domain signal. The extraction submodule is used for respectively extracting the frequency component of the first frequency and the frequency component of the second frequency from the frequency domain signal. The first determining submodule is used for determining that the sound recording file contains signal components of the first frequency meeting a first predetermined condition when the frequency component of the first frequency of the amplitude value exceeds a first threshold and exceeds the amplitude value of the frequency component of the first predetermined ratio in the frequency domain signal is extracted. And the second determining submodule is used for determining that the sound recording file contains signal components of the second frequency meeting a second predetermined condition when the frequency component of the second frequency of the amplitude value exceeds a second threshold and exceeds the amplitude value of the frequency component of the second predetermined ratio in the frequency domain signal is extracted.
According to the embodiment of the disclosure, the indicating module is specifically configured to indicate, through a universal asynchronous receive/transmit transmission interface, a serial communication port, or a universal serial bus interface, the electronic device to play the specified audio file in a linear output mode.
According to the embodiment of the disclosure, the device further comprises a first prompting module and a second prompting module. The first prompting module is used for determining that the left channel of the electronic equipment is tested abnormally and outputting first prompting information when the sound recording file does not contain a signal component of a first frequency meeting a first preset condition. And the second prompting module is used for determining that the right channel of the electronic equipment is tested abnormally and outputting second prompting information when the sound recording file does not contain a signal component of a second frequency meeting a second preset condition.
According to the embodiment of the disclosure, the electronic equipment is a smart sound box.
Another aspect of the present disclosure provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method as described above when executing the program.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the method as described above when executed.
According to the embodiment of the disclosure, the electronic equipment to be tested is instructed to play the specified audio file with the fixed left channel and the fixed right channel but different frequencies, the playing of the electronic equipment is recorded to obtain the recorded file, the playing effect of the left channel and the playing effect of the right channel of the electronic equipment can be tested simultaneously in one test operation through analyzing the recorded file, the test results of the left channel and the right channel of the electronic equipment are obtained, and the test of the left channel or the right channel is not required to be carried out repeatedly. The process is simple and efficient, the testing speed is high, the testing cost is low, the testing result has high accuracy, manual participation is not needed, the full automation is achieved, and the method is suitable for large-batch electronic equipment testing scenes.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an exemplary system architecture to which the test method and apparatus of an electronic device may be applied, according to an embodiment of the present disclosure;
FIG. 2 schematically shows a flow chart of a method of testing an electronic device according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a method of testing an electronic device according to another embodiment of the present disclosure;
FIG. 4A is a schematic diagram illustrating a time domain signal of an audio record file according to an embodiment of the present disclosure;
FIG. 4B schematically shows a schematic diagram of a frequency domain signal of an audio record file according to an embodiment of the present disclosure;
FIG. 5 schematically shows a block diagram of a testing arrangement of an electronic device according to an embodiment of the present disclosure;
FIG. 6 schematically shows a block diagram of a testing arrangement of an electronic device according to another embodiment of the present disclosure; and
FIG. 7 schematically illustrates a block diagram of a computer device suitable for implementing a testing method of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides a method and a device for testing electronic equipment, which are used for testing an audio playing function of the electronic equipment. The method comprises a stage of indicating the electronic equipment to be tested to play a specified audio file, a stage of recording the audio played by the electronic equipment to be tested, and a stage of determining the test results of the left channel and the right channel of the electronic equipment to be tested based on the analysis of the recorded audio file. At the stage of playing the designated audio file by the designated electronic equipment to be tested, the designated audio file comprises a left channel audio and a right channel audio, wherein the left channel audio has a first frequency, the right channel audio has a second frequency, and the first frequency is different from the second frequency. Analyzing signal components of a record file at the stage of analyzing and determining left channel and right channel test results of the electronic equipment to be tested based on the record file, and determining that the left channel test of the electronic equipment to be tested is normal when the record file contains signal components of a first frequency meeting a first preset condition; and when the sound recording file contains a signal component of a second frequency meeting a second preset condition, determining that the right channel of the electronic equipment to be tested is tested normally.
Fig. 1 schematically illustrates an exemplary system architecture 100 to which the test method and apparatus of an electronic device may be applied, according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in FIG. 1, a system architecture 100 according to this embodiment may include an electronic device 101, terminal devices 102-104, a network 105, and a server 106.
The electronic device 101 is an electronic device to be tested, and in this embodiment, the electronic device 101 is a smart speaker. In other embodiments, the electronic device 101 may be other devices with audio output testing requirements. The terminal devices 102-104 are used for testing the electronic device 101.
The terminal devices 102-104 may be various electronic devices with certain computing capabilities, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The network 105 is used to provide a medium for communication links between the terminal devices 102-104 and the server 106. Network 105 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The server 106 may be a server providing various services, such as a background management server (for example only) providing support for the terminal devices 102 to 104 in the process of testing the electronic device 101. The background management server can analyze and process various data sent by the terminal devices 102-104, and feed back processing results (such as time domain signal data, frequency domain signal data, spectrogram and the like) to the terminal devices.
It should be noted that the test method for the electronic device provided by the embodiment of the present disclosure can be generally executed by the terminal devices 102 to 104. Accordingly, the testing device for electronic devices provided by the embodiments of the present disclosure can be generally disposed in the terminal devices 102 to 104.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically shows a flow chart of a method of testing an electronic device according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes instructing the electronic device to be tested to play a designated audio file in operation S210.
Wherein the designated audio file comprises a left channel audio and a right channel audio, the left channel audio of the designated audio file has a first frequency, the right channel audio of the designated audio file has a second frequency, and the first frequency is different from the second frequency. The designated audio file may be stored in the electronic device to be tested in advance, may be generated by audio generation software in the electronic device to be tested before the test is started, or may be generated by other devices and then sent to the electronic device to be tested, which is not limited herein.
In operation S220, a playing process of the electronic device to be tested is recorded to obtain a recording file.
The operation records in the process that the electronic equipment to be tested plays the specified audio file, so as to obtain the recording file representing the playing effect of the electronic equipment on the specified audio file.
In operation S230, signal components of the sound recording file are analyzed.
In operation S240, it is determined that the left channel of the electronic device to be tested is tested normally when the sound recording file contains a signal component of a first frequency satisfying a first predetermined condition.
In operation S250, it is determined that the right channel test of the electronic device to be tested is normal when the sound recording file contains a signal component of a second frequency satisfying a second predetermined condition.
The operations S240 and S250 are not in sequence, that is, when a signal component of a first frequency, which meets a first predetermined condition and corresponds to a left channel audio of an appointed audio file played by the electronic device to be tested, is detected in the audio record file, it can be determined that the left channel playing effect of the electronic device to be tested is normal. Meanwhile, when a signal component of a second frequency, meeting a second preset condition, corresponding to the right channel audio of the specified audio file played by the electronic equipment to be tested is detected in the recording file, the right channel playing effect of the electronic equipment to be tested can be determined to be normal.
It can be seen that the method shown in fig. 2 instructs the electronic device to be tested to play a specified audio file with fixed left channel and right channel frequencies but different frequencies, records the play of the electronic device to obtain a recorded file, and can simultaneously test the play effect of the left channel and the play effect of the right channel of the electronic device in one test operation by analyzing the recorded file to obtain the test results of the left channel and the right channel of the electronic device without repeating multiple operations to respectively test the left channel or the right channel. The process is simple and efficient, the testing speed is high, the testing cost is low, the testing result has high accuracy, manual participation is not needed, the full automation is achieved, and the method is suitable for large-batch electronic equipment testing scenes.
Fig. 3 schematically shows a flow chart of a method of testing an electronic device according to another embodiment of the present disclosure. Specifically, fig. 3 illustrates a specific operation procedure of operation S230 in the test method of the electronic device shown in fig. 2.
As shown in fig. 3, the analyzing the signal components of the audio file in operation S230 includes:
in operation S231, the audio record file is converted from a time domain signal to a frequency domain signal.
In this operation, the audio file may be converted from a time domain signal to a frequency domain signal by various time-frequency transformation methods, such as Fourier transform (Fourier transform), Laplace transform (Laplace transform), z-transform (z-transform), and the like, which are not limited herein. For example, in this example, a fast fourier transform is used for time-frequency conversion.
In operation S232, frequency components of a first frequency and frequency components of a second frequency are respectively extracted from the frequency domain signal.
In operation S233, when a frequency component of a first frequency, of which the amplitude value exceeds a first threshold and exceeds the amplitude value of a frequency component of a first predetermined ratio in the frequency domain signal, is extracted, it is determined that the audio record file contains a signal component of the first frequency that satisfies a first predetermined condition.
In operation S234, when a frequency component of a second frequency, of which the amplitude value exceeds a second threshold and exceeds the amplitude value of the frequency component of a second predetermined ratio in the frequency domain signal, is extracted, it is determined that the audio record file contains a signal component of the second frequency that satisfies a second predetermined condition.
Fig. 2 to 3 are explained below with reference to fig. 4A to 4B as a specific example:
fig. 4A schematically shows a schematic diagram of a time domain signal of an audio record file according to an embodiment of the present disclosure.
As shown in FIG. 4A, the time domain signal x (t) of the sound recording file in this example is composed of five sinusoidal signals with different frequencies, signal S1Has a frequency of f1(Hz), signal S2At a frequency off2(Hz), signal S3Has a frequency of f3(Hz), signal S4Has a frequency of f4(Hz), signal S5Has a frequency of f5(Hz). Wherein f is1<f2<f3<f4<f5。
The time domain signal x (t) shown in fig. 4A is converted into a frequency domain signal x (f) by inverse fast fourier transform, resulting in the spectrogram shown in fig. 4B.
FIG. 4B schematically shows a schematic diagram of a frequency domain signal of an audio record file according to an embodiment of the present disclosure.
As shown in fig. 4B, 5 frequency components are shown in the spectrogram: frequency component 1, frequency component 2, frequency component 3, frequency component 4, and frequency component 5. Wherein the frequency of the frequency component 1 is f1(Hz) and the frequency of the frequency component 2 is f2(Hz) and the frequency of the frequency component 3 is f3(Hz) and the frequency of the frequency component 4 is f4(Hz) and the frequency of the frequency component 5 is f5(Hz). Amplitude value of frequency component 1 is X1(dB), the amplitude value of the frequency component 2 is X2(dB), the amplitude value of the frequency component 3 is X3(dB), the amplitude value of the frequency component 4 is X4(dB), the amplitude value of the frequency component 5 is X5(dB)。
In this embodiment, the first frequency is f1(Hz) and a second frequency of f2(Hz). The first threshold value is a (db), the first predetermined proportion is 80%, the second threshold value is b (db), and the second predetermined proportion is 60%.
The frequency component 1 of the first frequency and the frequency component 2 of the second frequency can be extracted from the spectrogram shown in fig. 4B. Amplitude value X of frequency component 11(dB) exceeds A (dB) and the amplitude value X of the frequency component 11(dB) exceeding the amplitude values of the frequency components (80% × 5 ═ 4) of the first predetermined ratio in the spectrogram, it is determined that the left channel playback effect of the electronic device to be detected is normal2(dB) exceeds B (dB) and the amplitude value X of the frequency component 22(dB) the amplitude of the frequency components exceeding the second predetermined proportion in the spectrogram (i.e. 60% × 5-3 frequency components)And when the value is the same, determining that the right channel playing effect of the electronic equipment to be detected is normal.
It can be known that the frequency component 1 in the spectrogram shown in fig. 4B represents the left channel audio with a fixed first frequency played by the electronic device, the frequency component 2 represents the right channel audio with a fixed second frequency played by the electronic device, and the frequency components 3, 4, and 5 represent the periodic interference noise (from the external environment or the electronic device itself) mixed when the electronic device plays the audio. When the frequency component of the first frequency and the frequency component of the second frequency in the spectrogram are main frequency components of the sound recording file, it is indicated that the playing effect of the left channel and the right channel of the electronic device is normal. In a perfect ideal case, the spectrogram of the audio recording file played by the electronic device only includes the frequency components of the first frequency and the frequency components of the second frequency. It should be noted that fig. 4A to 4B are only examples and are intended to use a simpler model to illustrate the implementation principle of the present disclosure, in other embodiments, the time domain signal of the sound recording file may be other periodic or non-periodic signals in various forms, and a corresponding frequency domain signal is obtained after time-frequency transformation, and the frequency component of the first frequency and the frequency component of the second frequency are extracted from the frequency domain signal to implement simultaneous testing of the audio playing function of the left channel and the right channel of the electronic device, which is not limited herein.
Further, the method shown in fig. 2 and 3 further includes an operation S260 of determining that the left channel of the electronic device is abnormal when the sound recording file does not include a signal component of the first frequency satisfying the first predetermined condition, and outputting a first prompt message. And when the sound recording file does not contain a signal component of a second frequency meeting a second preset condition, determining that the right channel of the electronic equipment is tested abnormally, and outputting second prompt information.
That is to say, if it is detected that the frequency component of the first frequency and/or the frequency component of the second frequency in the spectrogram of the audio record file played by the electronic device is annihilated by the frequency components of other noises, it is indicated that the playing effect of the left channel and/or the right channel of the electronic device is abnormal, a large amount of interference noises are played, and a corresponding prompt needs to be performed.
The implementation of fig. 2 to 3 is illustrated by way of an example:
for example, the testing method of the electronic device shown in fig. 2 to 3 is applied to a computer device, and the electronic device to be tested is a smart speaker. The computer device may communicate with the electronic device to be tested through various communication interfaces such as a UART (Universal Asynchronous Receiver/Transmitter) interface, a COM (Serial communication) port, or a USB (Universal Serial Bus) interface. In this embodiment, the electronic device to be tested is a smart speaker. At the beginning of the test, the computer device sends a control command to the smart speaker through one of the communication interfaces, instructing the smart speaker to play a specified audio file in a linear output (LINEOUT) mode, where the specified audio file includes a left channel audio and a right channel audio, the left channel audio has a first frequency, the right channel audio has a second frequency, in this case, the first frequency is 1KHz, and the second frequency is 2 KHz. The specified audio file may be stored in the smart speaker in advance, or may be generated by using audio generation software in the smart speaker before the test is started, or may be generated in the computer device and then sent to the smart speaker, which is not limited herein. The linear output mode of the electronic equipment is a standard analog output mode of non-power output, and generally has a relatively high level signal and a relatively large signal internal resistance. And after the computer equipment sends a control command to the intelligent sound box, the recording function is started at the same time. The computer equipment records the audio played by the intelligent sound box based on the recording function to obtain a recording file. Specifically, the recording process can be completed by using the recording function of the computer device. And then, analyzing the sound recording file, and determining that the left channel playing effect of the LINEOUT output port of the intelligent sound box is normal when the frequency domain signal of the sound recording file comprises a frequency component of 1KHz meeting a first preset condition. Similarly, when the frequency domain signal of the sound recording file comprises the frequency component of 2KHz meeting the second preset condition, the right channel playing effect of the LINEOUT output port of the intelligent sound box is determined to be normal.
Therefore, through the process, the functional test of the LINEOUT output port of the electronic equipment can be realized only by equipping the electronic equipment to be tested with one upper computer, the configuration is simple, the logic is reasonable, and the requirement of mass test is met. In other embodiments, the functional test of other audio output ports of the electronic device may be implemented according to the present solution, which is not limited herein.
Fig. 5 schematically shows a block diagram of a testing apparatus of an electronic device according to an embodiment of the present disclosure. As shown in fig. 5, the test apparatus 500 of the electronic device includes: an indication module 510, a recording module 520, an analysis module 530, a first result determination module 540, and a second result determination module 550.
The indicating module 510 is configured to instruct the electronic device to play a specified audio file. Wherein the designated audio file includes a left channel audio having a first frequency and a right channel audio having a second frequency, the first frequency being different from the second frequency. The recording module 520 is configured to record a playing process of the electronic device to obtain a recording file. The analysis module 530 is used for analyzing the signal components of the sound recording file. The first result determining module 540 is configured to determine that the left channel of the electronic device is tested normally when the audio record file contains a signal component of a first frequency that satisfies a first predetermined condition. The second result determining module 550 is configured to determine that the right channel of the electronic device is tested normally when the audio record file contains a signal component of a second frequency that satisfies a second predetermined condition.
In an embodiment of the disclosure, the instructing module 510 is specifically configured to instruct the electronic device to play the specified audio file in a linear output mode through a universal asynchronous receiver/transmitter interface, a serial communication port, or a universal serial bus interface.
In one embodiment of the present disclosure, the electronic device to be tested is a smart speaker.
Fig. 6 schematically shows a block diagram of a testing apparatus of an electronic device according to another embodiment of the present disclosure. As shown in fig. 6, the testing apparatus 600 of the electronic device includes an indication module 610, a recording module 620, an analysis module 630, a first result determination module 640, and a second result determination module 650. The indication module 610 may perform the operation performed by the indication module 510, the recording module 620 may perform the operation performed by the recording module 520, the analysis module 630 may perform the operation performed by the analysis module 530, the first result determination module 640 may perform the operation performed by the first result determination module 540, and the second result determination module 650 may perform the operation performed by the second result determination module 550, which has been described in detail above and is not described herein again.
In one embodiment of the present disclosure, the analysis module 630 includes a conversion sub-module 631, an extraction sub-module 632, a first determination sub-module 633, and a second determination sub-module 634.
The converting sub-module 631 is configured to convert the sound recording file from a time domain signal to a frequency domain signal. The extraction sub-module 632 is configured to extract frequency components of the first frequency and frequency components of the second frequency from the frequency domain signal. The first determining sub-module 633 is configured to, when a frequency component of a first frequency, of which the amplitude value exceeds a first threshold and exceeds the amplitude value of a frequency component of a first predetermined ratio in the frequency domain signal, determine that the audio record file contains a signal component of the first frequency that satisfies a first predetermined condition. And the second determining sub-module 634 is configured to determine that the sound recording file contains a signal component of the second frequency that satisfies a second predetermined condition when the frequency component of the second frequency is extracted, where the amplitude value exceeds a second threshold and exceeds the amplitude value of the frequency component of the second predetermined ratio in the frequency domain signal.
Further, in an embodiment of the present disclosure, the testing apparatus 600 of the electronic device further includes a first prompting module 660 and a second prompting module 670.
The first prompting module 660 is configured to determine that the left channel of the electronic device is tested abnormally when the sound recording file does not include a signal component of the first frequency that meets a first predetermined condition, and output first prompting information. And the second prompt module 670 is configured to determine that the right channel test of the electronic device is abnormal when the sound recording file does not include a signal component of a second frequency that meets a second predetermined condition, and output second prompt information.
It should be noted that the implementation, solved technical problems, implemented functions, and achieved technical effects of each module/unit/subunit and the like in the apparatus part embodiment are respectively the same as or similar to the implementation, solved technical problems, implemented functions, and achieved technical effects of each corresponding step in the method part embodiment, and are not described herein again.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the indication module 610, the recording module 620, the analysis module 630, the first result determination module 640, the second result determination module 650, the first prompt module 660, and the second prompt module 670 may be combined in one module to be implemented, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the indication module 610, the recording module 620, the analysis module 630, the first result determination module 640, the second result determination module 650, the first prompt module 660, and the second prompt module 670 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or in a suitable combination of any of them. Alternatively, at least one of the indication module 610, the recording module 620, the analysis module 630, the first result determination module 640, the second result determination module 650, the first prompt module 660 and the second prompt module 670 may be at least partially implemented as a computer program module, which when executed, may perform a corresponding function.
Fig. 7 schematically shows a block diagram of a computer device adapted to implement the above described method according to an embodiment of the present disclosure. The computer device shown in fig. 7 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
As shown in fig. 7, a computer device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 703, various programs and data necessary for the operation of the apparatus 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. The processor 701 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 702 and/or the RAM 703. It is noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the device 700 may also include an input/output (I/O) interface 705, the input/output (I/O) interface 705 also being connected to the bus 704. The device 700 may also include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure 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 computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by the processor 701, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: 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), 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 present 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. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 702 and/or the RAM 703 and/or one or more memories other than the ROM 702 and the RAM 703 described above.
The flowchart 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 or flowchart illustration, and combinations of blocks in the block diagrams 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.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.
Claims (12)
1. A method of testing an electronic device, comprising:
instructing the electronic device to play a designated audio file, wherein the designated audio file comprises a left channel audio and a right channel audio, the left channel audio having a first frequency, the right channel audio having a second frequency, the first frequency being different from the second frequency;
recording the playing process of the electronic equipment to obtain a recording file;
analyzing the signal components of the sound recording file;
when the sound recording file contains a signal component with a first frequency meeting a first preset condition, determining that the left channel of the electronic equipment is tested normally; and
and when the sound recording file contains a signal component of a second frequency meeting a second preset condition, determining that the right channel of the electronic equipment is tested normally.
2. The method of claim 1, wherein said analyzing signal content of said audio recording file comprises:
converting the sound recording file from a time domain signal to a frequency domain signal;
respectively extracting frequency components of a first frequency and frequency components of a second frequency from the frequency domain signal;
when the frequency component of the first frequency of the amplitude value of the frequency component exceeding the first threshold value and exceeding the first predetermined ratio in the frequency domain signal is extracted, determining that the sound recording file contains a signal component of the first frequency meeting a first predetermined condition; and
and when the frequency component of the second frequency of the amplitude value exceeding the second threshold value and exceeding the amplitude value of the frequency component of the second predetermined ratio in the frequency domain signal is extracted, determining that the sound recording file contains a signal component of the second frequency meeting a second predetermined condition.
3. The method of claim 1, wherein the instructing the electronic device to play a specified audio file comprises:
and instructing the electronic equipment to play the specified audio file in a linear output mode through a universal asynchronous receiving and transmitting transmission interface, a serial communication port or a universal serial bus interface.
4. The method of claim 1, further comprising:
when the sound recording file does not contain a signal component of a first frequency meeting a first preset condition, determining that the left channel of the electronic equipment is tested abnormally, and outputting first prompt information; and
and when the sound recording file does not contain a signal component of a second frequency meeting a second preset condition, determining that the right channel of the electronic equipment is tested abnormally, and outputting second prompt information.
5. The method of claim 1, wherein the electronic device is a smart speaker.
6. A test apparatus for an electronic device, comprising:
the electronic equipment comprises an indicating module, a playing module and a playing module, wherein the indicating module is used for indicating the electronic equipment to play a specified audio file, the specified audio file comprises a left channel audio and a right channel audio, the left channel audio has a first frequency, the right channel audio has a second frequency, and the first frequency is different from the second frequency;
the recording module is used for recording the playing process of the electronic equipment to obtain a recording file;
the analysis module is used for analyzing the signal components of the sound recording file;
the first result determining module is used for determining that the left channel of the electronic equipment is tested normally when the sound recording file contains a signal component of a first frequency meeting a first preset condition; and
and the second result determining module is used for determining that the right channel of the electronic equipment is tested normally when the sound recording file contains a signal component of a second frequency meeting a second preset condition.
7. The apparatus of claim 6, wherein the analysis module comprises:
the conversion submodule is used for converting the sound recording file from a time domain signal to a frequency domain signal;
an extraction submodule for extracting frequency components of a first frequency and frequency components of a second frequency from the frequency domain signal, respectively;
the first determining submodule is used for determining that the sound recording file contains signal components of first frequency meeting a first predetermined condition when the frequency component of the first frequency of the amplitude value exceeds a first threshold and exceeds the amplitude value of the frequency component of the first predetermined ratio in the frequency domain signal is extracted; and
and the second determining submodule is used for determining that the sound recording file contains signal components of second frequency meeting a second predetermined condition when the frequency component of the second frequency of the amplitude value exceeds a second threshold and exceeds the amplitude value of the frequency component of the second predetermined ratio in the frequency domain signal is extracted.
8. The apparatus of claim 6, wherein the instructing module is configured to instruct the electronic device to play the specified audio file in a linear output mode through a universal asynchronous receiver/transmitter interface, a serial communication port, or a universal serial bus interface.
9. The apparatus of claim 6, further comprising:
the first prompting module is used for determining that the left channel of the electronic equipment is tested abnormally and outputting first prompting information when the sound recording file does not contain a signal component of a first frequency meeting a first preset condition; and
and the second prompting module is used for determining that the right channel of the electronic equipment is tested abnormally and outputting second prompting information when the sound recording file does not contain a signal component of a second frequency meeting a second preset condition.
10. The apparatus of claim 6, wherein the electronic device is a smart speaker.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the program implementing:
a method of testing an electronic device as claimed in any one of claims 1 to 5.
12. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform:
a method of testing an electronic device as claimed in any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910225391.XA CN111726740A (en) | 2019-03-22 | 2019-03-22 | Electronic equipment testing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910225391.XA CN111726740A (en) | 2019-03-22 | 2019-03-22 | Electronic equipment testing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111726740A true CN111726740A (en) | 2020-09-29 |
Family
ID=72563996
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910225391.XA Pending CN111726740A (en) | 2019-03-22 | 2019-03-22 | Electronic equipment testing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111726740A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113543005A (en) * | 2021-07-01 | 2021-10-22 | 猫岐智能科技(上海)有限公司 | Audio device detection method and system |
CN113709648A (en) * | 2021-08-27 | 2021-11-26 | 重庆紫光华山智安科技有限公司 | Microphone and loudspeaker collaborative testing method, system, medium and electronic terminal |
CN113938806A (en) * | 2021-10-12 | 2022-01-14 | 台湾立讯精密有限公司 | Noise detection device and method thereof |
CN114302309A (en) * | 2021-12-16 | 2022-04-08 | 合肥联宝信息技术有限公司 | Detection method and device of audio collector |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101902677A (en) * | 2010-06-23 | 2010-12-01 | 中兴通讯股份有限公司 | Audio detection device and method |
CN104661169A (en) * | 2013-11-25 | 2015-05-27 | 深圳中电长城信息安全***有限公司 | Audio testing method and device |
CN106211014A (en) * | 2016-08-09 | 2016-12-07 | 广州视源电子科技股份有限公司 | Loudspeaker detection method and device |
CN106686511A (en) * | 2016-11-15 | 2017-05-17 | 歌尔股份有限公司 | Earphone function testing method and testing system |
CN106791825A (en) * | 2016-12-23 | 2017-05-31 | 深圳创维数字技术有限公司 | A kind of audio automated testing method and terminal |
CN108260065A (en) * | 2016-12-29 | 2018-07-06 | 研祥智能科技股份有限公司 | TV loudspeaker playing function online test method and device |
-
2019
- 2019-03-22 CN CN201910225391.XA patent/CN111726740A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101902677A (en) * | 2010-06-23 | 2010-12-01 | 中兴通讯股份有限公司 | Audio detection device and method |
CN104661169A (en) * | 2013-11-25 | 2015-05-27 | 深圳中电长城信息安全***有限公司 | Audio testing method and device |
CN106211014A (en) * | 2016-08-09 | 2016-12-07 | 广州视源电子科技股份有限公司 | Loudspeaker detection method and device |
CN106686511A (en) * | 2016-11-15 | 2017-05-17 | 歌尔股份有限公司 | Earphone function testing method and testing system |
CN106791825A (en) * | 2016-12-23 | 2017-05-31 | 深圳创维数字技术有限公司 | A kind of audio automated testing method and terminal |
CN108260065A (en) * | 2016-12-29 | 2018-07-06 | 研祥智能科技股份有限公司 | TV loudspeaker playing function online test method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113543005A (en) * | 2021-07-01 | 2021-10-22 | 猫岐智能科技(上海)有限公司 | Audio device detection method and system |
CN113709648A (en) * | 2021-08-27 | 2021-11-26 | 重庆紫光华山智安科技有限公司 | Microphone and loudspeaker collaborative testing method, system, medium and electronic terminal |
CN113938806A (en) * | 2021-10-12 | 2022-01-14 | 台湾立讯精密有限公司 | Noise detection device and method thereof |
CN114302309A (en) * | 2021-12-16 | 2022-04-08 | 合肥联宝信息技术有限公司 | Detection method and device of audio collector |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111726740A (en) | Electronic equipment testing method and device | |
CN107516510B (en) | Automatic voice testing method and device for intelligent equipment | |
CN110265064B (en) | Audio frequency crackle detection method, device and storage medium | |
CN102572672A (en) | Audio frequency module test system and method | |
CN112926285A (en) | Chip verification method, platform, device, equipment and storage medium | |
CN112306447A (en) | Interface navigation method, device, terminal and storage medium | |
CN112291121B (en) | Data processing method and related equipment | |
CN108829370B (en) | Audio resource playing method and device, computer equipment and storage medium | |
US20140060288A1 (en) | Testing device and storage medium with testing function, and testing method | |
CN111065036B (en) | Frequency response testing method and device of microphone array | |
CN113448730A (en) | Service processing method and device, computer equipment and storage medium | |
CN108419199A (en) | Fault detection method, device and the equipment of acoustic signals, readable medium | |
WO2023005193A1 (en) | Subtitle display method and device | |
CN111354335A (en) | Voice recognition testing method and device, storage medium and terminal equipment | |
CN109614137B (en) | Software version control method, device, equipment and medium | |
CN104796687A (en) | Testing device for frequency mixer of distributed cable mode termination system | |
CN112086106A (en) | Test scene alignment method, device, medium and equipment | |
US11269951B2 (en) | Indexing variable bit stream audio formats | |
CN111045635B (en) | Audio processing method and device | |
CN111488584A (en) | Production environment testing method and device, computing equipment and medium | |
CN109271569B (en) | Output method, apparatus, system and medium | |
CN111145792B (en) | Audio processing method and device | |
CN113835995B (en) | Method and device for generating test cases | |
CN111831531B (en) | Test method and device | |
CN111444068B (en) | System performance test method, device, computer equipment and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200929 |