CN109040912B - Plugging hole treatment method and related product - Google Patents

Plugging hole treatment method and related product Download PDF

Info

Publication number
CN109040912B
CN109040912B CN201810815120.5A CN201810815120A CN109040912B CN 109040912 B CN109040912 B CN 109040912B CN 201810815120 A CN201810815120 A CN 201810815120A CN 109040912 B CN109040912 B CN 109040912B
Authority
CN
China
Prior art keywords
audio
microphone
volume
acquire
segment
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
CN201810815120.5A
Other languages
Chinese (zh)
Other versions
CN109040912A (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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201810815120.5A priority Critical patent/CN109040912B/en
Publication of CN109040912A publication Critical patent/CN109040912A/en
Application granted granted Critical
Publication of CN109040912B publication Critical patent/CN109040912B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • H04R3/12Circuits for transducers, loudspeakers or microphones for distributing signals to two or more loudspeakers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2430/00Signal processing covered by H04R, not provided for in its groups

Abstract

The embodiment of the application discloses a hole plugging processing method and a related product, comprising the following steps: when an acquisition instruction for a first audio is detected, starting the main microphone to acquire the first audio, wherein the first audio comprises a first segment, and the first segment corresponds to the first audio in a preset time period; determining that the main microphone is in a hole blocking state according to the first audio; and switching to the auxiliary microphone to acquire second audio. The embodiment of the application is favorable for improving the timeliness of hole plugging processing and the integrity of audio data acquisition.

Description

Plugging hole treatment method and related product
Technical Field
The application relates to the technical field of electronic equipment, in particular to a hole plugging processing method and a related product.
Background
With the great popularity and rapid development of electronic devices (e.g., smart phones), more and more applications are installed in the electronic devices of users, such as video-type applications, game-type applications, music-type applications, etc., wherein a great number of applications may require voice data to be entered through a microphone during the use of the users.
At present, people often find that a microphone is blocked, for example, a finger, dust, water drops, etc., which causes the voice data acquired by the microphone of the electronic device to have intermittent sound and low volume, and affects the normal use of the user.
Disclosure of Invention
The embodiment of the application provides a hole plugging processing method and a related product, which can improve the timeliness of hole plugging processing and the integrity of audio data acquisition.
In a first aspect, an embodiment of the present application provides a hole plugging processing method, which is applied to an electronic device, where the electronic device includes a primary microphone and a secondary microphone, and the method includes:
when an acquisition instruction for a first audio is detected, starting the main microphone to acquire the first audio, wherein the first audio comprises a first segment, and the first segment corresponds to the first audio in a preset time period;
determining that the main microphone is in a hole blocking state according to the first audio;
and switching to the auxiliary microphone to acquire second audio.
In a second aspect, an embodiment of the present application provides a hole plugging processing apparatus, which is applied to an electronic device, where the electronic device includes a primary microphone and a secondary microphone, and the hole plugging processing apparatus includes an obtaining unit, a determining unit, and a processing unit, where:
the acquiring unit is used for starting the main microphone to acquire a first audio when an acquiring instruction for the first audio is detected, wherein the first audio comprises a first segment, and the first segment corresponds to the first audio in a preset time period;
the determining unit is used for determining that the main microphone is in a hole blocking state according to the first audio;
and the processing unit is used for switching to the auxiliary microphone to acquire a second audio.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, memory, and one or more programs; the one or more programs are stored in the above memory and configured to be executed by the processor, the programs including instructions for performing the steps described in any of the methods of the first aspect of the embodiments of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, the computer program specifically includes instructions for executing some or all of the steps described in any one of the methods according to the first aspect of the present application, and the computer includes an electronic device.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps as described in any one of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package, the computer comprising an electronic device.
It can be seen that, in this embodiment of the application, when an acquisition instruction for a first audio is detected, an electronic device starts a main microphone to acquire the first audio, where the first audio includes a first segment, and the first segment corresponds to the first audio in a preset time period, then, it is determined that the main microphone is in a hole blocking state according to the first audio, and finally, the main microphone is switched to the auxiliary microphone to acquire a second audio. It is thus clear that electronic equipment acquires the first section in the time slot of predetermineeing earlier when acquireing first audio frequency and detects, but not detect again after having acquireed whole audio frequencies, be favorable to promoting the promptness that the stifled hole detected, avoid losing audio data, and, when detecting that main microphone is in the stifled hole state, in time switch to vice microphone and acquire the second audio frequency, be favorable to promoting the integrality that audio data acquireed, avoided the problem of the serious disappearance of data because of the stifled hole leads to.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for processing a plugged hole according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of another method for plugging a hole disclosed in the embodiments of the present application;
FIG. 3 is a schematic flow chart of another method for plugging a hole disclosed in the embodiments of the present application;
fig. 4 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application;
fig. 5 is a block diagram of functional units of a hole plugging processing apparatus disclosed in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a smart phone disclosed in an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic device according to the embodiment of the present application may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, which have wireless communication functions, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and the like. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices. The following describes embodiments of the present application in detail.
Referring to fig. 1, fig. 1 is a schematic flow chart of a hole plugging processing method provided in an embodiment of the present application, and is applied to an electronic device including a primary microphone and a secondary microphone, where as shown in the figure, the hole plugging processing method includes:
s101, when detecting an acquisition instruction for a first audio, the electronic device starts the main microphone to acquire the first audio, wherein the first audio comprises a first segment, and the first segment corresponds to the first audio in a preset time period;
the first audio is audio data to be recorded by the electronic device, and the first audio may be audio data that needs to be recorded and sent to an opposite terminal through a microphone when the user uses a voice or video chat application, or audio data that needs to be recorded when the user communicates with a teammate during the use of a game application, which is not limited herein.
The obtaining instruction may be an instruction for operating the electronic device when the user needs the microphone to record the audio data, where the instruction may be a double-click or a long-press on a designated area of the touch screen, or may be an instruction triggered after a call button is clicked, and the instruction is not limited herein.
And when the main microphone is started to acquire the first audio, the electronic equipment can start the auxiliary microphone for standby at the same time.
The minimum duration of the preset time period is the duration of the audio frequency required by the electronic device to detect the hole blocking state through the audio frequency, and may be, for example, 5ms, 10ms, and the like, which is not limited herein, and the duration of the first segment may be the entire preset time period or may be shorter than the preset time period, which is not limited herein.
S102, the electronic equipment determines that the main microphone is in a hole blocking state according to the first audio;
the hole blocking state may be a finger hole blocking state, a dust hole blocking state, or the like, and is not limited herein, wherein the specific implementation manner of determining that the main microphone is in the hole blocking state according to the first audio frequency may be various, for example, the main microphone is determined to be in the hole blocking state according to a relationship between a volume parameter of the first audio frequency and a preset volume parameter, or the main microphone is determined to be in the hole blocking state according to a relationship between an energy parameter of the first audio frequency and a preset energy threshold, or the like.
S103, the electronic equipment is switched to the auxiliary microphone to acquire a second audio.
The second audio is the audio to be recorded by the user after the main microphone is detected to be in the hole blocking state, and the triggering condition for the electronic equipment to switch the auxiliary microphone to acquire the second audio is that the main microphone is detected to be in the hole blocking state.
It can be seen that, in this embodiment of the application, when an acquisition instruction for a first audio is detected, an electronic device starts a main microphone to acquire the first audio, where the first audio includes a first segment, and the first segment corresponds to the first audio in a preset time period, then, it is determined that the main microphone is in a hole blocking state according to the first audio, and finally, the main microphone is switched to the auxiliary microphone to acquire a second audio. It is thus clear that electronic equipment acquires the first section in the time slot of predetermineeing earlier when acquireing first audio frequency and detects, but not detect again after having acquireed whole audio frequencies, be favorable to promoting the promptness that the stifled hole detected, avoid losing audio data, and, when detecting that main microphone is in the stifled hole state, in time switch to vice microphone and acquire the second audio frequency, be favorable to promoting the integrality that audio data acquireed, avoided the problem of the serious disappearance of data because of the stifled hole leads to.
In one possible example, after the switching to the secondary microphone to acquire the second audio, the method further comprises:
connecting the first audio and the second audio as target audio;
and transmitting the target audio.
For example, a user a presses a voice recording button for a long time to send a voice message to a user B, the electronic device immediately switches to the auxiliary microphone to acquire a second audio that the user a has not finished speaking after the first audio after detecting a hole blocking state of the main microphone at the first audio within a preset time period of the user a, and after the long-time pressing operation is finished, the first audio and the second audio are used as a voice message, that is, a target audio to be sent to the user B.
It can be seen that, in this example, after detecting that the main microphone is plugged, the electronic device switches to the auxiliary microphone to acquire the second audio, and then sends the first audio and the second audio as one audio to the opposite end, so that in a state where the user does not sense, switching of the microphones is realized, and the intelligence of data processing after plugging is favorably improved.
In one possible example, after the determining that the primary microphone is in the plugged-hole state from the first audio, the method further comprises:
transmitting the first audio;
after the switching to the secondary microphone to acquire the second audio, the method further comprises:
and transmitting the second audio.
For example, a user a presses a voice recording button for a long time to send a voice message to a user B, after detecting a hole blocking state of a main microphone by a first audio frequency in a preset time period of the user a, the electronic device first sends the first audio frequency as a voice message to the user B, then switches to an auxiliary microphone to acquire a second audio frequency of the user a, and then sends the second audio frequency as a voice message to the user B, wherein the second audio frequency may include the first audio frequency which is re-recorded and audio frequencies other than the first audio frequency which is not yet recorded when the user a sees that the first audio frequency is automatically sent when the user a does not press the hole for a long time, and the electronic device sends the second audio frequency when the user a presses the hole for a long time.
It can be seen that, in this example, when detecting that the main microphone is in the hole plugging state, the electronic device sends out the first audio in real time for prompting the hole plugging state of the main microphone, and the user can record the audio again according to the prompt, at this moment, the secondary microphone acquires the second audio, and the second audio sent to the opposite end by the electronic device is the audio with complete data, so that the integrity of data transmission is improved.
In one possible example, the determining that the primary microphone is in a plugged-hole state from the first audio includes:
determining the data volume of the first audio with the volume smaller than a first preset volume threshold;
when the proportion of the data volume in the first audio is detected to be larger than a preset proportion threshold value, determining that the main microphone is in the hole blocking state.
When it is detected that the ratio of the data volume in the first segment of audio is greater than a preset ratio threshold, it indicates that the audio is interrupted due to hole blockage of the main microphone, so as to determine that the main microphone is in a hole blockage state, where the preset ratio threshold may be 50%, 60%, or the like, which is not limited herein.
It can be seen that, in this example, the electronic device determines the hole plugging state according to the proportion of the volume of the first audio in the first audio, where the volume of the first audio is smaller than the first preset volume threshold, and if the hole plugging state is determined according to the volume of the first audio, the hole plugging detection may be inaccurate, so that the hole plugging state is determined according to the proportion, which is beneficial to improving the accuracy of the hole plugging detection.
In one possible example, the determining that the primary microphone is in a plugged-hole state from the first audio includes:
determining a first volume parameter for the first segment;
when the first volume parameter is detected to be smaller than a second preset volume threshold value, a second segment is obtained through the main microphone, and the second segment corresponds to the first audio which is continuous with the first segment in the preset time period;
and when detecting that the second volume parameter of the second segment is smaller than the second preset volume threshold, determining that the main microphone is in the hole blocking state.
The first volume parameter may be an average value of volumes of the first segment, or a minimum volume value or a maximum volume value, which is not limited herein, and the second volume parameter is a volume value of the second segment, which is the same as the first volume parameter, and may be determined by a decibel meter, that is, the volume parameter is determined by detecting the volume of the audio by the decibel meter when the first segment or the second segment is obtained.
Wherein the preset volume threshold includes a first preset volume threshold and a second preset volume threshold, where the first preset volume threshold and the second preset volume threshold may be the same or different, the preset volume threshold may be a fixed value, which may be an empirical value, and may be preset in the electronic device before the electronic device leaves the factory for a technical developer, or may be a dynamic value, which may change according to different environments or according to different users, and the like, where the different environments cause different interferences of environmental sounds, and further determine different preset volume thresholds, and the users are different, so that the speaking volume of each user is different in size, and further determine different preset volume thresholds, which may be the user maximum volume determined according to historical user volume acquisition records, or the user average volume, and the like, and are not limited herein.
It can be seen that, in this example, when detecting that the first volume parameter of the first segment is smaller than the second preset volume threshold, the electronic device acquires the second segment, and when the second volume parameter of the second segment is also smaller than the second preset volume threshold, it is determined that the main microphone is in the hole blocking state, and through double determination, the accuracy of hole blocking detection is favorably improved.
In this possible example, before the detecting that the first volume parameter is less than a second preset volume threshold, the method further comprises:
determining a currently running application program;
determining a first distance parameter between the electronic equipment and a human face according to the application program;
and determining the second preset volume threshold corresponding to the first distance parameter.
The specific implementation manner of determining the first distance parameter between the electronic device and the face according to the application program may be that a mapping relationship between the application program and the distance parameter is preset, and the first distance parameter is determined according to the application program, or may be that the first distance parameter when the user uses different application programs is determined according to a history record, where the first distance parameter is an average distance or a maximum distance between the face and the electronic device, which is obtained by the electronic device when the application program is used in the history, and is not limited herein.
For example, when the user plays a game and calls on a telephone, the first distance parameter between the electronic device and the human face is different, that is, the distance parameter between the population and the microphone is different, so that different second preset volume thresholds are set.
The different first distance parameters correspond to different second preset volume thresholds, and the larger the first distance parameter is, the smaller the second preset volume threshold is.
Therefore, in the example, the electronic device determines the first distance parameter between the face and the electronic device according to the application program currently running by the user, so that the intelligence of the electronic device is improved, and different second preset volume thresholds are determined according to different first distance parameters, so that the accuracy of hole blockage detection is improved.
In one possible example, before the detecting that the first volume parameter is less than a second preset volume threshold, the method further comprises:
when the electronic equipment is detected to be in a state that a loudspeaker plays audio, detecting a second distance parameter between a user and the electronic equipment;
and determining the second preset volume threshold according to the second distance parameter.
The condition that the audio is played through the loudspeaker opened by the user in the process or the condition that the audio is played through the loudspeaker opened in the process of video chatting by the user can be considered, wherein the user is often in a motion state and the electronic equipment is in a static state in the process of playing the audio through the loudspeaker, and in the process, the distance between the user and the electronic equipment is possibly farther and farther to influence hole blockage detection.
The specific implementation manner of detecting the second distance parameter between the user and the electronic device may be determined through interaction between the electronic device and a wearable device (e.g., a bracelet, a smart watch, and the like) worn by the user, for example, the second distance parameter may be determined according to a duration and a transmission speed of signaling interaction through signaling interaction between the electronic device and the wearable device, or the second distance parameter may be determined according to motion information of the user, which is acquired by the wearable device, without limitation herein.
As can be seen, in this example, when the electronic device detects that the speaker plays an audio scene, the second preset volume threshold is determined according to the second distance parameter between the user and the electronic device, and the habit of the user in the scene is associated, so that the accuracy of hole blockage detection is further improved.
Referring to fig. 2, fig. 2 is a schematic flowchart of another hole plugging processing method provided in the embodiment of the present application, and the method is applied to an electronic device, where the electronic device includes a primary microphone and a secondary microphone, and as shown in the figure, the method includes:
s201, when detecting an acquisition instruction for a first audio, the electronic device starts the main microphone to acquire the first audio, wherein the first audio comprises a first segment, and the first segment corresponds to the first audio in a preset time period.
S202, the electronic equipment determines the data volume of the first audio with the volume smaller than a first preset volume threshold.
S203, when the electronic equipment detects that the proportion of the data volume in the first audio is larger than a preset proportion threshold value, the electronic equipment determines that the main microphone is in a hole blocking state.
S204, the electronic equipment sends the first audio.
S205, the electronic device switches to the auxiliary microphone to acquire a second audio.
S206, the electronic equipment sends the second audio.
It can be seen that, in this embodiment of the application, when an acquisition instruction for a first audio is detected, an electronic device starts a main microphone to acquire the first audio, where the first audio includes a first segment, and the first segment corresponds to the first audio in a preset time period, then, it is determined that the main microphone is in a hole blocking state according to the first audio, and finally, the main microphone is switched to the auxiliary microphone to acquire a second audio. It is thus clear that electronic equipment acquires the first section in the time slot of predetermineeing earlier when acquireing first audio frequency and detects, but not detect again after having acquireed whole audio frequencies, be favorable to promoting the promptness that the stifled hole detected, avoid losing audio data, and, when detecting that main microphone is in the stifled hole state, in time switch to vice microphone and acquire the second audio frequency, be favorable to promoting the integrality that audio data acquireed, avoided the problem of the serious disappearance of data because of the stifled hole leads to.
In addition, when detecting that the main microphone is in the hole blocking state, the electronic equipment immediately sends out the first audio for prompting the hole blocking state of the main microphone, the user can record the audio again according to the prompt, at the moment, the auxiliary microphone acquires the second audio, and the second audio sent to the opposite end by the electronic equipment is the audio with complete data, so that the integrity of data transmission is improved.
In addition, the electronic device determines the hole plugging state according to the proportion of the volume of the first audio in the first audio to the volume of the first audio, wherein the volume of the first audio is smaller than the first preset volume threshold, and the hole plugging detection is inaccurate due to the fact that the total data volume of the first audio is uncertain, and if the hole plugging state is determined according to the volume of the first audio, the hole plugging state is determined according to the proportion, so that the accuracy of the hole plugging detection is improved.
Referring to fig. 3, fig. 3 is a schematic flowchart of another hole plugging processing method provided in the embodiment of the present application, and the method is applied to an electronic device, where the electronic device includes a primary microphone and a secondary microphone, and as shown in the figure, the method includes:
s301, when detecting an acquisition instruction for a first audio, the electronic device starts the main microphone to acquire the first audio, wherein the first audio includes a first segment, and the first segment corresponds to the first audio in a preset time period.
S302, the electronic equipment determines a first volume parameter of the first segment.
S303, when the electronic equipment detects that the electronic equipment plays audio through a loudspeaker, detecting a second distance parameter between a user and the electronic equipment.
S304, the electronic equipment determines a second preset volume threshold according to the second distance parameter.
S305, when the electronic device detects that the first volume parameter is smaller than a second preset volume threshold value, a second segment is obtained through the main microphone, and the second segment corresponds to the first audio which is continuous with the first segment within the preset time period.
S306, when the electronic device detects that the second volume parameter of the second segment is smaller than the second preset volume threshold value, it is determined that the main microphone is in a hole blocking state.
S307, the electronic equipment is switched to the auxiliary microphone to acquire a second audio.
S308, the electronic equipment connects the first audio and the second audio to be target audio.
S309, the electronic equipment sends the target audio.
It can be seen that, in this embodiment of the application, when an acquisition instruction for a first audio is detected, an electronic device starts a main microphone to acquire the first audio, where the first audio includes a first segment, and the first segment corresponds to the first audio in a preset time period, then, it is determined that the main microphone is in a hole blocking state according to the first audio, and finally, the main microphone is switched to the auxiliary microphone to acquire a second audio. It is thus clear that electronic equipment acquires the first section in the time slot of predetermineeing earlier when acquireing first audio frequency and detects, but not detect again after having acquireed whole audio frequencies, be favorable to promoting the promptness that the stifled hole detected, avoid losing audio data, and, when detecting that main microphone is in the stifled hole state, in time switch to vice microphone and acquire the second audio frequency, be favorable to promoting the integrality that audio data acquireed, avoided the problem of the serious disappearance of data because of the stifled hole leads to.
In addition, after the electronic equipment detects that the main microphone is plugged, the electronic equipment is switched to the auxiliary microphone to acquire a second audio, then the first audio and the second audio are sent to an opposite end as an audio, and under the condition that a user does not sense, the switching of the microphones is realized, so that the intelligence of data processing after plugging is promoted.
In addition, when the electronic device detects that the first volume parameter of the first segment is smaller than the second preset volume threshold, the second segment is obtained, and when the second volume parameter of the second segment is also smaller than the second preset volume threshold, the main microphone is determined to be in the hole blocking state.
In addition, when the electronic equipment detects that the loudspeaker plays an audio scene, a second preset volume threshold value is determined through a second distance parameter between the user and the electronic equipment, habits of the user in the scene are correlated, and accuracy of hole blockage detection is further improved.
In accordance with the embodiments shown in fig. 1, fig. 2, and fig. 3, please refer to fig. 4, and fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, where as shown, the electronic device includes a primary microphone and a secondary microphone, the electronic device includes a processor 401, a memory 402, a communication interface 403, and one or more programs 404, where the one or more programs 404 are stored in the memory 402 and configured to be executed by the processor 401, and the program 404 includes instructions for performing the following steps;
when an acquisition instruction for a first audio is detected, starting the main microphone to acquire the first audio, wherein the first audio comprises a first segment, and the first segment corresponds to the first audio in a preset time period;
determining that the main microphone is in a hole blocking state according to the first audio;
and switching to the auxiliary microphone to acquire second audio.
It can be seen that, in this embodiment of the application, when an acquisition instruction for a first audio is detected, an electronic device starts a main microphone to acquire the first audio, where the first audio includes a first segment, and the first segment corresponds to the first audio in a preset time period, then, it is determined that the main microphone is in a hole blocking state according to the first audio, and finally, the main microphone is switched to the auxiliary microphone to acquire a second audio. It is thus clear that electronic equipment acquires the first section in the time slot of predetermineeing earlier when acquireing first audio frequency and detects, but not detect again after having acquireed whole audio frequencies, be favorable to promoting the promptness that the stifled hole detected, avoid losing audio data, and, when detecting that main microphone is in the stifled hole state, in time switch to vice microphone and acquire the second audio frequency, be favorable to promoting the integrality that audio data acquireed, avoided the problem of the serious disappearance of data because of the stifled hole leads to.
In one possible example, the program 404 further includes instructions for performing the following steps: after the switching to the secondary microphone to acquire a second audio, connecting the first audio and the second audio as a target audio; and for transmitting the target audio.
In one possible example, the program 404 further includes instructions for performing the following steps: sending the first audio after the primary microphone is determined to be in a plugged-hole state according to the first audio;
the program 404 further includes instructions for performing the steps of: transmitting a second audio after the switching to the secondary microphone to acquire the second audio.
In one possible example, in connection with the determining that the primary microphone is in a plugged-hole state from the first audio, the instructions in the program are specifically to: determining the data volume of the first audio with the volume smaller than a first preset volume threshold; and the main microphone is determined to be in the hole blocking state when the proportion of the data volume in the first audio is detected to be larger than a preset proportion threshold value.
In one possible example, in connection with the determining that the primary microphone is in a plugged-hole state from the first audio, the instructions in the program are specifically to: determining a first volume parameter for the first segment; and when the first volume parameter is detected to be smaller than a second preset volume threshold value, acquiring a second segment through the main microphone, wherein the second segment corresponds to the first audio which is continuous with the first segment within the preset time period; and the main microphone is determined to be in the hole blocking state when the second volume parameter of the second segment is detected to be smaller than the second preset volume threshold.
In this possible example, the program further includes instructions for performing the steps of: determining a currently running application program before the first volume parameter is detected to be smaller than a second preset volume threshold; the first distance parameter of the electronic equipment and the human face is determined according to the application program; and the second preset volume threshold corresponding to the first distance parameter is determined.
In one possible example, the program further includes instructions for performing the steps of: before the first volume parameter is detected to be smaller than a second preset volume threshold value, when the electronic equipment is detected to be in a state that a loudspeaker plays audio, detecting a second distance parameter between a user and the electronic equipment; and the second preset volume threshold is determined according to the second distance parameter.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 5 is a block diagram of functional units of a plugged hole processing device 500 according to an embodiment of the present application. The hole plugging processing apparatus 500 is applied to an electronic device including a primary microphone and a secondary microphone, the hole plugging processing apparatus 500 includes an acquisition unit 501, a determination unit 502, and a processing unit 503, wherein,
the acquiring unit 501 is configured to, when an acquiring instruction for a first audio is detected, start the main microphone to acquire the first audio, where the first audio includes a first segment, and the first segment corresponds to the first audio within a preset time period;
the determining unit 502 is configured to determine that the main microphone is in a hole plugging state according to the first audio;
the processing unit 503 is configured to switch to the secondary microphone to acquire the second audio.
It can be seen that, in this embodiment of the application, when an acquisition instruction for a first audio is detected, an electronic device starts a main microphone to acquire the first audio, where the first audio includes a first segment, and the first segment corresponds to the first audio in a preset time period, then, it is determined that the main microphone is in a hole blocking state according to the first audio, and finally, the main microphone is switched to the auxiliary microphone to acquire a second audio. It is thus clear that electronic equipment acquires the first section in the time slot of predetermineeing earlier when acquireing first audio frequency and detects, but not detect again after having acquireed whole audio frequencies, be favorable to promoting the promptness that the stifled hole detected, avoid losing audio data, and, when detecting that main microphone is in the stifled hole state, in time switch to vice microphone and acquire the second audio frequency, be favorable to promoting the integrality that audio data acquireed, avoided the problem of the serious disappearance of data because of the stifled hole leads to.
In one possible example, the hole plugging processing device 500 further comprises a transmitting unit, wherein:
the processing unit 503, after switching to acquiring the second audio for the secondary microphone, is further configured to: connecting the first audio and the second audio as target audio;
the sending unit is used for sending the target audio.
In one possible example, the hole blockage processing apparatus 500 further includes a sending unit, configured to send the first audio after the determining that the primary microphone is in the hole blockage state according to the first audio;
the sending unit is further configured to, after the switching to the secondary microphone to acquire the second audio: and transmitting the second audio.
In one possible example, in terms of the determining that the primary microphone is in a plugged-hole state according to the first audio, the determining unit 502 is specifically configured to: determining the data volume of the first audio with the volume smaller than a first preset volume threshold; and the main microphone is determined to be in the hole blocking state when the proportion of the data volume in the first audio is detected to be larger than a preset proportion threshold value.
In one possible example, in terms of the determining that the primary microphone is in a plugged-hole state according to the first audio, the determining unit 502 is specifically configured to: determining a first volume parameter for the first segment; and when the first volume parameter is detected to be smaller than a second preset volume threshold value, acquiring a second segment through the main microphone, wherein the second segment corresponds to the first audio which is continuous with the first segment within the preset time period; and the main microphone is determined to be in the hole blocking state when the second volume parameter of the second segment is detected to be smaller than the second preset volume threshold.
In this possible example, the determining unit 502 is further configured to, before the detecting that the first volume parameter is smaller than a second preset volume threshold: determining a currently running application program; the first distance parameter of the electronic equipment and the human face is determined according to the application program; and the second preset volume threshold corresponding to the first distance parameter is determined.
In one possible example, before the detecting that the first volume parameter is smaller than a second preset volume threshold, the determining unit 502 is further configured to: when the electronic equipment is detected to be in a state that a loudspeaker plays audio, detecting a second distance parameter between a user and the electronic equipment; and the second preset volume threshold is determined according to the second distance parameter.
The obtaining unit 501 may be a main microphone, the determining unit 502 may be a main microphone or a processor, the processing unit 503 may be a sub-microphone or a processor, and the transmitting unit may be a communication interface or a transceiver.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a smart phone 600 according to an embodiment of the present application, where the smart phone 600 includes: the main board 630 is provided with a main microphone 631, a sub-microphone 632, a camera 633, a processor 634, a memory 635, a power management chip 636 and the like.
When detecting an acquisition instruction for a first audio, the smartphone 600 starts the main microphone to acquire the first audio, where the first audio includes a first segment, and the first segment corresponds to the first audio in a preset time period; determining that the main microphone is in a hole blocking state according to the first audio; and switching to the auxiliary microphone to acquire second audio.
The processor 634 is a control center of the smart phone, and connects various parts of the entire smart phone by using various interfaces and lines, and executes various functions of the smart phone and processes data by operating or executing software programs and/or modules stored in the memory 635 and calling data stored in the memory 635, thereby integrally monitoring the smart phone. Optionally, processor 634 may include one or more processing units; preferably, the processor 634 may integrate an application processor, which handles primarily the operating system, user interface, applications, etc., and a modem processor, which handles primarily the wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 634. The Processor 634 may be, for example, a Central Processing Unit (CPU), a general purpose Processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor described above may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs and microprocessors, and the like.
The memory 635 may be used to store software programs and modules, and the processor 634 executes various functional applications and data processing of the smart phone by operating the software programs and modules stored in the memory 635. The memory 635 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the smartphone, and the like. Further, the memory 635 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. The Memory 635 may be, for example, a Random Access Memory (RAM), a flash Memory, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a register, a hard disk, a removable hard disk, a compact disc Read Only Memory (CD-ROM), or any other form of storage medium known in the art.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the hole plugging processing methods described in the above method embodiments, and the computer includes a mobile terminal.
Embodiments of the present application also provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform part or all of the steps of any one of the hole plugging processing methods described in the above method embodiments, and the computer includes a mobile terminal.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric 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 application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be performed by associated hardware as instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (6)

1. A hole plugging processing method is applied to electronic equipment, wherein the electronic equipment comprises a main microphone and a secondary microphone, and the method comprises the following steps:
when an acquisition instruction for a first audio is detected, starting the main microphone to acquire the first audio, wherein the first audio comprises a first segment, and the first segment corresponds to the first audio in a preset time period;
determining that the main microphone is in a hole blocking state according to the first audio; the determining that the primary microphone is in a plugged-hole state according to the first audio includes:
determining the data volume of the first audio with the volume smaller than a first preset volume threshold;
when the occupation ratio of the data volume in the total data volume of the first audio is detected to be larger than a preset occupation ratio threshold value, determining that the main microphone is in the hole blockage state; alternatively, the first and second electrodes may be,
the determining that the primary microphone is in a plugged-hole state according to the first audio includes:
determining a first volume parameter for the first segment;
when the first volume parameter is detected to be smaller than a second preset volume threshold value, a second segment is obtained through the main microphone, and the second segment corresponds to the first audio which is continuous with the first segment in the preset time period;
when detecting that a second volume parameter of the second segment is smaller than the second preset volume threshold, determining that the main microphone is in the hole blocking state;
when the main microphone is determined to be in the hole blocking state, switching to the auxiliary microphone to acquire a second audio; or when the main microphone is determined to be in the hole blocking state, sending the first audio, and switching to the auxiliary microphone to acquire a second audio, wherein a time period for the main microphone to acquire the first audio is different from a time period for the auxiliary microphone to acquire the second audio, and a time period for the auxiliary microphone to acquire the second audio is continuous with a time period for the main microphone to acquire the first audio;
after the switching to the secondary microphone to acquire the second audio, the method further comprises:
connecting the first audio and the second audio as target audio;
transmitting the target audio; alternatively, the first and second electrodes may be,
after the determining that the primary microphone is in the plugged-hole state from the first audio, the method further comprises:
transmitting the first audio;
after the switching to the secondary microphone to acquire the second audio, the method further comprises:
and transmitting the second audio.
2. The method of claim 1, wherein prior to said detecting that the first volume parameter is less than a second preset volume threshold, the method further comprises:
determining a currently running application program;
determining a first distance parameter between the electronic equipment and a human face according to the application program;
and determining the second preset volume threshold corresponding to the first distance parameter.
3. The method of claim 1, wherein prior to said detecting that the first volume parameter is less than a second preset volume threshold, the method further comprises:
when the electronic equipment is detected to be in a state that a loudspeaker plays audio, detecting a second distance parameter between a user and the electronic equipment;
and determining the second preset volume threshold according to the second distance parameter.
4. The hole plugging processing device is applied to electronic equipment, the electronic equipment comprises a main microphone and an auxiliary microphone, the hole plugging processing device comprises an acquisition unit, a determination unit and a processing unit, wherein:
the acquiring unit is used for starting the main microphone to acquire a first audio when an acquiring instruction for the first audio is detected, wherein the first audio comprises a first segment, and the first segment corresponds to the first audio in a preset time period;
the determining unit is used for determining that the main microphone is in a hole blocking state according to the first audio; the determining unit is specifically configured to determine a data volume of the first audio, where the volume of the data volume is smaller than a first preset volume threshold, and determine that the main microphone is in the hole blocking state when it is detected that a ratio of the data volume to a total data volume of the first audio is greater than a preset ratio threshold, or the determining unit is specifically configured to determine a first volume parameter of the first segment, obtain a second segment through the main microphone when it is detected that the first volume parameter is smaller than a second preset volume threshold, where the second segment corresponds to the first audio consecutive to the first segment within the preset time period, and determine that the main microphone is in the hole blocking state when it is detected that a second volume parameter of the second segment is smaller than the second preset volume threshold;
the processing unit is configured to switch to the auxiliary microphone to acquire a second audio, or to transmit the first audio, and switch to the auxiliary microphone to acquire the second audio when it is determined that the main microphone is in a hole blocking state, where a time period during which the main microphone acquires the first audio is different from a time period during which the auxiliary microphone acquires the second audio, and a time period during which the auxiliary microphone acquires the second audio is continuous with a time period during which the main microphone acquires the first audio;
the processing unit, after switching to acquiring the second audio for the secondary microphone, is further configured to: connecting the first audio and the second audio as target audio;
a transmitting unit configured to transmit the target audio; alternatively, the first and second electrodes may be,
the sending unit is used for sending the first audio after the main microphone is determined to be in the hole blocking state according to the first audio;
the sending unit is further configured to, after the switching to the secondary microphone to acquire the second audio: and transmitting the second audio.
5. An electronic device, comprising: a processor, memory, and one or more programs; the one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method as described in any of claims 1-3.
6. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any of claims 1-3, the computer comprising an electronic device.
CN201810815120.5A 2018-07-24 2018-07-24 Plugging hole treatment method and related product Active CN109040912B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810815120.5A CN109040912B (en) 2018-07-24 2018-07-24 Plugging hole treatment method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810815120.5A CN109040912B (en) 2018-07-24 2018-07-24 Plugging hole treatment method and related product

Publications (2)

Publication Number Publication Date
CN109040912A CN109040912A (en) 2018-12-18
CN109040912B true CN109040912B (en) 2021-05-04

Family

ID=64644377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810815120.5A Active CN109040912B (en) 2018-07-24 2018-07-24 Plugging hole treatment method and related product

Country Status (1)

Country Link
CN (1) CN109040912B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110830861B (en) * 2019-10-23 2021-09-10 维沃移动通信有限公司 Telephone receiver control method and device and electronic equipment
CN113259832B (en) * 2021-06-29 2023-04-28 深圳市欧瑞博科技股份有限公司 Microphone array detection method and device, electronic equipment and storage medium
CN117135254A (en) * 2023-03-28 2023-11-28 荣耀终端有限公司 Voice call method and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501375A (en) * 2013-09-16 2014-01-08 华为终端有限公司 Method and device for controlling sound effect
CN105323363A (en) * 2014-06-30 2016-02-10 中兴通讯股份有限公司 Method and device for selecting main microphones
CN106791186A (en) * 2017-01-22 2017-05-31 惠州Tcl移动通信有限公司 It is a kind of to detect the method and system that microphone sound hole is blocked
CN106911996A (en) * 2017-03-03 2017-06-30 广东欧珀移动通信有限公司 The detection method of microphone state, device and terminal device
CN107181853A (en) * 2016-03-10 2017-09-19 深圳富泰宏精密工业有限公司 The electronic installation of microphone switching method and application this method
WO2017185342A1 (en) * 2016-04-29 2017-11-02 华为技术有限公司 Method and apparatus for determining voice input anomaly, terminal, and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103713876B (en) * 2014-01-16 2016-10-05 联想(北京)有限公司 Data processing method and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501375A (en) * 2013-09-16 2014-01-08 华为终端有限公司 Method and device for controlling sound effect
CN105323363A (en) * 2014-06-30 2016-02-10 中兴通讯股份有限公司 Method and device for selecting main microphones
CN107181853A (en) * 2016-03-10 2017-09-19 深圳富泰宏精密工业有限公司 The electronic installation of microphone switching method and application this method
WO2017185342A1 (en) * 2016-04-29 2017-11-02 华为技术有限公司 Method and apparatus for determining voice input anomaly, terminal, and storage medium
CN106791186A (en) * 2017-01-22 2017-05-31 惠州Tcl移动通信有限公司 It is a kind of to detect the method and system that microphone sound hole is blocked
CN106911996A (en) * 2017-03-03 2017-06-30 广东欧珀移动通信有限公司 The detection method of microphone state, device and terminal device

Also Published As

Publication number Publication date
CN109040912A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
US11632621B2 (en) Method for controlling volume of wireless headset, and computer-readable storage medium
CN109040912B (en) Plugging hole treatment method and related product
CN112203206B (en) Microphone hole blockage detection method and related product
CN108710615B (en) Translation method and related equipment
US20180336005A1 (en) Sound effect processing method, and terminal device
CN109273017A (en) Coding control method, device and electronic equipment
CN109151789B (en) Translation method, device and system and Bluetooth headset
CN108777827B (en) Wireless earphone, volume adjusting method and related product
CN109121046B (en) Plugging hole treatment method and related product
CN108449496B (en) Voice call data detection method and device, storage medium and mobile terminal
WO2019174492A1 (en) Voice call data detection method, device, storage medium and mobile terminal
CN106131312B (en) Voice message playing method and device and mobile terminal
CN108449506B (en) Voice call data processing method and device, storage medium and mobile terminal
CN108172237B (en) Voice call data processing method and device, storage medium and mobile terminal
CN109067965B (en) Translation method, translation device, wearable device and storage medium
CN109089201B (en) Microphone hole blockage detection method and related product
CN108449497B (en) Voice call data processing method and device, storage medium and mobile terminal
CN105120061B (en) The display methods and device of message
CN107799113A (en) Audio-frequency processing method, device, storage medium and mobile terminal
CN109065017B (en) Voice data generation method and related device
CN108668018B (en) Mobile terminal, volume control method and related product
CN108650595B (en) Hole plugging processing method and device, electronic equipment and computer readable storage medium
CN104333641B (en) Call method and device
CN104980583A (en) Event reminding method and terminal
CN110225213B (en) Recognition method of voice call scene and audio policy server

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