CN111277697B - Audio processing method and device, storage medium and electronic equipment - Google Patents

Audio processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111277697B
CN111277697B CN202010148517.0A CN202010148517A CN111277697B CN 111277697 B CN111277697 B CN 111277697B CN 202010148517 A CN202010148517 A CN 202010148517A CN 111277697 B CN111277697 B CN 111277697B
Authority
CN
China
Prior art keywords
audio
call
electronic equipment
sound
electronic device
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
CN202010148517.0A
Other languages
Chinese (zh)
Other versions
CN111277697A (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 CN202010148517.0A priority Critical patent/CN111277697B/en
Publication of CN111277697A publication Critical patent/CN111277697A/en
Application granted granted Critical
Publication of CN111277697B publication Critical patent/CN111277697B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/78Detection of presence or absence of voice signals
    • G10L25/87Detection of discrete points within a voice signal

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses an audio processing method, which is applied to electronic equipment, wherein the electronic equipment comprises an audio digital signal processor, and the audio digital signal processor comprises a sound-break detection module; the electronic equipment is provided with a hardware abstraction layer and a control, wherein the control is used for communication between the hardware abstraction layer and the audio digital signal processor so as to enable the hardware abstraction layer to acquire an event detected by the audio digital signal processor; the audio processing method comprises the following steps: when the electronic equipment is monitored to carry out a call service, obtaining a call audio frequency from a call counterpart received by the electronic equipment; detecting whether the call audio has the sound break through the sound break detection module; and if the voice-off event exists in the call audio, feeding back the detected voice-off event to the hardware abstraction layer through the control so that the electronic equipment acquires the voice-off event. The method and the device can effectively detect whether the call is disconnected or not in the call process.

Description

Audio processing method and device, storage medium and electronic equipment
Technical Field
The present application belongs to the field of communications technologies, and in particular, to an audio processing method and apparatus, a storage medium, and an electronic device.
Background
With the development of technology, electronic devices such as smart phones have more and more functions. Telephony is still an important function of these electronic devices. Users often use electronic devices to talk. However, in the related art, during a call using an electronic device, there may be a problem of call disconnection due to weak signal or unstable signal.
Disclosure of Invention
The embodiment of the application provides an audio processing method, an audio processing device, a storage medium and an electronic device, which can effectively detect whether a call is disconnected in the call process.
In a first aspect, an embodiment of the present application provides an audio processing method, which is applied to an electronic device, where the electronic device includes an audio digital signal processor, and the audio digital signal processor includes a sound interruption detection module;
a hardware abstraction layer and a control are configured in the electronic device, and the control is used for communication between the hardware abstraction layer and the audio digital signal processor, so that the hardware abstraction layer acquires an event detected by the audio digital signal processor;
the audio processing method comprises the following steps:
when the fact that the electronic equipment carries out a call service is monitored, call audio from a call counterpart received by the electronic equipment is obtained;
detecting whether the call audio has a sound break through the sound break detection module;
and if the fact that the sound is cut off in the call audio is detected, feeding back the detected sound cut-off event to the hardware abstraction layer through the control so that the electronic equipment can obtain the sound cut-off event.
In a second aspect, an embodiment of the present application provides an audio processing apparatus, which is applied to an electronic device, where the electronic device includes an audio digital signal processor, and the audio digital signal processor includes a sound interruption detection module;
a hardware abstraction layer and a control are configured in the electronic device, and the control is used for communication between the hardware abstraction layer and the audio digital signal processor, so that the hardware abstraction layer acquires an event detected by the audio digital signal processor;
the audio processing apparatus includes:
the acquisition module is used for acquiring a call audio frequency from a call counterpart received by the electronic equipment when the call service of the electronic equipment is monitored;
the detection module is used for detecting whether the voice break exists in the call audio through the voice break detection module;
and the processing module is used for feeding back the detected sound break event to the hardware abstraction layer through the control if the sound break is detected to exist in the call audio, so that the electronic equipment can acquire the sound break event.
In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer program is enabled to execute the flow in the audio processing method provided by the present application.
In a fourth aspect, an embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor executes a flow in the audio processing method provided in the embodiment of the present application by calling a computer program stored in the memory.
In the embodiment of the application, when the electronic equipment performs a call service, the electronic equipment can acquire call audio received by the electronic equipment from a call counterpart, and detect whether the call audio has a tone break through a tone break detection module in an audio digital signal processor. If the fact that the sound is cut off in the call audio is detected, the electronic equipment can feed back the detected sound cut-off event to the hardware abstraction layer through the control, and therefore the electronic equipment can obtain the sound cut-off event. According to the embodiment of the application, whether the sound break event exists can be detected by directly utilizing the most original call audio, so that whether the sound break event exists can be accurately detected. And after the sound break event is detected, the electronic equipment can feed back the sound break event detected by the audio digital signal processor to the hardware abstraction layer through the control, so that the electronic equipment can acquire the sound break event in time. Therefore, the embodiment of the application can effectively detect whether the call sound is cut off or not in the call process.
Drawings
The technical solutions and advantages of the present application will become apparent from the following detailed description of specific embodiments of the present application when taken in conjunction with the accompanying drawings.
Fig. 1 is a schematic flowchart of an audio processing method according to an embodiment of the present application.
Fig. 2 is another schematic flowchart of an audio processing method according to an embodiment of the present application.
Fig. 3 is a schematic diagram of a framework for implementing an audio processing method according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an audio processing apparatus according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Fig. 6 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
It can be understood that the execution subject of the embodiment of the present application may be an electronic device such as a smart phone or a tablet computer that can perform a call.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an audio processing method according to an embodiment of the present disclosure. The audio processing method can be applied to electronic equipment. The electronic device may include an Audio Digital Signal Processor (ADSP), which may include a mute detection module therein. The electronic device is provided with a Hardware Abstraction Layer (HAL) and a control. The control may be used for communication between the hardware abstraction layer and the audio digital signal processor, so that the hardware abstraction layer may obtain the event detected by the audio digital signal processor.
The hardware abstraction layer is an interface layer between the operating system kernel and the hardware circuit, and is intended to abstract the hardware. It hides the hardware interface details of specific platform, provides virtual hardware platform for operation system, makes it have hardware independence, and can be transplanted on several platforms. The hardware abstraction layer can shield the implementation details of the hardware driver module downwards and provide hardware access services upwards. With a hardware abstraction layer, an operating system such as an addrod system may support hardware devices by two layers: the first layer is implemented in user space (user space), and the second layer is implemented in kernel space (kernel space).
The control may be a plug-in implemented in software code.
The flow of the audio processing method can comprise the following steps:
101. when the fact that the electronic equipment carries out a call service is monitored, call audio from a call counterpart received by the electronic equipment is obtained.
With the development of technology, electronic devices such as smart phones have more and more functions. Telephony is still an important function of these electronic devices. Users often use electronic devices to talk. However, in the related art, during a call using an electronic device, there may be a problem of call disconnection due to weak signal or unstable signal. A call break may appear as the user not hearing the other party's voice during the call.
In the embodiment of the application, for example, when it is monitored that the electronic device performs a call service, the electronic device may obtain a call audio received by the electronic device from a call partner.
For example, the user of the electronic device is a, and when the user a and the user B talk, the user B speaks a voice of "twilight where you are" so that the electronic device can receive the voice, that is, the call audio received by the electronic device from the opposite party of the call is the audio corresponding to the voice of "twilight where you are".
102. And detecting whether the voice is cut off in the call audio through the voice cut-off detection module.
For example, after the call audio from the call counterpart received by the electronic device is acquired, the electronic device may detect whether there is a sound break in the call audio through a sound break detection module in the audio digital signal processor.
In one embodiment, the break detection module may be a module implemented by software code. Modules in software engineering refer to relatively independent program elements of an overall system, each of which performs and implements a relatively independent software function. Thus, in colloquial terms, software modules are relatively independent program segments.
If no break in the call audio is detected, the electronic device may perform other operations.
If a break in the call audio is detected, flow may proceed to 103.
103. And if the sound break exists in the call audio, feeding back the detected sound break event to the hardware abstraction layer through the control so that the electronic equipment acquires the sound break event.
For example, when the electronic device detects that there is a sound break in the call audio through a sound break detection module in the audio digital signal processor, the electronic device may feed back the event that the sound break is detected to the hardware abstraction layer through the control, so that the electronic device may obtain the sound break event, that is, the electronic device may obtain the sound break event through the hardware abstraction layer.
It can be understood that, in the embodiment of the present application, when the electronic device performs a call service, the electronic device may obtain a call audio received by the electronic device from a call counterpart, and detect whether there is a call break in the call audio through a break detection module in the audio digital signal processor. If the fact that the sound is cut off in the call audio is detected, the electronic equipment can feed back the detected sound cut-off event to the hardware abstraction layer through the control, and therefore the electronic equipment can obtain the sound cut-off event. According to the embodiment of the application, whether the sound break event exists can be detected by directly utilizing the most original call audio, so that whether the sound break event exists can be accurately detected. And after the sound break event is detected, the electronic equipment can feed back the sound break event detected by the audio digital signal processor to the hardware abstraction layer through the control, so that the electronic equipment can acquire the sound break event in time. Therefore, the embodiment of the application can effectively detect whether the call sound is cut off or not in the call process.
Referring to fig. 2, fig. 2 is another schematic flow chart of an audio processing method according to an embodiment of the present disclosure. The audio processing method can be applied to electronic equipment. The electronic device may include an Audio Digital Signal Processor (ADSP), which may include a mute detection module therein. The electronic device is provided with a Hardware Abstraction Layer (HAL) and a control. The control may be used for communication between the hardware abstraction layer and the audio digital signal processor, so that the hardware abstraction layer may obtain the event detected by the audio digital signal processor.
The hardware abstraction layer is an interface layer between the operating system kernel and the hardware circuit, and is intended to abstract the hardware. It hides the hardware interface details of specific platform, provides virtual hardware platform for operation system, makes it have hardware independence, and can be transplanted on several platforms. The hardware abstraction layer can shield the implementation details of the hardware driver module downwards and provide hardware access services upwards. With a hardware abstraction layer, an operating system such as an addrod system may support hardware devices by two layers: the first layer is implemented in user space (user space), and the second layer is implemented in kernel space (kernel space).
The control may be a plug-in implemented in software code.
The flow of the audio processing method can comprise the following steps:
201. when the fact that the electronic equipment carries out a call service is monitored, the electronic equipment obtains call audio which is received from a call counterpart and consists of a plurality of data packets.
For example, when it is monitored that the electronic device performs a call service, the electronic device may obtain a call audio received by the electronic device from a call partner.
For example, the user of the electronic device is a, and when the user a and the user B talk, the user B speaks a voice of "twilight where you are" so that the electronic device can receive the voice, that is, the call audio received by the electronic device from the opposite party of the call is the audio corresponding to the voice of "twilight where you are".
The call audio received by the electronic device from the call counterpart may be data composed of a plurality of data packets. Each packet may correspond to a segment of audio.
202. Through the sound-breaking detection module, the electronic equipment sequentially detects whether the data contained in each data packet in the call audio is 0 according to the sequence of the receiving time.
For example, after the call audio from the call counterpart received by the electronic device is acquired, the electronic device may detect whether there is a sound break in the call audio through a sound break detection module in the audio digital signal processor. For example, in this embodiment, the electronic device may sequentially detect whether data included in each data packet in the call audio is 0 according to a sequence of receiving times of the data packets included in the call audio.
For example, the electronic device receives the data packets D1, D2, D3, and so on in sequence according to the sequence of the receiving time. Then, the electronic device may check whether all the data contained in the data packet D1 are 0, check whether all the data contained in the data packet D2 are 0, check whether all the data contained in the data packet D3 are 0, and so on.
It should be noted that, when all the data included in one data packet is 0, that is, this data packet does not include any valid information, and therefore this data packet may be considered as a corresponding data packet when the tone is cut off.
In the process of detecting the data packets, the electronic device may simultaneously detect whether a preset number of target data packets are continuously detected. The target data packet is a data packet containing 0 data.
If the electronic device does not continuously detect a preset number of target packets, then it may be assumed that no or insignificant tone breaks exist. In this case, the electronic device may perform other operations.
If the electronic device continuously detects a preset number of target packets, it may proceed to 203.
203. If the target data packets are continuously detected and the number of the continuously detected target data packets is a preset value, the electronic equipment determines that the sound break exists in the call audio, wherein the target data packets are data packets with the data of 0.
For example, if the electronic device continuously detects the target packets and the number of the continuously detected target packets is a preset value, the electronic device may determine that there is a sound break in the call audio.
For example, the preset value is 8. Then, when the electronic device continuously detects 8 target packets of which data is all 0, it may be considered that there is a sound break in the call audio. Of course, in other embodiments, the preset value may be other values. For example, the preset value may be 10, 12, 15, or 5, and the like, which is not specifically limited in this embodiment.
204. And if the sound break exists in the call audio, the electronic equipment feeds back the detected sound break event to the hardware abstraction layer through the control so that the electronic equipment acquires the sound break event.
For example, when a sound break is detected in call audio, the electronic device may feed back an event that the audio digital signal processor detects the sound break to the hardware abstraction layer through the control, so that the electronic device acquires the sound break event.
205. After determining that the voice-off exists in the call audio, the electronic equipment acquires the signal strength of the used communication network.
206. And if the signal intensity is lower than the preset intensity threshold value, the electronic equipment generates prompt information, and the prompt information is used for prompting that the signal of the communication network is weak.
For example, 205, 206 may include:
after determining that there is a sound break in the call audio, the electronic device may obtain the signal strength of the communication network currently used by the electronic device, and detect whether the signal strength is lower than a preset strength threshold.
If the signal strength of the currently used communication network is detected to be lower than the preset strength threshold, the electronic device can generate prompt information, and the prompt information can be used for prompting the user that the signal of the currently used communication network is weak. For example, the electronic device may prompt the user that a sound break may be caused by a weak signal of the currently used communication network. Alternatively, the electronic device may prompt the user that a weak signal of the communication network currently in use is likely to cause a sound break.
In one embodiment, the communication network may be a communication network such as 2G, 3G, 4G, 5G, etc. provided by a communication carrier and capable of performing a call.
In an implementation manner, the electronic device provided in this embodiment may further be configured with a preset process, and the preset process may be used to monitor a state of the electronic device.
Then, when it is monitored that the electronic device performs a call service in the step 201, and when a flow of a call audio from a call counterpart received by the electronic device is obtained, the following steps may be performed: when the fact that the electronic equipment carries out conversation business is monitored through a preset process, the electronic equipment obtains conversation audio frequency received by the electronic equipment from a conversation counterpart.
That is, the electronic device provided in the embodiment of the present application may monitor various states of the electronic device through a preset process. The preset process can monitor whether the electronic device is in a call or not, and can also monitor other states of the electronic device, for example, whether a screen state is on or off, whether the electronic device is in a game application, whether the electronic device is playing multimedia files such as audio and video, and the like.
When the fact that the electronic equipment is in the conversation service is monitored through the preset process, the electronic equipment can obtain conversation audio frequency received by the electronic equipment from a conversation counterpart.
In another embodiment, the electronic device may be further configured with a first module and a second module, wherein the first module may be used for data transmission between the hardware abstraction layer and the control, and the second module may be used for data transmission between the control and the audio digital signal processor. For example, the electronic device may also be configured with a tinyalsa module and an RTAC module. The above tinyalsa module may be used for data transmission between the hardware abstraction layer and the control. The RTAC module described above may be used for data transmission between the control and the audio digital signal processor.
It should be noted that the above-mentioned tinyalsa module is a communication framework in the operating system, and the above-mentioned tinyalsa module can also be used to manage the audio channels of all modes in the operating system.
The RTAC module may be a bottom layer framework in an operating system, and may be used to implement audio processing, such as implementing various sound effects.
In other embodiments, after detecting that there is a sound break, the electronic device may further fill the audio data missing due to the sound break with a preset audio, so as to recover the audio of the sound break portion, thereby improving the conversation experience of the user.
Referring to fig. 3, fig. 3 is a block diagram illustrating a method for implementing audio processing according to an embodiment of the present disclosure.
For example, the electronic device provided in this embodiment uses an Android operating system as an example. The framework for implementing the audio processing method provided by the embodiment may include: the system comprises a preset process, a hardware abstraction layer, a tinyalsa module, a control, an RTAC module, an audio digital signal processor, a communication network module and an audio playing device.
The preset process may be used to monitor a state of the electronic device, such as whether the electronic device is performing a call service, whether the call service is ended, or whether the electronic device is playing a multimedia file.
The hardware abstraction layer is an interface layer between the operating system kernel and the hardware circuitry, which is intended to abstract the hardware. It hides the hardware interface details of specific platform, provides virtual hardware platform for operation system, and makes it have hardware independence.
the tinyalsa module is a communication framework in an android operating system, and can be used for data transmission between a hardware abstraction layer and a control.
The control may be used for data transfer between the tinyalsa module and the RTAC module.
The RTAC module is a bottom framework of the high-pass platform and can be used for realizing audio processing based on the high-pass platform, such as various sound effects.
The audio digital signal processor may include a sound break detection module, and in addition, the audio digital signal processor may further include at least a decoding module, a noise reduction module, and the like. The audio digital signal processor in this embodiment may be a high-pass platform based audio digital signal processor.
The communication network module can be used for receiving call audio from a call counterpart when the electronic equipment performs a call service.
The audio playback device may be used to play audio. The audio playback devices may include devices such as speakers (speakers), earphones, headphones (earphones), and the like.
The preset process, the hardware abstraction layer and the tinyalsa module can be configured in a user space (user space), and the control, the RTAC module, the audio digital signal processor, the communication network module and the audio playing device can be configured in a kernel space.
When the electronic device monitors that a call service is carried out through a preset process, the preset process can generate a tone-off detection instruction, and the tone-off detection instruction can be used for indicating whether the received call audio is tone-off or not. The sound break detection instruction is transmitted to the hardware abstraction layer, then transmitted to the tinyalsa module by the hardware abstraction layer, transmitted to the control by the tinyalsa module, transmitted to the RTAC module by the control, and transmitted to the sound break detection module of the audio digital signal processor by the RTAC module.
After the sound-break detection module receives the sound-break detection instruction, the electronic equipment can start to detect whether the received call audio has sound break. The electronic equipment can receive the call audio from the call counterpart through the communication network module. After receiving the call audio, the call audio is transmitted to the audio digital signal processor by the electronic device. The conversation audio is decoded by a decoding module of the audio digital signal processor to obtain the decoded conversation audio. The decoded call audio can be transmitted to a sound break detection module for sound break detection. The decoded call audio includes a plurality of data packets. The voice-off detection module can receive the receiving time sequence of each data packet included in the decoded call audio, and sequentially detect whether the data included in each data packet is 0.
For example, the sound break detection module receives the data packets D1, D2, D3, etc. in sequence according to the sequence of the receiving time. Then, the mute detection module may first detect whether all the data contained in the data packet D1 are 0, then detect whether all the data contained in the data packet D2 are 0, then detect whether all the data contained in the data packet D3 are 0, and so on. When the data contained in one data packet is all 0, it means that this data packet does not contain any valid information, and therefore this data packet can be considered as the corresponding data packet when the tone is cut off.
In the process of detecting the data packets, the sound-break detection module can simultaneously detect whether a preset number of target data packets are continuously detected. The target data packet is a data packet containing 0 data. For example, the preset number is 8. That is, the mute detection module may detect whether 8 target packets are detected consecutively.
If 8 target packets are detected consecutively, it can be determined that there is a sound break in the call audio. For example, in this embodiment, the sound-break detection module detects that there is sound break in the call audio. In this case, the audio digital signal processor may feed back the event of the detected sound break to the electronic device one by one through the RTAC module, the control, the tinyalsa module, the hardware abstraction layer, and the preset process, so that the electronic device acquires the sound break event.
After the electronic device acquires the sound-off event, the electronic device may acquire the signal strength of the currently used communication network and detect whether the signal strength is lower than a preset strength threshold.
For example, in this embodiment, if the electronic device detects that the signal strength of the currently used communication network is lower than the preset strength threshold, the electronic device may generate a prompt message, where the prompt message may be used to prompt the user that the signal of the currently used communication network is weak. For example, the electronic device may prompt the user that a sound break may be caused by a weak signal of the currently used communication network. Alternatively, the electronic device may prompt the user that the communication network currently in use is weak in signal, which may easily cause a sound break, and so on. For example, the electronic device may play a preset alert tone to prompt the user that the current communication network signal is weak, which may easily cause a sound break, and so on.
It is understood that, in the present embodiment, the electronic device may use the original call audio to detect whether there is a sound break. Therefore, the embodiment of the application can accurately detect whether the voice-off exists in the call audio. In addition, the sound break detection module can be arranged in the audio digital signal processor in an embedded module mode, so that the system overhead of the sound break detection mode provided by the embodiment is low. In addition, since the present embodiment detects whether there is a sound break in the audio digital signal processor, the electronic device can detect whether there is a sound break regardless of the way the electronic device plays the call audio.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an audio processing device according to an embodiment of the present disclosure. The audio processing device can be applied to electronic equipment, the electronic equipment comprises an audio digital signal processor, and the audio digital signal processor comprises a sound interruption detection module. The electronic equipment is provided with a hardware abstraction layer and a control, wherein the control is used for communication between the hardware abstraction layer and the audio digital signal processor, so that the hardware abstraction layer acquires an event detected by the audio digital signal processor.
The audio processing apparatus 300 may include: the device comprises an acquisition module 301, a detection module 302 and a processing module 303.
The obtaining module 301 is configured to obtain a call audio from a call party received by the electronic device when it is monitored that the electronic device performs a call service.
The detecting module 302 is configured to detect whether there is a sound break in the call audio through the sound break detecting module.
The processing module 303 is configured to, if it is detected that a sound break exists in the call audio, feed back the detected sound break event to the hardware abstraction layer through the control, so that the electronic device obtains the sound break event.
In one embodiment, the call audio is comprised of a plurality of packets. Then, the detection module 302 may be configured to:
sequentially detecting whether the data contained in each data packet in the call audio is 0 or not according to the sequence of the receiving time;
and if the target data packets are continuously detected and the number of the continuously detected target data packets is a preset value, determining that a sound break exists in the call audio, wherein the target data packets are data packets with the data of 0.
In one embodiment, the processing module 303 may be further configured to:
after the fact that the call audio is disconnected is determined, the signal intensity of a communication network used by the electronic equipment is obtained;
and if the signal intensity is lower than a preset intensity threshold value, generating prompt information, wherein the prompt information is used for prompting that the signal of the communication network is weak.
In one embodiment, the electronic device may be further configured with a tinyalsa module and an RTAC module; wherein the tinyalsa module is used for data transmission between the hardware abstraction layer and the control; the RTAC module is used for data transmission between the control and the audio digital signal processor.
In one embodiment, the electronic device may be further configured with a preset process, and the preset process is used for monitoring the state of the electronic device.
Then, the obtaining module 301 may be configured to: and when the conversation service of the electronic equipment is monitored through the preset process, the conversation audio frequency received by the electronic equipment from the conversation counterpart is acquired.
The present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute the procedures in the method provided by the present embodiment.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the flow in the audio processing method provided in this embodiment by calling the computer program stored in the memory.
For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
The electronic device 400 may include an audio digital signal processor 401, memory 402, processor 403, and the like. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The audio digital signal processor 401 may be used for such things as decoding, noise reduction, silence detection, etc. of the received audio. A mute detection module may be included in the audio digital signal processor 401.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing executable code. The application programs may constitute various functional modules. The processor 403 executes various functional applications and data processing by running an application program stored in the memory 402.
The processor 403 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device.
In this embodiment, a hardware abstraction layer and a control are configured in the electronic device, where the control is used for communication between the hardware abstraction layer and the audio digital signal processor, so that the hardware abstraction layer obtains an event detected by the audio digital signal processor. The processor 403 in the electronic device loads executable code corresponding to one or more processes of the application program into the memory 402 according to the following instructions, and the processor 403 executes the application program stored in the memory 402, thereby performing:
when the fact that the electronic equipment carries out a call service is monitored, call audio from a call counterpart received by the electronic equipment is obtained;
detecting whether the call audio has a sound break through the sound break detection module;
and if the fact that the sound is cut off in the call audio is detected, feeding back the detected sound cut-off event to the hardware abstraction layer through the control so that the electronic equipment can obtain the sound cut-off event.
Referring to fig. 6, the electronic device 400 may include an audio digital signal processor 401, a memory 402, a processor 403, an input unit 404, an output unit 405, a speaker 406, and the like.
The audio digital signal processor 401 may be used for such things as decoding, noise reduction, silence detection, etc. of the received audio. A mute detection module may be included in the audio digital signal processor 401.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing executable code. The application programs may constitute various functional modules. The processor 403 executes various functional applications and data processing by running an application program stored in the memory 402.
The processor 403 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device.
The input unit 404 may be used to receive input numbers, character information, or user characteristic information, such as a fingerprint, and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The output unit 405 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
The speaker 406 may be used to play sound signals.
Furthermore, the electronic device may also include components such as a battery, a microphone, and the like. The battery is used to supply power to the various modules of the electronic device and the microphone may be used to pick up sound signals in the surrounding environment.
In this embodiment, a hardware abstraction layer and a control are configured in the electronic device, where the control is used for communication between the hardware abstraction layer and the audio digital signal processor, so that the hardware abstraction layer obtains an event detected by the audio digital signal processor. The processor 403 in the electronic device loads executable code corresponding to one or more processes of the application program into the memory 402 according to the following instructions, and the processor 403 executes the application program stored in the memory 402, thereby performing:
when the fact that the electronic equipment carries out a call service is monitored, call audio from a call counterpart received by the electronic equipment is obtained;
detecting whether the call audio has a sound break through the sound break detection module;
and if the fact that the sound is cut off in the call audio is detected, feeding back the detected sound cut-off event to the hardware abstraction layer through the control so that the electronic equipment can obtain the sound cut-off event.
In one embodiment, the call audio is comprised of a plurality of packets.
Then, when the processor 403 performs the detecting whether there is a sound break in the call audio, it may perform: sequentially detecting whether the data contained in each data packet in the call audio is 0 or not according to the sequence of the receiving time; and if the target data packets are continuously detected and the number of the continuously detected target data packets is a preset value, determining that a sound break exists in the call audio, wherein the target data packets are data packets with the data of 0.
In one embodiment, the processor 403 may further perform: after the fact that the call audio is disconnected is determined, the signal intensity of a communication network used by the electronic equipment is obtained; and if the signal intensity is lower than a preset intensity threshold value, generating prompt information, wherein the prompt information is used for prompting that the signal of the communication network is weak.
In one embodiment, the electronic device is further configured with a tinyalsa module and an RTAC module; wherein the tinyalsa module is used for data transmission between the hardware abstraction layer and the control; the RTAC module is used for data transmission between the control and the audio digital signal processor.
In one embodiment, the electronic device is further configured with a preset process, and the preset process is used for monitoring the state of the electronic device.
Then, the processor 403 may execute, when it is monitored that the electronic device performs a call service, acquiring a call audio received by the electronic device from a call counterpart, to: and when the conversation service of the electronic equipment is monitored through the preset process, the conversation audio frequency received by the electronic equipment from the conversation counterpart is acquired.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the audio processing method, and are not described herein again.
The audio processing apparatus provided in the embodiment of the present application and the audio processing method in the above embodiment belong to the same concept, and any method provided in the embodiment of the audio processing method may be executed on the audio processing apparatus, and a specific implementation process thereof is described in the embodiment of the audio processing method in detail, and is not described herein again.
It should be noted that, for the audio processing method described in the embodiment of the present application, it can be understood by those skilled in the art that all or part of the process of implementing the audio processing method described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and during the execution, the process of the embodiment of the audio processing method can be included. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
For the audio processing device of the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The foregoing detailed description has provided a method, an apparatus, a storage medium, and an electronic device for audio processing provided by embodiments of the present application, and specific examples have been applied in the present application to explain the principles and implementations of the present application, and the descriptions of the foregoing embodiments are only used to help understand the method and the core ideas of the present application; meanwhile, for those 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 (10)

1. The audio processing method is applied to electronic equipment, and is characterized in that the electronic equipment comprises an audio digital signal processor, and the audio digital signal processor comprises a sound-break detection module;
a hardware abstraction layer and a control are configured in the electronic device, and the control is used for communication between the hardware abstraction layer and the audio digital signal processor, so that the hardware abstraction layer acquires an event detected by the audio digital signal processor;
the audio processing method comprises the following steps:
when the fact that the electronic equipment carries out a call service is monitored, call audio from a call counterpart received by the electronic equipment is obtained;
detecting whether the call audio has a sound break through the sound break detection module;
if the fact that the sound is cut off in the call audio is detected, feeding back a detected sound cut-off event to the hardware abstraction layer through the control, and feeding back the sound cut-off event to the electronic equipment through the hardware abstraction layer, so that the electronic equipment can obtain the sound cut-off event;
and filling the audio data missing due to the sound break by using the preset audio so as to recover the audio of the sound break part.
2. The audio processing method according to claim 1, wherein the call audio is composed of a plurality of packets;
the detecting whether there is a sound break in the call audio includes:
sequentially detecting whether the data contained in each data packet in the call audio is 0 or not according to the sequence of the receiving time;
and if the target data packets are continuously detected and the number of the continuously detected target data packets is a preset value, determining that a sound break exists in the call audio, wherein the target data packets are data packets with the data of 0.
3. The audio processing method of claim 2, further comprising:
after the fact that the call audio is disconnected is determined, the signal intensity of a communication network used by the electronic equipment is obtained;
and if the signal intensity is lower than a preset intensity threshold value, generating prompt information, wherein the prompt information is used for prompting that the signal of the communication network is weak.
4. The audio processing method according to claim 1, wherein the electronic device is further configured with a tinyalsa module and an RTAC module;
wherein the tinyalsa module is used for data transmission between the hardware abstraction layer and the control;
the RTAC module is used for data transmission between the control and the audio digital signal processor.
5. The audio processing method according to claim 1, wherein the electronic device is further configured with a preset process, and the preset process is configured to monitor a state of the electronic device;
when it is monitored that the electronic equipment carries out a call service, acquiring call audio from a call counterpart received by the electronic equipment comprises the following steps: and when the conversation service of the electronic equipment is monitored through the preset process, the conversation audio frequency received by the electronic equipment from the conversation counterpart is acquired.
6. An audio processing device is applied to electronic equipment, and is characterized in that the electronic equipment comprises an audio digital signal processor, and the audio digital signal processor comprises a sound-break detection module;
a hardware abstraction layer and a control are configured in the electronic device, and the control is used for communication between the hardware abstraction layer and the audio digital signal processor, so that the hardware abstraction layer acquires an event detected by the audio digital signal processor;
the audio processing apparatus includes:
the acquisition module is used for acquiring a call audio frequency from a call counterpart received by the electronic equipment when the call service of the electronic equipment is monitored;
the detection module is used for detecting whether the voice break exists in the call audio through the voice break detection module;
the processing module is used for feeding back a detected sound interruption event to the hardware abstraction layer through the control if sound interruption is detected to exist in the call audio, and feeding back the sound interruption event to the electronic equipment through the hardware abstraction layer so that the electronic equipment can acquire the sound interruption event;
and filling the audio data missing due to the sound break by using the preset audio so as to recover the audio of the sound break part.
7. The audio processing apparatus according to claim 6, wherein the call audio is composed of a plurality of packets;
the detection module is used for:
sequentially detecting whether the data contained in each data packet in the call audio is 0 or not according to the sequence of the receiving time;
and if the target data packets are continuously detected and the number of the continuously detected target data packets is a preset value, determining that a sound break exists in the call audio, wherein the target data packets are data packets with the data of 0.
8. The audio processing device of claim 7, wherein the processing module is further configured to:
after the fact that the call audio is disconnected is determined, the signal intensity of a communication network used by the electronic equipment is obtained;
and if the signal intensity is lower than a preset intensity threshold value, generating prompt information, wherein the prompt information is used for prompting that the signal of the communication network is weak.
9. A computer-readable storage medium, on which a computer program is stored, which, when executed on a computer, causes the computer to carry out the method according to any one of claims 1 to 5.
10. An electronic device comprising a memory, a processor, wherein the processor executes the method of any one of claims 1 to 5 by invoking a computer program stored in the memory.
CN202010148517.0A 2020-03-05 2020-03-05 Audio processing method and device, storage medium and electronic equipment Active CN111277697B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010148517.0A CN111277697B (en) 2020-03-05 2020-03-05 Audio processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010148517.0A CN111277697B (en) 2020-03-05 2020-03-05 Audio processing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111277697A CN111277697A (en) 2020-06-12
CN111277697B true CN111277697B (en) 2021-08-31

Family

ID=71000514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010148517.0A Active CN111277697B (en) 2020-03-05 2020-03-05 Audio processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111277697B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857646A (en) * 2020-08-05 2020-10-30 上海茂声智能科技有限公司 System for quickly realizing voice interaction function
CN112786070B (en) * 2020-12-28 2024-03-15 Oppo广东移动通信有限公司 Audio data processing method and device, storage medium and electronic equipment
CN116743905B (en) * 2022-09-30 2024-04-26 荣耀终端有限公司 Call volume control method and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488992A (en) * 2009-01-12 2009-07-22 宇龙计算机通信科技(深圳)有限公司 Call processing method and mobile terminal
CN102131213A (en) * 2011-03-15 2011-07-20 宇龙计算机通信科技(深圳)有限公司 Method and system for prompting signal intensity
US20140016487A1 (en) * 2012-07-13 2014-01-16 Anritsu Company Test system to estimate the uplink or downlink quality of multiple user devices using a mean opinion score (mos)
CN108470571B (en) * 2018-03-08 2020-09-08 腾讯音乐娱乐科技(深圳)有限公司 Audio detection method and device and storage medium

Also Published As

Publication number Publication date
CN111277697A (en) 2020-06-12

Similar Documents

Publication Publication Date Title
CN111277697B (en) Audio processing method and device, storage medium and electronic equipment
CN109445740B (en) Audio playing method and device, electronic equipment and storage medium
CN107360458B (en) Play control method, device, storage medium and terminal
CA2740581C (en) System and method for resuming media
CN111078448B (en) Method for processing audio abnormity and electronic equipment
CN113411793A (en) Bluetooth communication method and terminal
CN109151212B (en) Equipment control method and device and electronic equipment
CN111163452A (en) Bluetooth headset-based independent audio playing method
CN112751971A (en) Voice playing method and device and electronic equipment
CN109107158B (en) Sound effect processing method and device, electronic equipment and computer readable storage medium
CN107846516B (en) Call scene prompting method and mobile terminal
CN110290441B (en) Wireless earphone control method and device, wireless earphone and storage medium
CN106231569A (en) A kind of method that mobile terminal is controlled and mobile terminal
CN104023117B (en) A kind of method of information processing and electronic equipment
CN106031294B (en) A kind of processing method and terminal device of terminal device Call Collision
CN116684856A (en) Bluetooth connection method and device
CN106657675B (en) Method and system for playing mobile terminal audio and video through Bluetooth playing device
CN113423007B (en) Control method and device for multi-audio playing, electronic equipment and storage medium
CN113766385B (en) Earphone noise reduction method and device
US11477591B2 (en) Audio data processing method, terminal device, and storage medium
CN112771889A (en) Audio channel replacing method and related equipment
CN113852944A (en) Audio output method and device
CN114639392A (en) Audio processing method and device, electronic equipment and storage medium
CN114173319A (en) Method and device for realizing cross-platform call, cloud mobile phone platform and storage medium
CN106612375B (en) Mobile terminal and sound effect processing method thereof

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