CN111432060B - Method and device for testing mobile phone audio module and storage medium - Google Patents

Method and device for testing mobile phone audio module and storage medium Download PDF

Info

Publication number
CN111432060B
CN111432060B CN202010122945.6A CN202010122945A CN111432060B CN 111432060 B CN111432060 B CN 111432060B CN 202010122945 A CN202010122945 A CN 202010122945A CN 111432060 B CN111432060 B CN 111432060B
Authority
CN
China
Prior art keywords
test
mobile phone
audio
module
standard
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
CN202010122945.6A
Other languages
Chinese (zh)
Other versions
CN111432060A (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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202010122945.6A priority Critical patent/CN111432060B/en
Publication of CN111432060A publication Critical patent/CN111432060A/en
Application granted granted Critical
Publication of CN111432060B publication Critical patent/CN111432060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A testing method, device and storage medium for mobile phone audio module includes: the test mobile phone is communicated with a standard mobile phone on the test server; the sound card of the computer infuses first test audio to the test mobile phone microphone and plays the first test audio in the standard mobile phone loudspeaker; the sound card of the test server records the played first test audio from the standard mobile phone loudspeaker to form a first recorded audio, and the first recorded audio is compared with the first test audio so as to judge whether the coding unit is qualified; the sound card of the test server infuses second test audio to the standard mobile phone microphone and plays the second test audio in the test mobile phone loudspeaker; the sound card of the test server records second test audio from the test mobile phone loudspeaker to form second recorded audio, and the second recorded audio is compared with the second test audio, so that whether the decoding unit is qualified is judged. The invention can simulate the actual conversation scene more truly, the test effect is more realistic, the pyAudio module is not limited by the test time, and the stability and the practicability of the test are realized.

Description

Method and device for testing mobile phone audio module and storage medium
Technical Field
The invention relates to the technical field of testing, in particular to a method and a device for testing an audio module of a mobile phone and a storage medium.
Background
The mobile phone is used as a communication product, and the main function of the mobile phone is to realize voice communication between two parties. Therefore, the standard for measuring the quality of voice call voice quality is always one of the most important test standards of the mobile phone. The current automatic test scheme of the mobile phone audio module mainly comprises the following two forms:
1) Through an audio security box, then put 2 speakers about in the audio box, through the computer control playback, and control the mobile phone recording at the same time, then compare the audio frequency that is recorded with the primitive audio frequency that the computer end was played, judge the quality of the audio frequency of mobile phone. The defect is that only the recording function of the mobile phone chip is judged singly, and performance test and analog audio test are not performed.
2) The mobile phone is communicated with the test server, audio is infused into the MIC of the mobile phone by controlling the MAYA audio module through a computer, then the audio is transmitted to the test server through an air interface network after being coded and decoded (the coding is to convert continuous analog signals into discrete digital signals, and the decoding is opposite to the coding), and then the original audio in the test server is compared with audio files transmitted through the network. And otherwise, simulating playback through the test server to transmit audio to the mobile phone chip, controlling the MAYA to record the MIC of the mobile phone by the computer, and comparing the recorded audio with the original file by the MAYA. The defect is very dependent on the MAYA audio module, and the module is easy to damage in pressure test, does not simulate the user scene in reality, and is supposed to be a mobile phone-to-mobile phone transmission mode.
Disclosure of Invention
In order to solve the technical problems, the invention provides a testing method of a mobile phone audio module, which is applied to an electronic device, wherein the audio module comprises a coding unit and a decoding unit which are connected through a circuit, the coding unit is connected with a microphone, the decoding unit is connected with a loudspeaker, and the received digital signal is converted into an analog signal, and the testing method comprises the following steps:
step S11, enabling the test mobile phone to be communicated with a standard mobile phone on the test server, enabling the test mobile phone to be in a call state with the standard mobile phone, wherein the test mobile phone is connected with a computer, the standard mobile phone is connected with the test server, an audio module of the standard mobile phone is a standard module, and the standard mobile phone is utilized to test the audio module of the test mobile phone;
step S12, the sound card of the computer infuses first test audio to the microphone of the test mobile phone, the first test audio is transmitted to the coding unit of the audio module of the test mobile phone through the microphone of the test mobile phone and is compiled into digital signals, the digital signals are transmitted to the decoding unit of the audio module of the standard mobile phone to be decoded and converted into analog signals, and the analog signals are played on the loudspeaker of the standard mobile phone;
step S13, the sound card of the test server records the played first test audio from the standard mobile phone loudspeaker to form a first recorded audio, then the first recorded audio is compared with the first test audio, if the accuracy reaches a set percentage, the code unit of the audio module of the test mobile phone is determined to be qualified, otherwise, the code unit is determined to be unqualified;
step S14, the sound card of the test server infuses second test audio to the standard mobile phone microphone, the second test audio is transmitted to the coding unit of the audio module of the standard mobile phone through the standard mobile phone microphone, the second test audio is compiled into digital signals, the digital signals are transmitted to the decoding unit of the audio module of the test mobile phone to be decoded and converted into analog signals, and the analog signals are played in the loudspeaker of the test mobile phone;
and S15, enabling the sound card of the test server to record second test audio from the loudspeaker of the test mobile phone to form second recorded audio, comparing the second recorded audio with the second test audio, and determining that the coding unit of the audio module of the test mobile phone is qualified if the accuracy reaches a set percentage, otherwise, determining that the coding unit of the audio module of the test mobile phone is unqualified, and completing the test of the audio module of the test mobile phone.
Preferably, in step S11, a plurality of test handsets are simultaneously connected to a standard handset on a test server, so that each test handset maintains a call state with the standard handset;
in step S12, the sound card of the computer infuses the first test audio to each test mobile phone microphone, and the first test audio of each test mobile phone is converted into a corresponding analog signal after being encoded and decoded, and is played in sequence at the standard mobile phone speaker;
in step S13, the sound card of the test server records each first test audio played in turn from the speaker end of the standard mobile phone to form a plurality of first recorded audio, and performs a comparison test with the first test audio respectively, thereby completing the test of the coding units of the audio modules of the plurality of test mobile phones;
in step S14, the sound card of the test server sequentially infuses a plurality of pieces of second test audio to the microphone of the standard mobile phone according to time sequence, the second test audio is transmitted to the decoding unit of the audio module of each test mobile phone, each test mobile phone sequentially plays the second test audio according to time sequence, wherein when one test mobile phone plays the second test audio, the other test mobile phones are turned into mute state;
in step S15, during the process of playing the second test audio by each test mobile phone, the sound card of the test server records the second test audio from the speaker end of the test mobile phone to form a plurality of second recorded audio, and compares the second recorded audio with the second test audio, thereby completing the test of the decoding units of the audio modules of the plurality of test mobile phones.
Preferably, the communication between the test handset and the standard handset is achieved by executing an adb-s < device name > shell service call AAAA through an adb tool of Python, wherein AAAA represents the standard handset to be called and the device name is the number of the test handset.
Preferably, the computer controls the sound card to infuse test audio to the microphone via the pyAudio module in Python.
Preferably, in step S13, comparing with the test audio means that the test audio and the recorded audio are mapped with waveform diagrams, and fast fourier transform is performed to obtain a spectrogram, and the spectrogram of the test audio and the spectrogram of the recorded audio are compared.
Preferably, in step S14, the adb-S < device name > shell input keyevent <164> is executed to mute the test handset using the adb tool of Python, the device name being the number of the test handset.
The invention also provides a testing device of the mobile phone audio module, the audio module comprises a coding unit and a decoding unit which are connected by a circuit, wherein the coding unit is connected with a microphone to convert an analog signal received by the microphone into a digital signal, the decoding unit is connected with a loudspeaker to convert the received digital signal into an analog signal, and the device comprises:
the mobile phone communication module is used for enabling the test mobile phone to be communicated with the standard mobile phone on the test server, so that the test mobile phone and the standard mobile phone are in a call state, wherein the test mobile phone is connected with the computer, the standard mobile phone is connected with the test server, the audio module of the standard mobile phone is a standard module, and the audio module of the test mobile phone is tested by the standard mobile phone;
the first test audio frequency transmission module enables a sound card of the computer to transmit first test audio frequency to the microphone of the test mobile phone, the first test audio frequency is transmitted to an encoding unit of the audio frequency module of the test mobile phone through the microphone of the test mobile phone and is compiled into a digital signal, and the digital signal is transmitted to a decoding unit of the audio frequency module of the standard mobile phone to be decoded and converted into an analog signal and played on a loudspeaker of the standard mobile phone;
the first test audio comparison module is used for enabling the sound card of the test server to record the played first test audio from the standard mobile phone loudspeaker to form first recorded audio, then comparing the first recorded audio with the first test audio, and determining that the coding unit of the audio module of the test mobile phone is qualified if the accuracy reaches a set percentage, otherwise, the coding unit is unqualified;
the second test audio frequency transmission module enables the sound card of the test server to transmit second test audio frequency to the standard mobile phone microphone, the second test audio frequency is transmitted to the coding unit of the audio frequency module of the standard mobile phone through the standard mobile phone microphone and is compiled into digital signals, the digital signals are transmitted to the decoding unit of the audio frequency module of the test mobile phone to be decoded and converted into analog signals, and the analog signals are played on the loudspeaker of the test mobile phone;
and the second test audio comparison module enables the sound card of the test server to record second test audio from the loudspeaker of the test mobile phone to form second recorded audio, then the second recorded audio is compared with the second test audio, if the accuracy reaches a set percentage, the code unit of the audio module of the test mobile phone is determined to be qualified, otherwise, the code unit is not qualified, and thus, the test of the audio module of the test mobile phone is completed.
The invention also provides an electronic device, which comprises: the mobile phone audio module testing device comprises a memory and a processor, wherein a testing program of the mobile phone audio module is stored in the memory, and the testing method of the mobile phone audio module is realized when the testing program of the mobile phone audio module is executed by the processor.
Preferably, the test program of the mobile phone audio module when executed by the processor further realizes:
in step S11, a plurality of test mobile phones are simultaneously communicated with a standard mobile phone on a test server, so that each test mobile phone keeps a call state with the standard mobile phone;
in step S12, the sound card of the computer infuses the first test audio to each test mobile phone microphone, and the first test audio of each test mobile phone is converted into a corresponding analog signal after being encoded and decoded, and is played in sequence at the standard mobile phone speaker;
in step S13, the sound card of the test server records each first test audio played in turn from the speaker end of the standard mobile phone to form a plurality of first recorded audio, and performs a comparison test with the first test audio respectively, thereby completing the test of the coding units of the audio modules of the plurality of test mobile phones;
in step S14, the sound card of the test server sequentially infuses a plurality of pieces of second test audio to the microphone of the standard mobile phone according to time sequence, the second test audio is transmitted to the decoding unit of the audio module of each test mobile phone, each test mobile phone sequentially plays the second test audio according to time sequence, wherein when one test mobile phone plays the second test audio, the other test mobile phones are turned into mute state;
in step S15, during the process of playing the second test audio by each test mobile phone, the sound card of the test server records the second test audio from the speaker end of the test mobile phone to form a plurality of second recorded audio, and compares the second recorded audio with the second test audio, thereby completing the test of the decoding units of the audio modules of the plurality of test mobile phones.
The invention also provides a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, implement a method of testing a mobile phone audio module as described above.
The invention can simulate the actual conversation scene more truly, the test effect is more realistic, the pyAudio module is a virtual module, the invention is simple and practical, is not limited by the test time, and realizes the stability and the practicability of the mobile phone audio automatic test scheme.
Drawings
The above-mentioned features and technical advantages of the present invention will become more apparent and readily appreciated from the following description of the embodiments thereof, taken in conjunction with the accompanying drawings.
FIG. 1 is a schematic diagram showing steps of a testing method of an audio module of a mobile phone according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram showing steps of a method for testing an audio module of a mobile phone according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram showing a hardware architecture of an electronic device according to the present invention;
fig. 4 is a flowchart illustrating a test procedure of an audio module of a mobile phone according to an embodiment of the invention.
Detailed Description
Embodiments of a method, an apparatus and a storage medium for testing an audio module of a mobile phone according to the present invention will be described below with reference to the accompanying drawings. Those skilled in the art will recognize that the described embodiments may be modified in various different ways, or combinations thereof, without departing from the spirit and scope of the invention. Accordingly, the drawings and description are to be regarded as illustrative in nature and not as restrictive in scope. Furthermore, in the present specification, the drawings are not drawn to scale, and like reference numerals denote like parts.
First embodiment
The audio module is an audio processing chip arranged in the mobile phone, each mobile phone below corresponds to the audio module, the audio module comprises a coding unit and a decoding unit which are connected through a circuit, wherein the coding unit codes an input analog signal into a digital signal, and the decoding unit converts the received digital signal into an analog signal. Wherein for each handset a microphone and a speaker are included. The encoding unit is connected with the microphone, the decoding unit is connected with the loudspeaker, the encoding unit converts the analog signals received by the microphone into digital signals, and the decoding unit converts the received digital signals into analog signals. The specific test method comprises the following steps:
step S11, the computer controls the test mobile phone to be communicated with the standard mobile phone on the test server through the script through the number, wherein the test mobile phone is connected with the computer, and the standard mobile phone is connected with the test server. And the audio module of the standard mobile phone is a standard module, and the standard mobile phone is utilized to test the audio module of the test mobile phone. The test mobile phone keeps a call state with the standard mobile phone by dialing the number. The script refers to the extension of a batch file and is a combination of a series of operation actions performed by a determined control computer.
In the test stage, a local area network is built, and short messages and the like are transferred and sent through a central service number, namely, a test mobile phone dials the number of a standard mobile phone and is transferred to the standard mobile phone through the central service number, so that the test mobile phone is connected with the standard mobile phone (namely, a call state is kept), and the local area network is a self-built mobile phone communication base station through an ISP (Internet access service) network and is used for simulating the test, so that the network is stable and the call cannot be influenced. Wherein, through the adb tool of Python, adb-s < device name > shell service call AAAA, wherein AAAA represents the standard handset to be called, and the device name is the test handset controlled to dial the number.
In step S12, the computer controls the sound card of the computer to transmit the first test audio to the microphone of the test mobile phone through pyAudio module in Python (an interpreted, object-oriented, dynamic data type of high-level programming language), specifically, the speaker of the computer is directed to the microphone of the test mobile phone, so as to transmit the first test audio to the microphone of the test mobile phone. The first test audio is transmitted to the coding unit of the audio module of the test mobile phone through the test mobile phone microphone and is compiled into digital signals, and the digital signals are transmitted to the decoding unit of the audio module of the standard mobile phone when the test mobile phone microphone is in a call state with the standard mobile phone in the process of being infused with the first test audio, and the digital signals are converted into analog signals after being decoded and are played on the loudspeaker of the standard mobile phone;
and step S13, the computer informs the test server through the script to control the sound card of the test server to record the played first test audio from the standard mobile phone loudspeaker end through the pyAudio module, and then the test server forms the first test audio recorded by the sound card into a first recorded audio, and the first recorded audio is compared with the first test audio. Comparing with the first test audio means that a waveform diagram is drawn on the first test audio and the first recorded audio (such as wav or mp3 file), and FFT (fast fourier transform) processing is performed to obtain a spectrogram, and comparing the spectrogram of the first test audio and the spectrogram of the first recorded audio, if the accuracy rate reaches 90%, the comparison is qualified, which means that the forward test passes, that is, the coding unit of the audio module of the test mobile phone is qualified, otherwise the test fails.
Step S14, the computer informs the test server through the script to control the sound card of the test server to infuse the second test audio to the standard mobile phone microphone through the pyAudio module, the loudspeaker of the test server faces the standard mobile phone microphone, the second test audio is transmitted to the coding unit of the audio module of the standard mobile phone through the standard mobile phone microphone when the second test audio is infused to the standard mobile phone microphone, the digital signal is compiled into a digital signal, the digital signal is transmitted to the decoding unit of the audio module of the test mobile phone, and the digital signal is converted into an analog signal after being decoded and played on the loudspeaker of the test mobile phone;
and S15, the computer controls the sound card of the test server to record second test audio from the speaker end of the test mobile phone through the pyAudio module to form second recorded audio, and the second recorded audio is compared with the second test audio. The method of comparison may be the same as the comparison method in step 13. And if the comparison is qualified, the reverse test is passed, and the decoding unit of the audio module of the test mobile phone is qualified. So far, the audio module test of the test mobile phone is completed.
Preferably, in order to prevent the sound card of the test server from failing to record due to unstable network, the computer can be controlled by the script to continuously send the test audio multiple times until the sound card of the test server records the record audio file and feeds back to the computer signal, and the computer stops sending the test audio. Alternatively, the test server side and the computer side can be controlled by the script to continuously record until sound files, such as files in mp3 and wmv formats, are generated, and the sound files cannot be represented as successful in recording, i.e. can be compared with the original audio.
Second embodiment
Most of the contents of the second embodiment are the same as those of the first embodiment, and the same contents are omitted here.
In step S21, a plurality of test handsets (each handset has a number) may be controlled to simultaneously communicate with a standard handset on the test server, where each test handset is connected to the computer and the standard handset is connected to the test server. And the audio module of the standard mobile phone is a standard module, and the audio module of each test mobile phone is tested by using the standard mobile phone. Each test mobile phone keeps a call state with the standard mobile phone by dialing the number of the standard mobile phone.
In step S22, the computer controls the sound card of the computer to simultaneously infuse the first test audio to each test mobile phone microphone through the pyAudio module, specifically, the speaker of the computer may face the plurality of test mobile phone microphones, so as to simultaneously infuse the first test audio to each test mobile phone microphone. The first test audio is transmitted to the coding unit of the audio module of the test mobile phone through each test mobile phone microphone and is respectively compiled into different digital signals, and in the process of the first test audio being infused into the test mobile phone microphone, as the test mobile phone keeps a call state with the standard mobile phone, each digital signal is transmitted to the decoding unit of the audio module of the standard mobile phone, each digital signal is converted into a corresponding analog signal after being decoded and is played on the loudspeaker of the standard mobile phone, and specifically, each recorded section of the first test audio is played on the loudspeaker of the standard mobile phone in sequence. The buffer area can be arranged on the standard mobile phone to temporarily store the received digital signals, the digital signals firstly enter the buffer area for temporary storage and are decoded by the decoding unit one by one, the standard mobile phone loudspeaker plays, when one playing is completed, one digital signal is taken from the buffer area, the decoding unit decodes the digital signals, and the standard mobile phone loudspeaker plays.
Step S23, the sound card of the test server records each section of the first test audio played from the loudspeaker end of the standard mobile phone, and forms a first recorded audio. Because each section of the first test audio corresponds to the number of the test mobile phone, the test mobile phone corresponding to the first recorded audio formed by recording by the sound card of the test server can be known. And respectively comparing and testing with the original first test audio. Thus, the testing of the coding units of the audio modules of the plurality of test mobile phones is completed.
Step S24, the sound card of the test server sequentially infuses a plurality of pieces of second test audio to the standard mobile phone microphone according to time sequence, and the second test audio is transmitted to the coding unit of the audio module of the standard mobile phone through the standard mobile phone microphone when the standard mobile phone microphone is infused with the second test audio, and is compiled into a digital signal, and the digital signal is transmitted to the decoding unit of the audio module of each test mobile phone. The test mobile phone sequentially plays the second test audio according to the time sequence. For example, three test mobile phones are tested, the sound card of the test server sequentially infuses three sections of second test audio to the microphone of the standard mobile phone in time sequence, and when a first section of second test audio is infused, the first test mobile phone obtains the first section of second test audio and plays the first section of second test audio through a loudspeaker. Although the other two test mobile phones also obtain the first section of the second test audio at the same time, the other two test mobile phones are in a mute state at the moment and cannot cause interference to the sound card of the test server. Wherein the muting of any mobile phone speaker may be implemented with the adb tool of the Python script (Android Debug Bridge, i.e. android debug bridge). Specifically, it may be implemented with the command adb-s < device name > shell input keyevent <164>, where the device name is the number of the corresponding respective test handset, where 164 is the event value. And after the first test mobile phone finishes playing the first section of the second test audio, the first test mobile phone is turned into a mute state. And when the second section of second test audio is infused, the loudspeaker of the second test mobile phone plays the second section of second test audio, and so on.
In step S25, during the process of playing the second test audio by each test mobile phone, the computer controls the sound card of the test server to record the second test audio from the speaker end of the test mobile phone through the pyAudio module, so as to form a second recorded audio, and compares the second recorded audio with the second test audio of the corresponding section. The method of comparison may be the same as the comparison method in step 13. And if the comparison is qualified, the reverse test is passed, and the decoding unit of the audio module of the test mobile phone is qualified. So far, the audio module test of the plurality of test mobile phones is completed.
In addition, S22 and S23 of the second embodiment may also be to sequentially infuse the first test audio to the test mobile phone, so as to sequentially play the first test audio at the standard mobile phone end, thereby obtaining a plurality of first recorded audio, where the test speed is obviously slower.
The present invention also provides an electronic device, and referring to fig. 3, a schematic hardware architecture of an embodiment of the electronic device is provided. In this embodiment, the electronic device 2 is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction. For example, it may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including a stand-alone server or a server cluster composed of a plurality of servers), etc. As shown in fig. 3, the electronic device 2 includes at least, but is not limited to, a memory 21 and a processor 22 that are communicatively connected to each other via a system bus. Wherein: the memory 21 includes at least one type of computer-readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 21 may be an internal storage unit of the electronic device 2, such as a hard disk or a memory of the electronic device 2. In other embodiments, the memory 21 may also be an external storage device of the electronic apparatus 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic apparatus 2. Of course, the memory 21 may also comprise both an internal memory unit of the electronic device 2 and an external memory means thereof. In this embodiment, the memory 21 is generally used for storing an operating system and various application software installed in the electronic device 2, such as test program codes of the mobile phone audio module. Further, the memory 21 may be used to temporarily store various types of data that have been output or are to be output.
The processor 22 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 22 is typically used to control the overall operation of the electronic device 2, such as performing control and processing related to data interaction or communication with the electronic device 2. In this embodiment, the processor 22 is configured to execute the program code or process data stored in the memory 21, for example, execute the test program of the mobile phone audio module.
Optionally, the electronic device 2 may also comprise a display, which may also be referred to as a display screen or display unit. In some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) display, or the like. The display is used for displaying information processed in the electronic device 2 and for displaying a visualized user interface.
It is noted that fig. 3 only shows the electronic device 2 with components 21, 22, but it is understood that not all shown components are required to be implemented, and that more or fewer components may alternatively be implemented.
The memory 21 containing the readable storage medium may include an operating system, a test program 20 for a cell phone audio module, etc. The steps S1 to S4 described above are implemented when the processor 22 executes the test program 20 of the mobile phone audio module in the memory 21, and will not be described herein. In this embodiment, the test program 20 of the mobile phone audio module stored in the memory 21 may be divided into one or more program modules, which are stored in the memory 21 and executed by one or more processors (the processor 22 in this embodiment) to complete the present invention. For example, fig. 4 shows a schematic diagram of a test program module of the mobile phone audio module, and in this embodiment, the test program 20 of the mobile phone audio module may be divided into a mobile phone communication module 201, a first test audio infusion module 202, a first test audio comparison module 203, a second test audio infusion module 204, and a second test audio comparison module 205. The program module according to the present invention refers to a series of computer program instruction segments capable of performing a specific function, which are more suitable than the program to describe the execution of the test program of the mobile phone audio module in the electronic device 2. The specific functions of the program modules are the same as the steps of the testing method of the mobile phone audio module, which are not described in detail herein.
In addition, the invention also provides a testing device of the mobile phone audio module, which comprises:
the mobile phone communication module 201 is used for enabling the test mobile phone to be communicated with the standard mobile phone on the test server, so that the test mobile phone and the standard mobile phone are in a call state, wherein the test mobile phone is connected with the computer, the standard mobile phone is connected with the test server, the audio module of the standard mobile phone is a standard module, and the audio module of the test mobile phone is tested by the standard mobile phone;
the first test audio frequency infusion module 202 is used for enabling the sound card of the computer to infuse first test audio frequency to the microphone of the test mobile phone, the first test audio frequency is transmitted to the coding unit of the audio frequency module of the test mobile phone through the microphone of the test mobile phone and is compiled into a digital signal, and the digital signal is transmitted to the decoding unit of the audio frequency module of the standard mobile phone to be decoded and converted into an analog signal and played on the loudspeaker of the standard mobile phone;
the first test audio comparison module 203 is used for recording the played first test audio from the standard mobile phone loudspeaker by the sound card of the test server to form a first recorded audio, then comparing the first recorded audio with the first test audio, and determining that the coding unit of the audio module of the test mobile phone is qualified if the accuracy reaches a set percentage, otherwise, the coding unit is unqualified;
the second test audio frequency infusion module 204 is used for enabling the sound card of the test server to infuse second test audio frequency to the standard mobile phone microphone, the second test audio frequency is transmitted to the coding unit of the audio frequency module of the standard mobile phone through the standard mobile phone microphone, the second test audio frequency is compiled into a digital signal, and the digital signal is transmitted to the decoding unit of the audio frequency module of the test mobile phone to be decoded and converted into an analog signal and played on the speaker of the test mobile phone;
and the second test audio comparison module 205 is used for enabling the sound card of the test server to record second test audio from the loudspeaker of the test mobile phone to form second recorded audio, then comparing the second recorded audio with the second test audio, and determining that the coding unit of the audio module of the test mobile phone is qualified if the accuracy reaches a set percentage, otherwise, determining that the coding unit is unqualified, and completing the test of the audio module of the test mobile phone.
In addition, the embodiment of the invention also provides a computer readable storage medium, which can be any one or any combination of a plurality of hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory and the like. The computer readable storage medium includes a test program of a mobile phone audio module, and the test program 20 of the mobile phone audio module when executed by the processor 22 performs the following operations:
step S11, enabling the test mobile phone to be communicated with a standard mobile phone on the test server, enabling the test mobile phone to be in a call state with the standard mobile phone, wherein the test mobile phone is connected with a computer, the standard mobile phone is connected with the test server, an audio module of the standard mobile phone is a standard module, and the standard mobile phone is utilized to test the audio module of the test mobile phone;
step S12, the sound card of the computer infuses first test audio to the microphone of the test mobile phone, the first test audio is transmitted to the coding unit of the audio module of the test mobile phone through the microphone of the test mobile phone and is compiled into digital signals, the digital signals are transmitted to the decoding unit of the audio module of the standard mobile phone to be decoded and converted into analog signals, and the analog signals are played on the loudspeaker of the standard mobile phone;
step S13, the sound card of the test server records the played first test audio from the standard mobile phone loudspeaker to form a first recorded audio, then the first recorded audio is compared with the first test audio, if the accuracy reaches a set percentage, the code unit of the audio module of the test mobile phone is determined to be qualified, otherwise, the code unit is determined to be unqualified;
step S14, the sound card of the test server infuses second test audio to the standard mobile phone microphone, the second test audio is transmitted to the coding unit of the audio module of the standard mobile phone through the standard mobile phone microphone, the second test audio is compiled into digital signals, the digital signals are transmitted to the decoding unit of the audio module of the test mobile phone to be decoded and converted into analog signals, and the analog signals are played in the loudspeaker of the test mobile phone;
and S15, enabling the sound card of the test server to record second test audio from the loudspeaker of the test mobile phone to form second recorded audio, comparing the second recorded audio with the second test audio, and determining that the coding unit of the audio module of the test mobile phone is qualified if the accuracy reaches a set percentage, otherwise, determining that the coding unit of the audio module of the test mobile phone is unqualified, and completing the test of the audio module of the test mobile phone.
The embodiment of the computer readable storage medium of the present invention is substantially the same as the above-mentioned method for testing an audio module of a mobile phone and the embodiment of the electronic device 2, and will not be described herein.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. The test method of the mobile phone audio module is applied to an electronic device, the audio module comprises a coding unit and a decoding unit which are connected through a circuit, wherein the coding unit is connected with a microphone and is used for converting an analog signal received by the microphone into a digital signal, the decoding unit is connected with a loudspeaker and is used for converting the received digital signal into the analog signal, and the test method is characterized by comprising the following steps of:
step S11, enabling the test mobile phone to be communicated with a standard mobile phone on the test server, enabling the test mobile phone to be in a call state with the standard mobile phone, wherein the test mobile phone is connected with a computer, the standard mobile phone is connected with the test server, an audio module of the standard mobile phone is a standard module, and the standard mobile phone is utilized to test the audio module of the test mobile phone;
step S12, the sound card of the computer infuses first test audio to the microphone of the test mobile phone, the first test audio is transmitted to the coding unit of the audio module of the test mobile phone through the microphone of the test mobile phone and is compiled into digital signals, the digital signals are transmitted to the decoding unit of the audio module of the standard mobile phone to be decoded and converted into analog signals, and the analog signals are played on the loudspeaker of the standard mobile phone;
step S13, the sound card of the test server records the played first test audio from the standard mobile phone loudspeaker to form a first recorded audio, then the first recorded audio is compared with the first test audio, if the accuracy reaches a set percentage, the code unit of the audio module of the test mobile phone is determined to be qualified, otherwise, the code unit is determined to be unqualified;
step S14, the sound card of the test server infuses second test audio to the standard mobile phone microphone, the second test audio is transmitted to the coding unit of the audio module of the standard mobile phone through the standard mobile phone microphone and is compiled into digital signals, the digital signals are transmitted to the decoding unit of the audio module of the test mobile phone to be decoded and converted into analog signals, and the analog signals are played on the loudspeaker of the test mobile phone;
and S15, enabling the sound card of the test server to record second test audio from the loudspeaker of the test mobile phone to form second recorded audio, comparing the second recorded audio with the second test audio, and determining that the coding unit of the audio module of the test mobile phone is qualified if the accuracy reaches a set percentage, otherwise, determining that the coding unit of the audio module of the test mobile phone is unqualified, and completing the test of the audio module of the test mobile phone.
2. The method for testing an audio module of a mobile phone according to claim 1, wherein,
in step S11, a plurality of test mobile phones are simultaneously communicated with a standard mobile phone on a test server, so that each test mobile phone keeps a call state with the standard mobile phone;
in step S12, the sound card of the computer infuses the first test audio to each test mobile phone microphone, and the first test audio of each test mobile phone is converted into a corresponding analog signal after being encoded and decoded, and is played in sequence at the standard mobile phone speaker;
in step S13, the sound card of the test server records each first test audio played in turn from the speaker end of the standard mobile phone to form a plurality of first recorded audio, and performs a comparison test with the first test audio respectively, thereby completing the test of the coding units of the audio modules of the plurality of test mobile phones;
in step S14, the sound card of the test server sequentially infuses a plurality of pieces of second test audio to the microphone of the standard mobile phone according to time sequence, the second test audio is transmitted to the decoding unit of the audio module of each test mobile phone, each test mobile phone sequentially plays the second test audio according to time sequence, wherein when one test mobile phone plays the second test audio, the other test mobile phones are turned into mute state;
in step S15, during the process of playing the second test audio by each test mobile phone, the sound card of the test server records the second test audio from the speaker end of the test mobile phone to form a plurality of second recorded audio, and compares the second recorded audio with the second test audio, thereby completing the test of the decoding units of the audio modules of the plurality of test mobile phones.
3. The method for testing an audio module of a mobile phone according to claim 1, wherein,
and (3) performing the adb-s < equipment name > shell service call AAAA by an adb tool of Python to realize the communication between the test mobile phone and the standard mobile phone, wherein AAAA represents the standard mobile phone to be called, and the equipment name is the number of the test mobile phone.
4. The method for testing an audio module of a mobile phone according to claim 1, wherein,
the computer controls the sound card to infuse test audio to the microphone through the pyAudio module in Python.
5. The method for testing an audio module of a mobile phone according to claim 1, wherein,
in steps S13 and S15, comparing with the test audio means that the test audio and the recorded audio are drawn into waveform diagrams, fast fourier transform is performed to obtain spectrograms, and the spectrograms of the test audio and the recorded audio are compared.
6. The method for testing an audio module of a mobile phone according to claim 2, wherein,
in step S14, the adb-S < device name > shell input keyevent <164> is executed to mute the test mobile phone by using the adb tool of Python, the device name being the number of the test mobile phone.
7. The utility model provides a testing arrangement of cell-phone audio module, audio module includes the coding unit and the decoding unit of circuit connection, and wherein, coding unit is connected with the microphone, converts the analog signal that the microphone received into digital signal, and decoding unit is connected with the speaker, converts the digital signal that receives into analog signal, and its characterized in that, the device includes:
the mobile phone communication module is used for enabling the test mobile phone to be communicated with the standard mobile phone on the test server, so that the test mobile phone and the standard mobile phone are in a call state, wherein the test mobile phone is connected with the computer, the standard mobile phone is connected with the test server, the audio module of the standard mobile phone is a standard module, and the audio module of the test mobile phone is tested by the standard mobile phone;
the first test audio frequency transmission module enables a sound card of the computer to transmit first test audio frequency to the microphone of the test mobile phone, the first test audio frequency is transmitted to an encoding unit of the audio frequency module of the test mobile phone through the microphone of the test mobile phone and is compiled into a digital signal, and the digital signal is transmitted to a decoding unit of the audio frequency module of the standard mobile phone to be decoded and converted into an analog signal and played on a loudspeaker of the standard mobile phone;
the first test audio comparison module is used for enabling the sound card of the test server to record the played first test audio from the standard mobile phone loudspeaker to form first recorded audio, then comparing the first recorded audio with the first test audio, and determining that the coding unit of the audio module of the test mobile phone is qualified if the accuracy reaches a set percentage, otherwise, the coding unit is unqualified;
the second test audio frequency transmission module enables the sound card of the test server to transmit second test audio frequency to the standard mobile phone microphone, the second test audio frequency is transmitted to the coding unit of the audio frequency module of the standard mobile phone through the standard mobile phone microphone and is compiled into digital signals, the digital signals are transmitted to the decoding unit of the audio frequency module of the test mobile phone to be decoded and converted into analog signals, and the analog signals are played on the loudspeaker of the test mobile phone;
and the second test audio comparison module enables the sound card of the test server to record second test audio from the loudspeaker of the test mobile phone to form second recorded audio, then the second recorded audio is compared with the second test audio, if the accuracy reaches a set percentage, the code unit of the audio module of the test mobile phone is determined to be qualified, otherwise, the code unit is not qualified, and thus, the test of the audio module of the test mobile phone is completed.
8. An electronic device, comprising: the mobile phone audio module testing device comprises a memory and a processor, wherein the memory stores a mobile phone audio module testing program, and the mobile phone audio module testing program is executed by the processor to realize the mobile phone audio module testing method according to any one of claims 1-6.
9. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, implement the method of testing a handset audio module according to any one of claims 1 to 6.
CN202010122945.6A 2020-02-27 2020-02-27 Method and device for testing mobile phone audio module and storage medium Active CN111432060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010122945.6A CN111432060B (en) 2020-02-27 2020-02-27 Method and device for testing mobile phone audio module and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010122945.6A CN111432060B (en) 2020-02-27 2020-02-27 Method and device for testing mobile phone audio module and storage medium

