Audio processing method and device
By obtaining and using call parameters to process the audio signal when the electronic device wears the protective case, the audio signal loudness and call quality problems caused by the protective case are solved, and the audio signal is adjusted to improve call quality.
Patent Information
- Application Number
- CN202210653760.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-10
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-06-10
AI Technical Summary
When electronic devices wear protective covers, the audio signal loudness and call quality are degraded during the call.
By obtaining the call parameters corresponding to the protective case when the electronic device wears the protective case, and processing the first audio signal based on these parameters during the call, overall gain adjustment, filtering processing, dynamic gain adjustment and amplitude adjustment are performed, A second audio signal is obtained for output.
Effectively weaken or eliminate the impact of the protective case on the audio signal, avoid decreasing loudness, and improve call quality.
Smart Images

Figure CN115038016B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and specifically to a call audio processing method and device. Background Art
[0002] With the rapid development of electronic devices, electronic devices such as mobile phones and tablet computers play an increasingly important role in people's work, life, entertainment, etc. Users usually install protective cases for electronic devices to prevent them from being damaged.
[0003] In the prior art, when an electronic device is equipped with a protective cover, the front cavity environment of the electronic device will change compared to the bare device state because the protective cover has a certain thickness and is easy to interfere with the receiver area of the electronic device, resulting in reduced loudness of the audio signal during a call and reduced call quality. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an audio processing method and device, which can solve the technical problem that the loudness of the audio signal during a call is reduced and the call quality is reduced due to the electronic device wearing a protective cover.
[0005] In a first aspect, an embodiment of the present application provides an audio processing method, the method comprising: when an electronic device is wearing a protective cover, obtaining call parameters corresponding to the protective cover; during a call, processing a first audio signal of the electronic device based on the call parameters to obtain a second audio signal; and outputting the second audio signal.
[0006] In a second aspect, an embodiment of the present application provides an audio processing device, which includes: an acquisition unit, used to acquire call parameters corresponding to the protective cover when the electronic device is wearing a protective cover; a processing unit, used to process a first audio signal of the electronic device based on the call parameters during a call to obtain a second audio signal; and an output unit, used to output the second audio signal.
[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect above are implemented.
[0009] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0011] In the embodiment of the present application, by obtaining the call parameters corresponding to the protective cover when the electronic device is wearing the protective cover, and processing the first audio signal of the electronic device based on the call parameters during the call, a second audio signal is obtained, thereby outputting the second audio signal. As a result, under the influence of the protective cover equipped on the electronic device, the audio signal of the electronic device can be adjusted for the protective cover worn, so as to reduce or eliminate the influence of the protective cover on the audio signal, thereby avoiding the reduction of the loudness of the audio signal during the call and improving the call quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 is a flowchart of an audio processing method provided in an embodiment of the present application;
[0013] Figure 2 is a schematic diagram of a protective cover in an embodiment of the present application;
[0014] Figure 3 is a schematic diagram of an electronic device in an embodiment of the present application;
[0015] Figure 4 Schematic diagram of the detection principle of the Hall sensor in the embodiment of the present application;
[0016] Figure 5 is a schematic diagram of a receiver sound outlet area of an electronic device in an embodiment of the present application;
[0017] Figure 6 is a schematic diagram of a receiver opening area of a protective cover in an embodiment of the present application;
[0018] Figure 7 It is one of the schematic diagrams of the application scenario of the audio processing method of the embodiment of the present application;
[0019] Figure 8 is a schematic diagram of the effect of dynamically adjusting the gain of a first audio signal by using a dynamic gain adjustment parameter in an embodiment of the present application;
[0020] Fig. 9 is a schematic diagram of the processing effect of the audio processing method in the embodiment of the present application;
[0021] Fig.10 This is a second schematic diagram of an application scenario of the audio processing method of an embodiment of the present application;
[0022] Fig.11 is a structural diagram of an audio processing device provided in an embodiment of the present application;
[0023] Fig.12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0024] Fig.13 It is a schematic diagram of the hardware structure of an electronic device suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0026] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0027] The audio processing method and device provided in the embodiments of the present application are described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0028] Please refer to Figure 1 , which shows one of the flow charts of the audio processing method provided in the embodiment of the present application. The audio processing method provided in the embodiment of the present application can be applied to electronic devices. In practice, the above electronic device can be an electronic device with a call function, such as a smart phone, a tablet computer, a laptop, a wearable device, etc.
[0029] The process of the audio processing method provided in the embodiment of the present application includes the following steps:
[0030] Step 101: When the electronic device is wearing a protective cover, obtain call parameters corresponding to the protective cover.
[0031] In this embodiment, the electronic device can detect whether it is wearing a protective cover. For example, the electronic device can be equipped with a sensor for detecting the wearing state of the protective cover, and based on the sensor, it can detect whether the protective cover is worn. For another example, the electronic device can receive user input and determine whether the protective cover is worn based on the user input. The above input can be used to indicate whether the electronic device is currently in the protective cover wearing state, for example, it can be a setting input for the protective cover wearing state.
[0032] In this embodiment, different types of protective covers may correspond to different call parameters. The call parameters corresponding to each protective cover may be pre-set based on a large amount of historical data and historical experiments, and pre-stored in the electronic device. The above call parameters may be used to adjust the first audio signal of the electronic device. The above first audio signal may be an audio signal received by the electronic device, for example, an audio signal sent by the opposite end device that establishes the call. The electronic device may first identify the protective cover when the protective cover is worn. For example, the protective cover may be identified by receiving user input. Then, the call parameters corresponding to the protective cover are obtained.
[0033] Step 102: During a call, based on the call parameters, a first audio signal of the electronic device is processed to obtain a second audio signal.
[0034] In this embodiment, during a call, the electronic device may receive an audio signal of the electronic device, and the electronic device may use the audio signal as a first audio signal, and process the first audio signal based on the acquired call parameters to obtain a second audio signal.
[0035] In some optional implementations, the call parameter may include at least one of the following: an overall gain adjustment parameter, a filtering parameter, a dynamic gain adjustment parameter, and an amplitude threshold. Accordingly, the processing of the first audio signal may include at least one of the following: performing overall gain adjustment on the first audio signal based on the overall gain adjustment parameter; performing filtering processing on the first audio signal based on the filtering parameter; performing dynamic gain adjustment on the first audio signal based on the dynamic gain adjustment parameter; and adjusting the amplitude of the first audio signal based on the amplitude threshold.
[0036] The above-mentioned overall gain adjustment parameter may be used to enhance the signal strength of the first audio signal as a whole, so that the overall loudness of the output sound is increased.
[0037] The filtering parameters may include parameters of one or more filters. The filter may be used to filter the first audio signal. The filter may include but is not limited to at least one of the following: a finite impulse response (FIR) filter and an infinite impulse response (IIR) filter.
[0038] The above dynamic gain adjustment parameters can be used to perform different gain compensation for signals of different loudness. For example, signals below -60dB can be considered as noise and can be suppressed; for signals from -60dB to -30dB and -30dB to -15dB, different gains can be assigned according to the signal attenuation, where the signal attenuation corresponding to different protective covers can be determined based on historical data; for signals from -15dB to 0dB, suppression can be performed to reduce or eliminate noise.
[0039] The amplitude threshold can be used to adjust the amplitude of the first audio signal. For example, if the amplitude of the first audio signal is greater than the amplitude threshold, the amplitude of the first audio signal can be set to the amplitude threshold to prevent excessive signal gain from causing distortion or noise.
[0040] By processing the first audio signal based on the call parameters, the audio signal of the electronic device can be adjusted according to the protective cover worn when the electronic device is equipped with the protective cover, so as to weaken or eliminate the influence of the protective cover on the audio signal, thereby avoiding the reduction of the loudness of the audio signal during the call and improving the call quality.
[0041] Step 103: output a second audio signal.
[0042] In this embodiment, a component for outputting an audio signal may be installed in the electronic device. The electronic device may output the second audio signal through the component.
[0043] In some optional implementations, the above-mentioned element may include a receiver. A receiver, also known as an earpiece, is an electroacoustic device that converts an audio electrical signal into a sound signal without sound leakage, and is widely used in communication terminal devices such as mobile phones, fixed phones, and hearing aids. The electronic device may output the second audio signal through the receiver.
[0044] The method provided by the above-mentioned embodiment of the present application obtains the call parameters corresponding to the protective cover when the electronic device is wearing the protective cover, and processes the first audio signal of the electronic device based on the call parameters during the call to obtain the second audio signal, thereby outputting the second audio signal. As a result, under the influence of the protective cover equipped on the electronic device, the audio signal of the electronic device can be adjusted for the protective cover worn, so as to reduce or eliminate the influence of the protective cover on the audio signal, thereby avoiding the reduction of the loudness of the audio signal during the call and improving the call quality.
[0045] In some optional embodiments, the electronic device may be equipped with a magnetic detection element. The magnetic detection element can be used to detect the strength of the magnetic field. In practice, the magnetic detection element can adopt a Hall sensor, an electronic compass, etc., which is not limited here. The protective cover may be provided with a magnetic part. The magnetic part may include but is not limited to a magnet. The above-mentioned magnet may be a natural magnet or an artificial magnet (such as a magnet), which is not specifically limited here.
[0046] As an example, see Figure 2 The protective cover is a schematic diagram of the protective cover shown in FIG. 1 , which can be applied to an electronic device with a folding screen. The magnetic member can be pasted or sewn into the protective cover, as shown by reference numeral 201. Figure 3 Schematic diagram of an electronic device shown, the electronic device may be an electronic device with a folding screen. A magnetic detection element may be provided in the electronic device, as shown by reference numeral 301. When the electronic device is wearing a protective cover, the position of the magnetic part in the protective cover may be set based on the position of the magnetic detection element in the electronic device, so that the magnetic detection element can be located in the magnetic field generated by the magnetic part.
[0047] On this basis, before the above step 101 is executed, the electronic device can detect the magnetic field strength through the magnetic detection element. When the magnetic field strength meets the preset conditions (such as being greater than or equal to the preset threshold), it can be determined that the electronic device is wearing a protective cover, and the above steps 101 to 103 can be executed. On the contrary, when the magnetic field strength does not meet the preset conditions (such as being less than the preset threshold), it can be determined that the electronic device is not wearing a protective cover.
[0048] Take the Hall sensor as an example, see Figure 4 The schematic diagram of the detection principle of the Hall sensor shown in the figure. When a magnetic field perpendicular to the direction of the current I is applied to the internal conductor of the Hall sensor, the electrons in the wire will be aggregated by the Lorentz force, thereby generating an electric field in the direction of electron aggregation. This electric field will cause the subsequent electrons to be affected by the electric force and balance the Lorentz force caused by the magnetic field, so that the electrons can pass smoothly without deviation and the electric field remains stable. The Hall sensor can measure the electric field strength, and thus obtain the magnetic field strength based on the Hall effect formula. The Hall effect formula is as follows:
[0049]
[0050] Where v is the speed of the electron, h is the height of the conductor, U is the electric field strength, B is the magnetic field strength, and e is the electron. The electron speed v is constant, the conductor height h is known, and the Hall sensor can obtain the magnetic field strength B by measuring the electric field strength U.
[0051] By installing a magnetic detection element in the electronic device and setting a magnetic part in the protective cover, the electronic device can quickly detect whether it is wearing a protective cover through the magnetic detection element, thereby eliminating the need for the user to manually input the protective cover wearing status information, thereby improving the convenience and flexibility of protective cover wearing detection.
[0052] In some optional embodiments, the electronic device may be equipped with a receiver. In the above step 103, the above second audio signal may be output through the receiver. Correspondingly, the above protective cover may be provided with a receiver opening area. Through experiments, it is found that the smaller the size of the receiver opening area in the protective cover, the more significant the change in the front cavity environment of the electronic device, and the lower the loudness of the sound output by the receiver. Also, the greater the thickness of the protective cover, the more significant the change in the front cavity environment of the electronic device, and the lower the loudness of the sound output by the receiver. Thus, the protective cover can be classified according to the thickness of the protective cover and / or the size of the receiver opening area, and different identifications can be set for different types of protective covers. Among them, at least one of the following items of the protective cover corresponding to different identifications may be different: the size of the receiver opening area, the thickness of the protective cover.
[0053] As an example, see Figure 5 Schematic diagram of the receiver sound hole area of the electronic device shown. The electronic device may be a mobile phone with a folding screen. To ensure that the user can answer the phone in the folded state, a sound hole needs to be opened for the receiver at the top of the front of the mobile phone, as shown by reference numeral 501. To increase the screen-to-body ratio of the mobile phone, the receiver sound hole may be provided with a micro-slit for sound output. Figure 6 To prevent the protective cover from covering the sound outlet of the receiver, a receiver opening area needs to be opened in the corresponding area on the top of the protective cover, as shown by reference numeral 601.
[0054] In some optional embodiments, the sizes of the magnetic parts in the protective cover corresponding to different identifications may be different, thereby generating different magnetic field strengths. The electronic device may pre-store the correspondence between the identification of the protective cover, call parameters, and magnetic field strength. In the above step 101, the electronic device may first determine the identification of the protective cover based on the magnetic field strength determined by the magnetic field detection element (such as a Hall sensor). Then, based on the determined identification of the protective cover, the call parameters corresponding to the protective cover are obtained. The magnetic field strength detected by the magnetic field detection element (such as a Hall sensor) can conveniently, quickly and accurately identify the identification of the protective cover being worn, thereby obtaining accurate call parameters. In this process, no manual input is required, reducing labor costs.
[0055] Figure 7 One of the application scenarios of the audio processing method of this embodiment is shown. The electronic device 700 may include a processor 701, a magnetic field detection element 702 (such as a Hall sensor), an audio codec 703, a receiver 704, and a power supply 705. In this scenario, the power supply 705 can power the entire system. The magnetic field detection element 702 (such as a Hall sensor) can first detect the magnetic field strength to determine whether the electronic device is wearing a protective cover based on the magnetic field strength. If a protective cover is worn, the magnetic field strength detection data can be sent to the processor 701 through the IIC (Inter-Integrated Circuit, integrated circuit) bus. Afterwards, the processor 701 can determine the identification of the protective cover based on the received magnetic field strength detection data, thereby obtaining the call parameters. During the call, the processor 702 can send the call parameters to the audio codec 703 through the IIS (Inter-Integrated Circuit Sound, serial digital audio protocol) bus, so that the audio codec 703 processes the first audio signal of the electronic device based on the call parameters to obtain the second audio signal. Finally, the audio codec 703 may drive the receiver to produce sound, so that the receiver converts the second audio signal into an analog signal (ie, sound) and then outputs it.
[0056] In this scenario, the call parameters may include parameters such as overall gain adjustment parameters, filtering parameters, dynamic gain adjustment parameters, and amplitude thresholds. When the first audio signal of the electronic device is processed based on the call parameters, overall gain adjustment, filtering processing, dynamic gain adjustment, amplitude adjustment, etc. may be performed in sequence based on the call parameters. As an example, Figure 8 FIG. 4 shows a schematic diagram of the effect of dynamically adjusting the gain of a first audio signal using a dynamic gain adjustment parameter. Figure 8As shown, signals below -60dB can be considered as noise and can be suppressed; for signals from -60dB to -30dB and from -30dB to -15dB, different gains can be assigned according to the signal attenuation, wherein the signal attenuation corresponding to different protective covers can be determined based on historical data; for signals from -15dB to 0dB, suppression can be performed to reduce or eliminate noise. Fig. 9 A schematic diagram showing the processing effect of an embodiment of the present application is shown. Fig. 9 As shown, the horizontal axis is frequency, in Hertz (Hz). The vertical axis is the sound unit, which represents the ability to convert electrical signals into sound signals, in Pa / V. Through testing, it was found that the treatment effect met the expected requirements.
[0057] In some optional embodiments, to reduce costs, an electronic compass may be used as a magnetic field detection element. Since the magnetic field detection accuracy of an electronic compass is usually lower than that of a Hall sensor, the identification of the protective cover may be determined with the help of a microphone installed in the electronic device.
[0058] Specifically, the electronic device may output a first noise signal during the idle time of a call. The first noise signal may be output through a receiver. During the output of the first noise signal, the microphone may pick up a sound signal, and the sound signal picked up by the microphone may be used as a second noise signal. The electronic device may determine the identification of the protective cover based on the first noise signal and the second noise signal. For example, the first noise signal and the second noise signal may be subjected to loudness analysis to determine the loudness attenuation. Since different types of protective covers have different loudness attenuation conditions, the electronic device may pre-store the loudness attenuation information of each type of protective cover. Therefore, the electronic device may determine the identification of the protective cover currently being worn based on the determined loudness attenuation condition, and thereby obtain the call parameters corresponding to the protective cover based on the identification.
[0059] Fig.10The second application scenario of the audio processing method of this embodiment is shown. The electronic device 1000 may include a processor 1001, a magnetic field detection element 1002 (e.g., an electronic compass), an audio codec 1003, a receiver 1004, a microphone 1005, and a power supply 1006. In this scenario, the power supply 1006 can power the entire system. The magnetic field detection element 1002 (e.g., a Hall sensor) can first detect the magnetic field strength to determine whether the electronic device is wearing a protective cover based on the magnetic field strength. In the case of wearing a protective cover, the processor 1001 can generate a first noise signal, which is driven by the audio codec 1003 to output the receiver 1004. The microphone 1005 can synchronously pick up the sound signal, obtain a second noise signal, and send it to the processor 1001. The processor can determine the identification of the protective cover based on the first noise signal and the second noise signal, thereby obtaining a pass parameter based on the identification. Furthermore, during the call, the audio signal is processed in a manner similar to that in the above embodiment.
[0060] By replacing the Hall sensor with an electronic compass, the hardware cost can be reduced. By using the noise signal picked up by the microphone to identify the currently worn protective cover, the call parameters can be dynamically adjusted when the user changes the protective cover, thereby adapting to more protective covers and improving the flexibility of audio signal processing.
[0061] It should be noted that the audio processing method provided in the embodiment of the present application can be executed by an audio processing device. In the embodiment of the present application, the audio processing method provided in the embodiment of the present application is described by taking an audio processing device executing the loaded audio processing method as an example.
[0062] like Fig.11 As shown, the audio processing device 1100 of this embodiment includes: an acquisition unit 1101, which is used to acquire call parameters corresponding to the protective cover when the electronic device is wearing a protective cover; a processing unit 1102, which is used to process the first audio signal of the electronic device based on the call parameters during the call to obtain a second audio signal; and an output unit 1103, which is used to output the second audio signal.
[0063] Optionally, the protective cover is provided with a magnetic part, and the electronic device is installed with a magnetic detection element. The device further includes: a detection unit for detecting the magnetic field strength through the magnetic detection element; and a determination unit for determining that the electronic device is wearing a protective cover when the magnetic field strength meets a preset condition. By installing a magnetic detection element in the electronic device and providing a magnetic part in the protective cover, the electronic device can quickly detect whether it is wearing a protective cover through the magnetic detection element, thereby eliminating the need for the user to manually input the protective cover wearing status information, thereby improving the convenience and flexibility of protective cover wearing detection.
[0064] Optionally, the acquisition unit is further used to: determine the identification of the protective cover based on the magnetic field strength; obtain the call parameters corresponding to the protective cover based on the identification; wherein the sizes of the magnetic parts in the protective cover corresponding to different identifications are different. The magnetic field strength detected by the magnetic field detection element (such as a Hall sensor) can conveniently, quickly and accurately identify the identification of the protective cover being worn, thereby obtaining accurate call parameters. In this process, no manual input is required, reducing labor costs.
[0065] Optionally, the electronic device is equipped with a microphone; the acquisition unit is further used to: output a first noise signal during idle time of a call, and acquire a second noise signal picked up by the microphone during the output of the first noise signal; determine the identification of the protective cover based on the first noise signal and the second noise signal; and acquire the call parameters corresponding to the protective cover based on the identification. By using the noise signal picked up by the microphone to identify the currently worn protective cover, the call parameters can be dynamically adjusted when the user changes the protective cover, thereby adapting to more protective covers and improving the flexibility of audio signal processing.
[0066] Optionally, the electronic device is equipped with a receiver, and the protective cover has a receiver opening area; the protective covers corresponding to different logos have at least one of the following differences: thickness, size of the receiver opening area; the output unit is further used to: output the second audio signal through the receiver.
[0067] Optionally, the call parameters include at least one of the following: overall gain adjustment parameter, filtering parameter, dynamic gain adjustment parameter, amplitude threshold; the processing unit is further used for at least one of the following: based on the overall gain adjustment parameter, overall gain adjustment of the first audio signal; based on the filtering parameter, filtering the first audio signal; based on the dynamic gain adjustment parameter, dynamic gain adjustment of the first audio signal; based on the amplitude threshold, adjusting the amplitude of the first audio signal. In this way, the overall loudness of the output sound can be increased, while noise, distortion, etc. can be reduced or eliminated, thereby improving the call quality.
[0068] The device provided by the above-mentioned embodiment of the present application obtains the call parameters corresponding to the protective cover when the electronic device is wearing the protective cover, and processes the first audio signal of the electronic device based on the call parameters during the call to obtain the second audio signal, thereby outputting the second audio signal. As a result, under the influence of the protective cover equipped on the electronic device, the audio signal of the electronic device can be adjusted for the protective cover worn, so as to reduce or eliminate the influence of the protective cover on the audio signal, thereby avoiding the reduction of the loudness of the audio signal during the call and improving the call quality.
[0069] The audio processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0070] The audio processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0071] The audio processing device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0072] Alternatively, if Fig.12 As shown, an embodiment of the present application further provides an electronic device 1200, including a processor 1201 and a memory 1202, wherein the memory 1202 stores programs or instructions that can be executed on the above-mentioned processor 1201, and when the program or instructions are executed by the processor 1201, the various steps of the above-mentioned audio processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0073] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0074] Fig.13 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0075] The electronic device 1300 includes but is not limited to: a radio frequency unit 1301, a network module 1302, an audio output unit 1303, an input unit 1304, a sensor 1305, a display unit 1306, a user input unit 1307, an interface unit 1308, a memory 1309, and a processor 1310 and other components.
[0076] Those skilled in the art will appreciate that the electronic device 1300 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1310 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.13 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0077] Among them, the processor 1310 is used to obtain call parameters corresponding to the protective cover when the electronic device is wearing a protective cover; during the call, based on the call parameters, the first audio signal of the electronic device is processed to obtain a second audio signal; the audio output unit 1303 is used to output the second audio signal.
[0078] In the embodiment of the present application, by obtaining the call parameters corresponding to the protective cover when the electronic device is wearing the protective cover, and processing the first audio signal of the electronic device based on the call parameters during the call, a second audio signal is obtained, thereby outputting the second audio signal. As a result, under the influence of the protective cover equipped on the electronic device, the audio signal of the electronic device can be adjusted for the protective cover worn, so as to reduce or eliminate the influence of the protective cover on the audio signal, thereby avoiding the reduction of the loudness of the audio signal during the call and improving the call quality.
[0079] Optionally, the protective cover is provided with a magnetic part, and the electronic device is installed with a magnetic detection element. The processor 1310 is further used to detect the magnetic field strength through the magnetic detection element; when the magnetic field strength meets a preset condition, it is determined that the electronic device is wearing a protective cover. By installing a magnetic detection element in the electronic device and providing a magnetic part in the protective cover, the electronic device can quickly detect whether it is wearing a protective cover through the magnetic detection element, thereby eliminating the need for the user to manually input the protective cover wearing status information, thereby improving the convenience and flexibility of protective cover wearing detection.
[0080] Optionally, the processor 1310 is further used to determine the identification of the protective cover based on the magnetic field strength; based on the identification, obtain the call parameters corresponding to the protective cover; wherein the sizes of the magnetic parts in the protective cover corresponding to different identifications are different. The magnetic field strength detected by the magnetic field detection element (such as a Hall sensor) can conveniently, quickly and accurately identify the identification of the protective cover being worn, thereby obtaining accurate call parameters. In this process, no manual input is required, reducing labor costs.
[0081] Optionally, the electronic device is equipped with a microphone; the processor 1310 is further used to control the audio output unit 1303 to output a first noise signal during the idle time of the call, and to obtain a second noise signal picked up by the microphone during the output of the first noise signal; based on the first noise signal and the second noise signal, determine the identification of the protective cover; based on the identification, obtain the call parameters corresponding to the protective cover. By using the noise signal picked up by the microphone to identify the currently worn protective cover, the call parameters can be dynamically adjusted when the user changes the protective cover, thereby adapting to more protective covers and improving the flexibility of audio signal processing.
[0082] Optionally, the electronic device is equipped with a receiver, and the protective cover has a receiver opening area; the protective covers corresponding to different logos have at least one of the following differences: thickness, size of the receiver opening area; the audio output unit 1303 is further used to output the second audio signal through the receiver.
[0083] Optionally, the call parameters include at least one of the following: overall gain adjustment parameter, filtering parameter, dynamic gain adjustment parameter, amplitude threshold; the processor 1310 is further used for at least one of the following: based on the overall gain adjustment parameter, overall gain adjustment of the first audio signal; based on the filtering parameter, filtering the first audio signal; based on the dynamic gain adjustment parameter, dynamic gain adjustment of the first audio signal; based on the amplitude threshold, adjusting the amplitude of the first audio signal. In this way, the overall loudness of the output sound can be increased, while noise, distortion, etc. can be reduced or eliminated, thereby improving the call quality.
[0084] It should be understood that in the embodiment of the present application, the input unit 1304 may include a graphics processor (Graphics Processing Unit, GPU) 13041 and a microphone 13042, and the graphics processor 13041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1306 may include a display panel 13061, and the display panel 13061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1307 includes a touch panel 13071 and at least one of other input devices 13072. The touch panel 13071 is also called a touch screen. The touch panel 13071 may include two parts: a touch detection device and a touch controller. Other input devices 13072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0085] The memory 1309 can be used to store software programs and various data. The memory 1309 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1309 may include a volatile memory or a non-volatile memory, or the memory 1309 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1309 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0086] The processor 1310 may include one or more processing units; optionally, the processor 1310 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1310.
[0087] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned audio processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0088] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0089] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned audio processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0090] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0091] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned audio processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0092] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0094] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An audio processing method, characterized in that: The method comprises: When the electronic device is wearing a protective cover, obtaining call parameters corresponding to the protective cover; During the call, based on the call parameter, the first audio signal of the electronic device is processed to obtain a second audio signal; outputting the second audio signal; The protective cover is provided with a magnetic member, and the electronic device is installed with a magnetic detection element; The method further comprises: Detecting the magnetic field intensity by means of the magnetic detection element; When the magnetic field strength meets a preset condition, determining that the electronic device is wearing a protective cover; The obtaining of call parameters corresponding to the protective cover includes: Based on the magnetic field strength, determining an identification of the protective cover; Based on the identifier, obtaining call parameters corresponding to the protective cover; Among them, at least one of the size of the magnetic part in the protective cover, the size of the receiver opening area and the thickness of the protective cover corresponding to different logos is different.
2. The method according to claim 1, characterized in that The electronic device is equipped with a microphone; The obtaining of call parameters corresponding to the protective cover includes: During the idle time of a call, a first noise signal is output, and during the process of outputting the first noise signal, a second noise signal picked up by the microphone is acquired; determining an identification of the protective cover based on the first noise signal and the second noise signal; Based on the identifier, a call parameter corresponding to the protective cover is obtained.
3. The method according to claim 1 or 2, characterized in that: The electronic device is equipped with a receiver, and the protective cover is provided with a receiver opening area; The outputting the second audio signal comprises: The second audio signal is output through the receiver.
4. The method according to claim 1, characterized in that: The call parameter includes at least one of the following: an overall gain adjustment parameter, a filtering parameter, a dynamic gain adjustment parameter, and an amplitude threshold; and the processing of the first audio signal of the electronic device based on the call parameter includes at least one of the following: Based on the overall gain adjustment parameter, performing overall gain adjustment on the first audio signal; Based on the filtering parameter, filtering the first audio signal; Based on the dynamic gain adjustment parameter, dynamically adjust the gain of the first audio signal; The amplitude of the first audio signal is adjusted based on the amplitude threshold.
5. An audio processing device, characterized in that: The device comprises: an acquisition unit, configured to acquire call parameters corresponding to the protective cover when the electronic device is wearing the protective cover; a processing unit, configured to process the first audio signal of the electronic device based on the call parameter during the call to obtain a second audio signal; an output unit, configured to output the second audio signal; The protective cover is provided with a magnetic member, and the electronic device is installed with a magnetic detection element; The device is also used for: Detecting the magnetic field intensity by means of the magnetic detection element; When the magnetic field strength meets a preset condition, determining that the electronic device is wearing a protective cover; The acquisition unit is specifically used for: Based on the magnetic field strength, determining an identification of the protective cover; Based on the identifier, obtaining call parameters corresponding to the protective cover; Among them, at least one of the size of the magnetic part in the protective cover, the size of the receiver opening area and the thickness of the protective cover corresponding to different logos is different.
6. The device according to claim 5, characterized in that The call parameters include at least one of the following: an overall gain adjustment parameter, a filtering parameter, a dynamic gain adjustment parameter, and an amplitude threshold; The processing unit is further configured to: Based on the overall gain adjustment parameter, performing overall gain adjustment on the first audio signal; Based on the filtering parameter, filtering the first audio signal; Based on the dynamic gain adjustment parameter, dynamically adjust the gain of the first audio signal; The amplitude of the first audio signal is adjusted based on the amplitude threshold.
7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the audio processing method according to any one of claims 1 to 4 are implemented.
8. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the audio processing method according to any one of claims 1 to 4 are implemented.
