CN106792414A - The microphone detection method and terminal of a kind of terminal - Google Patents
The microphone detection method and terminal of a kind of terminal Download PDFInfo
- Publication number
- CN106792414A CN106792414A CN201611067074.2A CN201611067074A CN106792414A CN 106792414 A CN106792414 A CN 106792414A CN 201611067074 A CN201611067074 A CN 201611067074A CN 106792414 A CN106792414 A CN 106792414A
- Authority
- CN
- China
- Prior art keywords
- audio data
- microphone
- data buffer
- buffer area
- detection
- 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
- 238000001514 detection method Methods 0.000 title claims abstract description 104
- 239000000872 buffer Substances 0.000 claims abstract description 187
- 238000000034 method Methods 0.000 claims abstract description 30
- 238000012360 testing method Methods 0.000 abstract description 12
- 230000008569 process Effects 0.000 description 8
- 238000007689 inspection Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000005236 sound signal Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 229910000838 Al alloy Inorganic materials 0.000 description 1
- 229910000851 Alloy steel Inorganic materials 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000010959 steel Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
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/004—Monitoring arrangements; Testing arrangements for microphones
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)
- Circuit For Audible Band Transducer (AREA)
Abstract
Embodiments of the invention provide a kind of microphone detection method and terminal of terminal, are related to Product checking field, more long to solve the problems, such as existing microphone detection time.The method includes:It is the voice data of first threshold N by controlling the shared memory space used by microphone acquisition testing, and it is first data buffer zone of Second Threshold M that the voice data that will be collected is stored to memory space, M is less than N;Then the voice data write-in audio output device that will be stored in the first data buffer zone is so that audio output device is played out;The collection and storage to the voice data used by detection are repeated, until microphone has gathered the voice data used by detection.The present invention is applied to microphone detection.
Description
Technical Field
The invention relates to the field of product detection, in particular to a microphone detection method of a terminal and the terminal.
Background
In order to pursue production efficiency, the requirement for the terminal work inspection time is shorter and shorter, and the microphone is one of the basic components on the terminal, and the work inspection time directly influences the work inspection time length of the terminal. In the existing terminal microphone manual testing process, manual testing is usually performed in a mode of recording first and then playing. Specifically, after receiving a manual testing instruction, the terminal firstly controls the microphone to collect a section of sound source, caches all audio data corresponding to the sound source collected by the microphone in a memory of the terminal, then transmits all audio data stored in the memory to a sound output device (such as an earphone, a loudspeaker and the like), completes sound source playing through the sound output device, and compares the signal intensity of the sound source data obtained from the sound output device with a predetermined threshold value through manual testing software or manual testing equipment and the like, thereby determining whether the detected microphone is qualified.
However, in the above-mentioned manual testing method of recording before playing, since it is necessary to wait for the microphone to buffer all data, and the sound output device collects and plays all buffered data, the time for the microphone to record and play the sound source is twice as long as the time for the microphone to collect the sound source, the detection time for completing the microphone by using the method of recording before playing is longer, so that the time for detecting the microphone on the terminal by using the detection method is longer, the manual testing time of the terminal is longer, and the testing efficiency is further reduced.
In order to meet the requirement that the labor detection time of the mobile device is shorter and shorter, how to shorten the detection time of the microphone becomes an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a microphone detection method of a terminal and the terminal, which are used for solving the problem that the existing microphone is long in detection time.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, a method for detecting a microphone of a terminal is provided, where the method is applied to a terminal having a microphone, and a storage space occupied by audio data used for the microphone detection is a first threshold N, where the method includes:
controlling the microphone to collect audio data used for detection and storing the collected audio data into a first data buffer area, wherein the storage space of the first data buffer area is a second threshold value M, and M is smaller than N;
writing the audio data stored in the first data buffer area into sound output equipment so that the sound output equipment can play the audio data;
and repeating the collection and storage of the audio data used for detection until the microphone collects the audio data used for detection.
In a second aspect, a terminal is provided, where the microphone detects that a storage space occupied by audio data used by the microphone is a first threshold N, and the terminal includes: the collection module writes in module and microphone, wherein:
the acquisition module is used for controlling the microphone to acquire the audio data used for detection and storing the acquired audio data into a first data buffer area, wherein the storage space of the first data buffer area is a second threshold value M, and M is smaller than N;
the writing module is used for writing the audio data stored in the first data buffer area into sound output equipment so as to be played by the sound output equipment;
the acquisition module is further used for repeating acquisition and storage of the audio data used for detection until the microphone finishes acquiring the audio data used for detection.
According to the microphone detection method and the terminal of the terminal provided by the embodiment of the invention, the microphone is controlled to collect the audio data with the storage space used for detection as the first threshold value N, the collected audio data is stored in the data buffer area with the storage space as the second threshold value M, then the audio data stored in the data buffer area is written into the sound output equipment so as to be played by the sound output equipment, and the collection and the storage of the audio data used for detection are repeated until the microphone finishes collecting the audio data used for detection. Because the storage space of the data buffer area in the scheme is smaller than the occupied storage space for microphone acquisition and detection, i.e., M is less than N, such that when the microphone continues to store captured audio data in the data buffer, since the data buffer will write the audio data stored in the data buffer to the sound output device when the data buffer is full, therefore, the terminal can realize the labor detection mode of recording and broadcasting simultaneously, compared with the prior art that the audio data occupying the storage space N for detection is completely stored in the memory and then output to the sound output equipment, the time of the microphone for recording and broadcasting the section of sound source is twice of the time of the microphone for collecting the section of sound source, so that the detection time of the microphone is obviously shortened, the working detection time of the terminal can be effectively shortened, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for detecting a microphone of a terminal according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for implementing simultaneous recording and broadcasting by a terminal according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of microphone selection of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The execution main body of the microphone detection method of the terminal provided by the embodiment of the present invention is the terminal for executing the microphone detection method of the terminal, or may be a Central Processing Unit (CPU) in the terminal, or a control unit or a functional module in the terminal. Specifically, the terminal may be a terminal device such as a smart television, a smart phone, a tablet computer, a notebook computer, a super mobile Personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and the like. As can be seen from the schematic structural diagram of the terminal shown in fig. 1, the terminal 1 in the embodiment of the present invention includes: an acquisition module 11, a writing module 12, and at least one microphone 13, wherein: the Microphone 13 (also called Microphone, Microphone or Microphone, english: Microphone) in the terminal is a transducer for converting sound into electronic signals, and is used for collecting audio data, and is an audio collecting device capable of collecting audio signals. The above-mentioned collecting module 11 is used for controlling the microphone 13 to collect the audio data used by the microphone detection, and storing the audio data collected by the microphone 13 in a data buffer, and the above-mentioned writing module 12 is used for writing the audio data collected by the microphone 13 in the data buffer.
It should be noted that the sound output device in the embodiment of the present invention may be a sound output device built in the terminal, or may be a sound output device externally connected to the terminal.
For example, when the sound output device is a sound output device built in a terminal, the sound output device may be a speaker built in the terminal, wherein the speaker is a sound conversion device for converting electric energy into sound; when the sound output device is an external sound output device, the types of the sound output device include, but are not limited to: loudspeaker, power amplifier, bluetooth equipment, USB stereo set, it is specific:
the power amplifier is called power amplifier for short, commonly called loudspeaker, and is the most basic equipment in sound system, and its task is to amplify the weak electric signal from signal source (from sound console in professional sound system) to drive loudspeaker to make sound.
The bluetooth device applies the radio technology supporting short-distance communication (generally within 10 m) of the device to the traditional devices such as digital, multimedia sound boxes or earphones, and the like, without connecting redundant wires.
USB stereo set: the sound of the computer can be emitted from the USB loudspeaker box only by connecting the USB plug of the sound box with the computer.
It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the present invention, unless otherwise specified, "a plurality" means two or more. For example, a plurality of packets refers to two or more packets.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
For the convenience of clearly describing the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", and the like are used to distinguish the same items or similar items with basically the same functions or actions, and those skilled in the art can understand that the words "first", "second", and the like do not limit the quantity and execution order.
Based on the schematic terminal structure shown in fig. 1, an embodiment of the present invention provides a microphone detection method for a terminal, where a storage space occupied by audio data used for microphone detection is a first threshold N, as shown in fig. 2, the method specifically includes the following steps:
101. and controlling the microphone to collect audio data used for detection and storing the collected audio data into the first data buffer area.
The storage space of the first data buffer is a second threshold M, where M is smaller than N.
For example, the audio data may be pure tone or swept tone source samples. The pure tone is a sine wave with a single frequency, for example, the sound emitted by the tuning fork is a pure tone, the tuning fork (english: tuning fork) is a sounder which is in a Y shape and made of steel or aluminum alloy, and different tuning forks can emit pure tones with different frequencies when vibrating due to the difference in the mass, the length and the thickness of the arms of different tuning forks; the frequency sweep refers to a process in which the frequency of the signal changes continuously from high to low or from low to high within a frequency range.
It should be noted that the data buffer in the embodiment of the present invention may be applied by the terminal in advance, or may be applied in real time during the process of collecting audio by the microphone. Illustratively, the terminal will request a data buffer with memory space M for its zone before the microphone collects the audio data used by the detection microphone.
102. And writing the audio data stored in the first data buffer area into the sound output device so as to be played by the sound output device.
Generally, the terminal in the embodiment of the present invention usually performs a reading operation on the audio data stored in the data buffer when the data buffer is full, and writes the read audio data into the sound output device for playing, but in a general case, when the microphone is about to collect the audio data used for detection, the data buffer currently storing the audio data is not full, and at this time, because the data buffer is not full, the terminal cannot read the audio data stored in the data buffer, therefore, the embodiment of the present invention adds a cut-off flag to the audio data when the microphone has collected the audio data used for detection, so that the terminal can perform a data reading operation on the data buffer when the data buffer is not full.
Optionally, step 102 specifically includes the following contents:
102a1, judging whether the audio data stored in the first data buffer area occupies the first data buffer area, if yes, writing the audio data stored in the first data buffer area into the sound output equipment;
or,
102a2, determining whether the audio data stored in the first data buffer area contains the cut-off mark, if yes, writing the audio data stored in the first data buffer area into the sound output device.
The expiration flag is used to identify that the microphone has collected the audio data for detection, i.e., the microphone stops collecting the audio data, and in one example, the expiration flag may be a string of repeated characters.
Illustratively, when the terminal determines that the first data buffer area is full of audio data, the terminal writes the audio data stored in the first data buffer area into the sound output device, and after the terminal completes the operation of writing the audio data into the sound output device, the terminal may empty the audio data in the first data buffer area and continue to store the audio data collected by the microphone and used for detection into the first data buffer area; or, when the terminal determines that the audio data stored in the first data buffer area contains the ending identifier, the ending identifier indicates that the microphone has collected the audio data used for detection, and at this time, the audio data in the first data buffer area can be written into the sound output device to complete the storage process of the audio data no matter whether the audio data stored in the first data buffer area occupies the first data buffer area.
For example, in the software implementation, an AudioRecord may be created on the software level as a recording side (i.e., a recording interface on the software level), an AudioTrack may be created as a playing side (i.e., a playing interface on the software level), and a data buffer of a specified size may be created, where the AudioRecord uses the data buffer as a storage area for audio data. Audio data collected by the microphone is stored in the buffer by a read operation (i.e., a read method), and audio data in the data buffer is written into the audio output device by a write operation (i.e., a write method), and the audio data is collected by the audio output device.
103. And repeating the collection and storage of the audio data used for detection until the microphone collects the audio data used for detection.
Illustratively, since the storage space of the first data buffer is M, and M is smaller than the storage space N occupied by the audio data used by the detection microphone, when the first data buffer is full of audio data, it is necessary to store the audio data collected by the microphone in the first data buffer, and therefore, the audio data stored in the first data buffer is written into the sound output device by the terminal when the first data buffer is full of audio data, and after completing the operation of writing the audio data to the sound output device, emptying the audio data in the first data buffer, and the microphone stores the audio data for detection collected again in the first data buffer area until the terminal judges that the audio data stored in the first data buffer area contains the cut-off identifier, and the first data buffer area finishes storing the audio data for detection.
It should be noted that, the default volume of the system may be used for detecting different microphones, and there is no need to separately set microphone gains for different microphones.
In addition, since it can be determined that the microphone can make a sound by playing the audio data through the sound output device, the reliability of the audio data recorded by the microphone, that is, the quality of the audio data recorded by the microphone cannot be determined, and it cannot be determined whether the microphone is qualified. Therefore, it can be determined by: and acquiring the signal intensity of the audio data played by the sound output equipment, and judging whether the microphone is qualified or not according to the relation between the signal intensity of the audio data and the preset range [ a, b ].
Illustratively, referring to the flow diagram of implementing the simultaneous recording and playing method shown in fig. 3, a microphone collects a played sound source sample, stores collected audio data in a data buffer, writes the audio data in the data buffer into a sound output device after the data buffer is full, and can acquire the audio signal intensity of the audio data when the sound output device plays the audio data, and can detect whether a microphone is qualified or unqualified by using the acquired audio signal intensity, and record the detection result of the microphone. When the microphone finishes the acquisition of the audio data, specifically, after the audio data are played through the sound output equipment, the worker detection equipment detects the analog signal of the audio data played by the sound output equipment and acquires the signal intensity of the audio data. If the signal intensity of the audio data is smaller than a or larger than b, determining that the microphone is unqualified in detection, and having a problem; and if the signal intensity of the audio data belongs to [ a, b ], judging that the microphone is qualified for detection, conforming to the factory requirement, and recording the detection result of the microphone.
Because the storage space of the data buffer area in the scheme is smaller than the occupied storage space for microphone acquisition and detection, i.e., M is less than N, such that when the microphone continues to store captured audio data in the data buffer, since the data buffer will write the audio data stored in the data buffer to the sound output device when the data buffer is full, therefore, the terminal can realize the labor detection mode of recording and broadcasting simultaneously, compared with the prior art that the audio data occupying the storage space N for detection is completely stored in the memory and then output to the sound output equipment, the time of the microphone for recording and broadcasting the section of sound source is twice of the time of the microphone for collecting the section of sound source, so that the detection time of the microphone is obviously shortened, the working detection time of the terminal can be effectively shortened, and the test efficiency is improved.
Optionally, when the terminal in the embodiment of the present invention only applies for a data buffer with a storage space of M, because the terminal only includes a data buffer with a storage space of M, after the terminal writes the audio data stored in the data buffer into the sound output device, if the terminal needs to continuously store the audio data used for detection, which is continuously collected by the microphone, in the data buffer, the terminal needs to empty the audio data in the data buffer, and the empty data buffer occupies the time for the microphone to perform a manual inspection. Meanwhile, when the terminal writes the audio data stored in the data buffer into the sound output device, the microphone still continues to collect the audio data used for detection, and at this time, if the terminal does not empty the data buffer yet, a small portion of the audio data may be lost.
Based on this, the terminal in the embodiment of the present invention applies for at least two data buffers with a storage space of M to solve the above problem.
Illustratively, when the terminal includes at least two data buffers; step 102 may further include the following steps while the audio data stored in the first data buffer is written to the audio output device:
102b, controlling the microphone to continuously collect the audio data used for detection, and storing the collected audio data into a second data buffer area.
The second data buffer is a currently idle data buffer of the at least two data buffers.
Illustratively, when the terminal includes at least two data buffers, the terminal may optionally select one data buffer to store the audio data collected by the microphone, and after the data buffer is full, select a free data buffer from the at least two data buffers, continue to store the audio data collected by the microphone, and repeat the above-mentioned processes of collecting and storing the audio data until the microphone finishes collecting the audio data used for detection.
In addition, since the terminal empties the audio data in the data buffer area after writing the audio data stored in the data buffer area into the sound output device, when the microphone is detected to be unqualified subsequently based on the audio data collected by the microphone, the microphone cannot be used for manual inspection based on the audio data collected before, so that the microphone is required to collect the audio data used for detecting the microphone again, and the manual inspection time of the microphone is further increased.
Based on this, if the storage capacity of the terminal is not considered, in order to solve the above problem, a preferred embodiment is: the terminal can select a data buffer area 1 optionally to store the audio data collected by the microphone, and after the data buffer area is full, the terminal applies for a data buffer area 2 with a storage space of M (certainly, the terminal can also apply for the data buffer area in advance), and continuously stores the audio data collected by the microphone into the data buffer area 2, so that the repeated use of the data buffer area is not considered, and after each data buffer area is full, the terminal can further shorten the time of microphone manual detection and improve the microphone manual detection efficiency by applying or selecting an idle data buffer area to store the audio data collected by the microphone.
Optionally, step 102b specifically includes the following contents:
102c1, judging whether the audio data stored in the second data buffer area occupies the second data buffer area, if yes, writing the audio data stored in the second data buffer area into the sound output equipment;
or,
102c2, determining whether the audio data stored in the second data buffer contains the cut-off mark, if yes, writing the audio data stored in the second data buffer into the sound output device.
For example, when the audio data collected by the microphone can be stored in at least two data buffers with storage space M and the terminal includes at least two data buffers with storage space M, for example, the terminal includes three data buffers with storage space M, such as data buffer 1, data buffer 2, and data buffer 3, first, the audio data collected by the microphone for the first time can be stored in any one of the three data buffers, if the audio data collected by the microphone for the first time is stored in the data buffer 1, after the data buffer 1 is full, the data buffer 1 writes all the stored audio data into the sound output device, and determines whether the remaining data buffer 2 and data buffer 3 are idle data buffers, that is, determines whether the data are stored in the two data buffers, if the data buffer area 2 and the data buffer area 3 are judged to be idle data buffer areas, the audio data acquired by the microphone for the second time can be stored in the data buffer area 2 or the data buffer area 3, the acquisition and the storage of the audio data are repeated until the audio data stored in the data buffer area contains the cut-off identifier, and the audio data containing the cut-off identifier and stored in the data buffer area is written into the sound output equipment.
If the terminal includes at least two microphones, taking a mobile phone as an example, the mobile phone generally includes: the method comprises the steps that a main microphone, an auxiliary microphone, a microphone on an earphone connected with a mobile phone and the like are adopted, when at least two microphones are arranged on a terminal, all the microphones in the terminal cannot be detected simultaneously, and therefore identification information of the microphone (namely a target microphone) needing to be detected is added into a microphone detection instruction, and the terminal is indicated to complete selection of the target microphone. Specifically, when the terminal includes at least two microphones, the controlling the microphones to collect the audio data used for detection in step 101 may include:
and A1, acquiring identification information of the microphone to be detected, and controlling the microphone to be detected to acquire audio data used for detection according to the identification information.
For example, the manual inspection device can send a microphone detection instruction through an application program, where the microphone detection instruction includes identification information of a microphone to be detected, and after the microphone detection instruction is obtained, the identification information of the microphone to be detected is obtained, and according to the identification information, selection of a target microphone is completed, and the selected microphone to be detected is controlled to collect audio data used for detection. For example, as shown in fig. 4, if the terminal is equipped with an android operating system, when the worker test device needs to detect the main microphone on the terminal, the worker test program may perform a parameter setting operation (english: setParameter) through an "interface" (for example, a control panel of the worker test device) provided by a sound management program (english: AudioManager). For example, it may be agreed that when the value of the set related parameter (english: parameter) is 1, it indicates that the main microphone on the terminal needs to be detected; when the set related parameter value is 2, the auxiliary microphone and the like on the terminal need to be detected at present; and so on. And then, selecting a corresponding microphone on the terminal according to the corresponding parameter value by an audio hardware abstraction layer in the android operating system, and preparing for subsequent detection.
An embodiment of the present invention provides a terminal, where a microphone detects that a storage space occupied by audio data used by the microphone is a first threshold N, as shown in fig. 1, the terminal 1 includes: acquisition module 11 and write in module 12 and microphone 13, wherein:
and the acquisition module 11 is used for controlling the microphone 13 to acquire the audio data for detection and storing the acquired audio data into the first data buffer area.
The storage space of the first data buffer is a second threshold M, where M is smaller than N.
A writing module 12, configured to write the audio data stored in the first data buffer into the sound output device so that the sound output device can play the audio data;
the above-mentioned acquisition module 11 is further configured to repeat the acquisition and storage of the audio data used for detection until the microphone 13 finishes acquiring the audio data used for detection.
Optionally, the writing module 12 writes the audio data stored in the first data buffer into the sound output device, and includes:
judging whether the audio data stored in the first data buffer area occupies the first data buffer area, if so, writing the audio data in the first data buffer area into the sound output equipment;
or,
and judging whether the audio data stored in the first data buffer area contains a cut-off identifier or not, and if so, writing the audio data in the first data buffer area into the sound output equipment.
The cutoff mark is used for marking that the microphone has collected the audio data used for detection.
Optionally, the terminal includes at least two data buffers;
the above-mentioned collecting module 11 is also configured to control the microphone 13 to continue collecting the audio data for detection while writing the audio data stored in the first data buffer into the sound output device, and store the collected audio data in the second data buffer.
The second data buffer is a currently idle data buffer of the at least two data buffers.
Optionally, the writing module 12 is further configured to:
judging whether the audio data stored in the second data buffer area occupies the second data buffer area, if so, writing the audio data in the second data buffer area into the sound output equipment;
or,
and judging whether the audio data stored in the second data buffer area contains a cut-off identifier or not, and if so, writing the audio data in the second data buffer area into the sound output equipment.
Optionally, the terminal includes at least two microphones 13, each microphone 13 having an identification information; the acquisition module 11 controls the microphone 13 to acquire audio data for detection, and includes:
and acquiring identification information of the microphone 13 to be detected, and controlling the microphone 13 to be detected to acquire the audio data used for detection according to the identification information.
According to the terminal provided by the embodiment of the invention, the microphone is controlled to collect the audio data with the storage space occupied by the detection being the first threshold value N, the collected audio data is stored in the data buffer area with the storage space being the second threshold value M, then the audio data stored in the data buffer area is written into the sound output equipment so as to be played by the sound output equipment, and then the collection and the storage of the audio data used for the detection are repeated until the microphone finishes collecting the audio data used for the detection. Because the storage space of the data buffer area in the scheme is smaller than the occupied storage space for microphone acquisition and detection, i.e., M is less than N, such that when the microphone continues to store captured audio data in the data buffer, since the data buffer will write the audio data stored in the data buffer to the sound output device when the data buffer is full, therefore, the terminal can realize the labor detection mode of recording and broadcasting simultaneously, compared with the prior art that the audio data occupying the storage space N for detection is completely stored in the memory and then output to the sound output equipment, the time of the microphone for recording and broadcasting the section of sound source is twice of the time of the microphone for collecting the section of sound source, so that the detection time of the microphone is obviously shortened, the working detection time of the terminal can be effectively shortened, and the detection efficiency is improved.
It should be noted that, in a specific implementation process, each step in the method flow shown in fig. 2 may be implemented by a processor in a hardware form executing a computer execution instruction in a software form stored in a memory, and is not described herein again to avoid repetition. The program corresponding to the action executed by the processing unit of the terminal can be stored in the storage unit of the terminal in a software form, so that the processing unit can call and execute the operation corresponding to each unit.
The storage unit in the foregoing may be a memory, and specifically, the memory may include a volatile memory (volatile memory), such as a random-access memory (RAM); a non-volatile memory (non-volatile memory) such as a read-only memory (ROM), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD); combinations of the above categories of memory may also be included.
The processing unit in the terminal provided above may be a processor or may be a collective term for a plurality of processing elements. For example, the processor may be a central processing unit (CPU; other general purpose processors, Digital Signal Processor (DSP), Application Specific Integrated Circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed terminal and method can be implemented in other manners. For example, the above-described terminal embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, terminals or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be physically included alone, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A microphone detection method of a terminal is applied to the terminal with a microphone, the microphone detects that the memory space occupied by audio data is a first threshold value N, and the method comprises the following steps:
controlling the microphone to collect audio data used for detection and storing the collected audio data into a first data buffer area, wherein the storage space of the first data buffer area is a second threshold value M, and M is smaller than N;
writing the audio data stored in the first data buffer area into sound output equipment so that the sound output equipment can play the audio data;
and repeating the collection and storage of the audio data used for detection until the microphone collects the audio data used for detection.
2. The method of claim 1, wherein the terminal comprises at least two data buffers; while writing the audio data stored in the first data buffer to an audio output device, the method further comprises:
controlling the microphone to continuously acquire audio data used for detection, and storing the acquired audio data into a second data buffer area;
wherein the second data buffer is a currently idle data buffer of the at least two data buffers.
3. The method of claim 1 or 2, wherein writing the audio data stored in the first data buffer to an audio output device comprises:
judging whether the audio data stored in the first data buffer area occupies the first data buffer area, if so, writing the audio data stored in the first data buffer area into sound output equipment;
or,
and judging whether the audio data stored in the first data buffer area contains a cut-off identifier, if so, writing the audio data stored in the first data buffer area into sound output equipment, wherein the cut-off identifier is used for identifying that the microphone has collected the audio data used for detection.
4. The method of claim 2, further comprising:
judging whether the audio data stored in the second data buffer area occupies the second data buffer area, if so, writing the audio data stored in the second data buffer area into sound output equipment;
or,
and judging whether the audio data stored in the second data buffer area contains a cut-off identifier, if so, writing the audio data stored in the second data buffer area into sound output equipment, wherein the cut-off identifier is used for identifying that the microphone has collected the audio data used for detection.
5. The method of claim 1, wherein the terminal comprises at least two microphones, each microphone having an identification information; the controlling the microphone to collect audio data for detection includes:
and acquiring identification information of the microphone to be detected, and controlling the microphone to be detected to acquire audio data used for detection according to the identification information.
6. A terminal, wherein the microphone detects that the storage space occupied by audio data used by the microphone is a first threshold N, the terminal comprising: the collection module writes in module and microphone, wherein:
the acquisition module is used for controlling the microphone to acquire the audio data used for detection and storing the acquired audio data into a first data buffer area, wherein the storage space of the first data buffer area is a second threshold value M, and M is smaller than N;
the writing module is used for writing the audio data stored in the first data buffer area into sound output equipment so as to be played by the sound output equipment;
the acquisition module is further used for repeating acquisition and storage of the audio data used for detection until the microphone finishes acquiring the audio data used for detection.
7. The terminal of claim 6, wherein the terminal comprises at least two data buffers;
the acquisition module is used for controlling the microphone to continuously acquire the audio data used for detection while writing the audio data stored in the first data buffer area into the sound output equipment, and storing the acquired audio data into a second data buffer area;
wherein the second data buffer is a currently idle data buffer of the at least two data buffers.
8. The terminal of claim 6 or 7, wherein the writing module writes the audio data stored in the first data buffer to an audio output device, comprising:
judging whether the audio data stored in the first data buffer area occupies the first data buffer area, if so, writing the audio data in the first data buffer area into sound output equipment;
or,
and judging whether the audio data stored in the first data buffer area contains a cut-off identifier, if so, writing the audio data in the first data buffer area into sound output equipment, wherein the cut-off identifier is used for identifying that the microphone has collected the audio data used for detection.
9. The terminal of claim 7, wherein the write module is further configured to:
judging whether the audio data stored in the second data buffer area occupies the second data buffer area, if so, writing the audio data in the second data buffer area into sound output equipment;
or,
and judging whether the audio data stored in the second data buffer area contains a cut-off identifier, if so, writing the audio data in the second data buffer area into sound output equipment, wherein the cut-off identifier is used for identifying that the microphone has collected the audio data used for detection.
10. The terminal of claim 6, wherein the terminal comprises at least two microphones, each microphone having an identification information; the collection module controls the microphone to collect and detect the used audio data, and the method comprises the following steps:
and acquiring identification information of the microphone to be detected, and controlling the microphone to be detected to acquire audio data used for detection according to the identification information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611067074.2A CN106792414A (en) | 2016-11-28 | 2016-11-28 | The microphone detection method and terminal of a kind of terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611067074.2A CN106792414A (en) | 2016-11-28 | 2016-11-28 | The microphone detection method and terminal of a kind of terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106792414A true CN106792414A (en) | 2017-05-31 |
Family
ID=58902216
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611067074.2A Pending CN106792414A (en) | 2016-11-28 | 2016-11-28 | The microphone detection method and terminal of a kind of terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106792414A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107613446A (en) * | 2017-09-27 | 2018-01-19 | 惠州Tcl移动通信有限公司 | A kind of detection method for preventing microphone whistle, mobile terminal and storage medium |
CN112180196A (en) * | 2020-09-30 | 2021-01-05 | 重庆市海普软件产业有限公司 | State detection feedback system and method of intelligent equipment |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101355753A (en) * | 2008-07-10 | 2009-01-28 | 深圳华为通信技术有限公司 | Method for regulating audio signal and mobile terminal |
EP2114091A1 (en) * | 2008-04-28 | 2009-11-04 | Harman Becker Automotive Systems GmbH | Load detection |
CN101729969A (en) * | 2008-10-27 | 2010-06-09 | 纬创资通股份有限公司 | Method and system for testing microphone of electronic device |
CN101848014A (en) * | 2009-03-25 | 2010-09-29 | 深圳富泰宏精密工业有限公司 | System and method for listening in frequency modulation broadcast using Bluetooth device |
CN102098304A (en) * | 2011-01-25 | 2011-06-15 | 北京天纵网联科技有限公司 | Method for simultaneously recording and uploading audio/video of mobile phone |
CN103179496A (en) * | 2011-12-20 | 2013-06-26 | 比亚迪股份有限公司 | Audio test method and system for earphone microphone and receiver of mobile terminal |
CN104104762A (en) * | 2014-07-22 | 2014-10-15 | 南京声准科技有限公司 | Efficient audio test method of communication terminal |
CN104618846A (en) * | 2015-02-12 | 2015-05-13 | 歌尔声学股份有限公司 | Electronic product loudspeaker and microphone testing system and testing method |
CN104685903A (en) * | 2012-10-09 | 2015-06-03 | 皇家飞利浦有限公司 | Method and apparatus for audio interference estimation |
CN105979053A (en) * | 2016-04-18 | 2016-09-28 | 广东欧珀移动通信有限公司 | Method and device for detecting microphone in mobile terminal and mobile terminal |
-
2016
- 2016-11-28 CN CN201611067074.2A patent/CN106792414A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2114091A1 (en) * | 2008-04-28 | 2009-11-04 | Harman Becker Automotive Systems GmbH | Load detection |
CN101355753A (en) * | 2008-07-10 | 2009-01-28 | 深圳华为通信技术有限公司 | Method for regulating audio signal and mobile terminal |
CN101729969A (en) * | 2008-10-27 | 2010-06-09 | 纬创资通股份有限公司 | Method and system for testing microphone of electronic device |
CN101848014A (en) * | 2009-03-25 | 2010-09-29 | 深圳富泰宏精密工业有限公司 | System and method for listening in frequency modulation broadcast using Bluetooth device |
CN102098304A (en) * | 2011-01-25 | 2011-06-15 | 北京天纵网联科技有限公司 | Method for simultaneously recording and uploading audio/video of mobile phone |
CN103179496A (en) * | 2011-12-20 | 2013-06-26 | 比亚迪股份有限公司 | Audio test method and system for earphone microphone and receiver of mobile terminal |
CN104685903A (en) * | 2012-10-09 | 2015-06-03 | 皇家飞利浦有限公司 | Method and apparatus for audio interference estimation |
CN104104762A (en) * | 2014-07-22 | 2014-10-15 | 南京声准科技有限公司 | Efficient audio test method of communication terminal |
CN104618846A (en) * | 2015-02-12 | 2015-05-13 | 歌尔声学股份有限公司 | Electronic product loudspeaker and microphone testing system and testing method |
CN105979053A (en) * | 2016-04-18 | 2016-09-28 | 广东欧珀移动通信有限公司 | Method and device for detecting microphone in mobile terminal and mobile terminal |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107613446A (en) * | 2017-09-27 | 2018-01-19 | 惠州Tcl移动通信有限公司 | A kind of detection method for preventing microphone whistle, mobile terminal and storage medium |
CN112180196A (en) * | 2020-09-30 | 2021-01-05 | 重庆市海普软件产业有限公司 | State detection feedback system and method of intelligent equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10785541B2 (en) | Screencast recording method, screencast playing method, screen recording terminal, and playing terminal | |
US10522164B2 (en) | Method and device for improving audio processing performance | |
CN109547910B (en) | Electronic equipment acoustic assembly performance testing method, device, equipment and storage medium | |
CN108702568B (en) | Method and equipment for testing time delay of audio loop | |
US11587560B2 (en) | Voice interaction method, device, apparatus and server | |
CN110519680B (en) | Audio device testing method and device | |
CN106126159A (en) | A kind of audio stream processing method and mobile terminal | |
EP2571288B1 (en) | Mobile device for multi-channel sound collection and output using common connector, and driving method thereof | |
CN113259832B (en) | Microphone array detection method and device, electronic equipment and storage medium | |
US20200243085A1 (en) | Voice Processing Method, Apparatus and Device | |
CN110191221A (en) | Audio-frequency processing method, circuit and terminal | |
CN111866690A (en) | Microphone testing method and device | |
CN105304140B (en) | The test method and device of the memory performance of electronic equipment | |
CN106792414A (en) | The microphone detection method and terminal of a kind of terminal | |
CN112822623B (en) | Wireless earphone abnormity detection method and structure | |
WO2024099359A1 (en) | Voice detection method and apparatus, electronic device and storage medium | |
CN104064212A (en) | Sound recording method and device | |
CN108829730A (en) | The method, apparatus and its readable storage medium storing program for executing that a kind of pair of daily record data is stored | |
CN113031871A (en) | Data adding and aggregating method and device, electronic equipment and readable storage medium | |
TW202217746A (en) | Defect-detecting device and defect-detecting method for an audio device | |
US8428424B2 (en) | Apparatus and method for testing signal channels of digital video recorder | |
CN110087168B (en) | Audio reverberation processing method, device, equipment and storage medium | |
CN205336536U (en) | Measurement device for short -wave radio set speaker | |
CN103454579B (en) | A kind of method of testing of chip digital interface and system | |
CN105893203A (en) | CEC verification method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170531 |
|
RJ01 | Rejection of invention patent application after publication |