Publications (2)

Publication Number Publication Date
CN111432060A CN111432060A (en) 2020-07-17
CN111432060B true CN111432060B (en) 2023-07-21

Family

ID=71547280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010122945.6A Active CN111432060B (en) 2020-02-27 2020-02-27 Method and device for testing mobile phone audio module and storage medium

Country Status (1)

Country Link
CN (1) CN111432060B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572672A (en) * 2010-12-21 2012-07-11 鸿富锦精密工业(深圳)有限公司 Audio frequency module test system and method
CN103036966A (en) * 2012-12-10 2013-04-10 周玲玲 Mobile terminal remote interaction test system and remote interaction test method
CN103167391A (en) * 2011-12-12 2013-06-19 英业达股份有限公司 Audio test system and audio test method for to-be-tested device
CN104244161A (en) * 2014-09-17 2014-12-24 苏州酷果信息技术有限公司 Method and device for testing equipment with voice playing function and voice recording function
CN109168120A (en) * 2018-11-16 2019-01-08 深圳市爱培科技术股份有限公司 A kind of loudspeaker and microphone test method, intelligent terminal and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572672A (en) * 2010-12-21 2012-07-11 鸿富锦精密工业(深圳)有限公司 Audio frequency module test system and method
CN103167391A (en) * 2011-12-12 2013-06-19 英业达股份有限公司 Audio test system and audio test method for to-be-tested device
CN103036966A (en) * 2012-12-10 2013-04-10 周玲玲 Mobile terminal remote interaction test system and remote interaction test method
CN104244161A (en) * 2014-09-17 2014-12-24 苏州酷果信息技术有限公司 Method and device for testing equipment with voice playing function and voice recording function
CN109168120A (en) * 2018-11-16 2019-01-08 深圳市爱培科技术股份有限公司 A kind of loudspeaker and microphone test method, intelligent terminal and storage medium

Also Published As

Publication number Publication date
CN111432060A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN107516510B (en) Automatic voice testing method and device for intelligent equipment
CN108564966B (en) Voice test method and device with storage function
JP2010078979A (en) Voice recording device, recorded voice retrieval method, and program
CN110337055A (en) Detection method, device, electronic equipment and the storage medium of speaker
CN112463634B (en) Software testing method and device under micro-service architecture
CN110941563B (en) Automatic script testing method and device
CN111078930A (en) Audio file data processing method and device
CN101599285A (en) A kind of audio recording method and system
CN102752704A (en) Sound information processing method and terminal
WO2022110943A1 (en) Speech preview method and apparatus
JP2022187977A (en) Wake-up test method, device, electronic device and readable storage medium
CN101202875A (en) Method and apparatus for generating and playing playback file capable of easily changing player
CN113515255B (en) Audio playing control method, system, electronic equipment and storage medium
US9230529B2 (en) Music reproducing apparatus
CN111432060B (en) Method and device for testing mobile phone audio module and storage medium
CN103037298B (en) Test method of sound socket of portable electronic device
JP7375089B2 (en) Method, device, computer readable storage medium and computer program for determining voice response speed
EP3144934B1 (en) Audio play method and device
CN110278480A (en) TV channel pre-setting method, device, computer equipment and readable storage medium storing program for executing
CN112433697B (en) Resource display method and device, electronic equipment and storage medium
CN113992965A (en) Low-delay transmission method and system
CN104078049B (en) Signal processing apparatus and signal processing method
CN103929544A (en) Method and system for realizing automatic sound recording of pc-side and mobile terminal
CN115022442B (en) Audio fault time positioning method, electronic equipment and storage medium
CN102547824A (en) Network test method and test 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