Audio processing method and device, electronic equipment and storage medium
By using the digital signal processing module in electronic devices, the masking effect is utilized to reduce the headphone audio signal, thus solving the problem of hearing damage caused by prolonged headphone use and achieving hearing protection without affecting the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2023-11-14
- Publication Date
- 2026-05-15
AI Technical Summary
Wearing headphones for extended periods can damage a user's hearing. Current technology protects hearing by lowering the volume, but this affects the user experience.
By utilizing the masking effect in psychoacoustics, the signal value of the second audio signal adjacent to the first audio signal is reduced, thus producing a masking effect and obtaining an output audio signal. The digital signal processing module in the electronic device is then used for audio signal backup and marking, and large signals are filtered out for reduction processing.
It effectively reduces the objective output energy of sound, protects hearing from damage, maintains the subjective listening experience, and does not require frequency band processing, thus reducing the computational power requirement.
Smart Images

Figure CN120015007B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information technology, and in particular to an audio processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the popularity of mobile devices and short videos, people are wearing headphones for extended periods of time. For example, users are watching videos more and more often, and ensuring that the viewing experience is not affected while protecting users' hearing during long viewing sessions is a current pain point. For instance, wearing headphones for extended periods while watching short videos on a mobile phone can damage a user's hearing.
[0003] Currently, hearing protection measures on terminal devices mainly rely on prompting users to lower the volume, but this method can negatively impact user experience. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this disclosure provides an audio processing method, apparatus, electronic device, and storage medium to overcome the problem of hearing damage caused by prolonged headphone use.
[0005] According to a first aspect of the present disclosure, an audio processing method is provided, comprising:
[0006] A first audio signal is determined from the initial audio based on the signal value of the audio signal in the initial audio.
[0007] The signal value of the second audio signal adjacent to the first audio signal is reduced to obtain the output audio signal; wherein, the first audio signal and the second audio signal produce a masking effect;
[0008] Based on the output audio signal, the audio to be played is obtained.
[0009] In some embodiments, determining the first audio signal from the initial audio based on the signal value of the audio signal in the initial audio includes:
[0010] The initial audio is backed up to obtain backup audio;
[0011] Based on the signal value of the audio signal in the backup audio, a third audio signal is determined from the backup audio;
[0012] The third audio signal is marked based on its position in the backup audio to obtain the mark bit of the third audio signal;
[0013] The first audio signal is determined from the initial audio based on each of the stated marker bits.
[0014] In some embodiments, determining a third audio signal from the backup audio based on the signal value of the audio signal in the backup audio includes:
[0015] Determine the first signal difference between the signal values of two adjacent audio signals in the backup audio;
[0016] If the difference between the first signals is greater than the first signal threshold, the largest of the two adjacent audio signals is determined as the third audio signal.
[0017] In some embodiments, determining the first audio signal from the initial audio based on the signal value of the audio signal in the initial audio includes:
[0018] Determine the second signal difference between the signal values of two adjacent audio signals in the initial audio;
[0019] If the difference between the second signals is greater than the second signal threshold, the larger of the two adjacent audio signals is determined as the first audio signal.
[0020] In some embodiments, the method further includes:
[0021] A first adjustment value is determined based on the signal values of the first audio signal and the second audio signal;
[0022] The step of reducing the signal value of the second audio signal adjacent to the first audio signal to obtain the output audio signal includes:
[0023] The output audio signal is obtained based on the signal value of the second audio signal and the first adjustment value.
[0024] In some embodiments, the method further includes:
[0025] During audio playback, hearing protection mode is activated based on detected trigger events;
[0026] Determining the first audio signal from the initial audio based on the signal value of the audio signal in the initial audio includes:
[0027] When the hearing protection mode is successfully activated, the first audio signal is determined from the initial audio based on the signal value of the audio signal in the initial audio.
[0028] In some embodiments, reducing the signal value of the second audio signal adjacent to the first audio signal to obtain the output audio signal includes:
[0029] When hearing protection mode is successfully enabled, adjustment controls are displayed on the interface.
[0030] Determine a second adjustment value corresponding to the adjustment operation applied to the adjustment control;
[0031] The output audio signal is obtained based on the signal value of the second audio signal and the second adjustment value.
[0032] According to a second aspect of the present disclosure, an audio processing apparatus is provided, comprising:
[0033] The first determining module is configured to determine a first audio signal from the initial audio based on the signal value of the audio signal in the initial audio.
[0034] The adjustment module is configured to reduce the signal value of the second audio signal adjacent to the first audio signal to obtain an output audio signal; wherein the first audio signal and the second audio signal produce a masking effect.
[0035] The acquisition module is configured to obtain the audio to be played based on the output audio signal.
[0036] In some embodiments, the first determining module is configured to:
[0037] The initial audio is backed up to obtain backup audio;
[0038] Based on the signal value of the audio signal in the backup audio, a third audio signal is determined from the backup audio;
[0039] The third audio signal is marked based on its position in the backup audio to obtain the mark bit of the third audio signal;
[0040] The first audio signal is determined from the initial audio based on each of the stated marker bits.
[0041] In some embodiments, the first determining module is configured to:
[0042] Determine the first signal difference between the signal values of two adjacent audio signals in the backup audio;
[0043] If the difference between the first signals is greater than the first signal threshold, the largest of the two adjacent audio signals is determined as the third audio signal.
[0044] In some embodiments, the first determining module is configured to:
[0045] Determine the second signal difference between the signal values of two adjacent audio signals in the initial audio;
[0046] If the difference between the second signals is greater than the second signal threshold, the larger of the two adjacent audio signals is determined as the first audio signal.
[0047] In some embodiments, the apparatus further includes:
[0048] The second determining module is configured to determine a first adjustment value based on the signal value of the first audio signal and the signal value of the second audio signal;
[0049] The adjustment module is configured as follows:
[0050] The output audio signal is obtained based on the signal value of the second audio signal and the first adjustment value.
[0051] In some embodiments, the apparatus further includes:
[0052] The processing module is configured to activate hearing protection mode based on detected trigger events during audio playback.
[0053] The first determining module is configured as follows:
[0054] When the hearing protection mode is successfully activated, the first audio signal is determined from the initial audio based on the signal value of the audio signal in the initial audio.
[0055] In some embodiments, the adjustment module is configured to:
[0056] When hearing protection mode is successfully enabled, adjustment controls are displayed on the interface.
[0057] Determine a second adjustment value corresponding to the adjustment operation applied to the adjustment control;
[0058] The output audio signal is obtained based on the signal value of the second audio signal and the second adjustment value.
[0059] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0060] processor;
[0061] Memory configured to store processor-executable instructions;
[0062] The processor is configured to implement the steps of any of the audio processing methods in the first aspect described above during execution.
[0063] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform any of the audio processing methods described in the first aspect above.
[0064] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0065] The technical solution disclosed herein reduces the influence of the masking effect by reducing the second audio signal that has a masking effect with the first audio signal to the output audio signal. By utilizing the masking effect in psychoacoustics for hearing protection, it effectively reduces the objective output energy of sound, thereby reducing the sound radiation of the music playback device to the human ear, and does not cause the human ear to perceive a decrease in sound volume, that is, the subjective hearing remains unchanged; and it does not require frequency band processing, thus reducing the computational power requirements.
[0066] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0067] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0068] Figure 1 This is a flow chart of an audio processing method according to an exemplary embodiment. Figure 1 .
[0069] Figure 2 This is a flow chart of an audio processing method according to an exemplary embodiment. Figure 2 .
[0070] Figure 3 This is a block diagram of an audio processing apparatus according to an exemplary embodiment.
[0071] Figure 4 This is a hardware structure block diagram of an electronic device 800 according to an exemplary embodiment. Detailed Implementation
[0072] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0073] Figure 1This is a flow chart of an audio processing method according to an exemplary embodiment. Figure 1 ,like Figure 1 As shown, the method mainly includes the following steps:
[0074] In step 101, a first audio signal is determined from the initial audio based on the signal value of the audio signal in the initial audio.
[0075] In step 102, the signal value of the second audio signal adjacent to the first audio signal is reduced to obtain the output audio signal; wherein, the first audio signal and the second audio signal have a masking effect.
[0076] In step 103, the audio to be played is obtained based on the output audio signal.
[0077] It should be noted that this method can be applied to electronic devices. Electronic devices can include terminal devices. Terminal devices can include mobile terminals and fixed terminals, such as mobile phones, tablets, PDAs, laptops, desktop computers, wearable devices, smart speakers, televisions, and in-vehicle terminals.
[0078] Wearable devices can include portable devices that are worn directly on the user's body or integrated into the user's accessories. For example, they can include head-supported wearable devices (including headphones, glasses, helmets, headbands, etc.). They can also include smart clothing, backpacks, canes, accessories, etc.
[0079] In some embodiments, the electronic device may have an audio playback function, for example, it may be headphones with an audio playback function.
[0080] In some embodiments, when audio playback is required, initial audio can be acquired and the signal values of each audio signal in the initial audio can be determined. Then, a first audio signal and a second audio signal adjacent to the first audio signal can be determined from the initial audio. The second audio signal is the next audio signal adjacent to the first audio signal, and the signal value of the first audio signal is greater than the signal value of the second audio signal.
[0081] In some embodiments, determining the first audio signal from the initial audio based on the signal value of the audio signal in the initial audio includes:
[0082] Determine the second signal difference between the signal values of two adjacent audio signals in the initial audio;
[0083] If the difference between the second signals is greater than the second signal threshold, the larger of the two adjacent audio signals is determined as the first audio signal.
[0084] In this embodiment of the disclosure, after acquiring the initial audio, a second signal difference between the signal values of two adjacent audio signals in the initial audio can be determined. After obtaining each second signal difference, the second signal difference can be compared with a second signal threshold. If the second signal difference is greater than the second signal threshold, the audio signal with the largest value among the two adjacent audio signals is determined as the first audio signal. In this way, each first audio signal can be determined from the initial audio; that is, there can be at least one first audio signal in this disclosure.
[0085] After determining the first audio signal, the next audio signal (the second audio signal) adjacent to the first audio signal can be determined. In this embodiment of the disclosure, by determining the second signal difference between the signal values of two adjacent audio signals in the initial audio, and when the second signal difference is greater than a second signal threshold, the largest audio signal among the two adjacent audio signals is determined as the first audio signal. This allows for the filtering of large signals that meet the conditions from the initial audio, thereby accurately reducing the small signals adjacent to the large signals. This improves the accuracy of audio processing and results in a better output effect for the audio to be played.
[0086] It should be noted that the initial audio is the audio that is initially to be played. Because the first audio signal and the adjacent second audio signal in the initial audio will have a masking effect—that is, the second audio signal constitutes a masking sound for the first audio signal—when a user listens to sound using an electronic device, the first audio signal is immediately followed by the second audio signal. The second audio signal is radiated to the human ear, but from a perceptual perspective, the second audio signal is equivalent to being ineffective. The first audio signal can be a large signal, and the second audio signal can be a small signal immediately following that large signal.
[0087] In some embodiments, after determining a first audio signal and a second audio signal adjacent to the first audio signal, the signal value of the second audio signal can be reduced to obtain an output audio signal, and then the audio to be played can be obtained based on the output audio signal.
[0088] If a user is in a noisy environment and is listening to music through headphones, a small signal following a large signal radiates to the ear, but from a perceptual perspective, this sound is essentially ineffective. In this embodiment, by reducing the second audio signal, which has a masking effect on the first audio signal, to the output audio signal, the influence of the masking effect can be reduced. Hearing protection is achieved by utilizing the masking effect in psychoacoustics, effectively reducing the objective output energy of the sound, thereby reducing the sound radiation from the music playback device to the ear, without causing the user to perceive a decrease in sound volume, i.e., the subjective listening experience remains unchanged; and no frequency band processing is required, reducing the computational power requirement.
[0089] In some embodiments, determining the first audio signal from the initial audio based on the signal value of the audio signal in the initial audio includes:
[0090] The initial audio is backed up to obtain backup audio;
[0091] Based on the signal value of the audio signal in the backup audio, a third audio signal is determined from the backup audio;
[0092] The third audio signal is marked based on its position in the backup audio to obtain the mark bit of the third audio signal;
[0093] The first audio signal is determined from the initial audio based on each of the stated marker bits.
[0094] In some embodiments, the initial audio (original audio signal) can be backed up using a digital signal processing (DSP) module in the electronic device to obtain a backup audio signal (analyzed audio signal). For example, the original audio signal S1 can be copied in the DSP module to obtain the analyzed audio signal S2.
[0095] After obtaining the backup audio, the third audio signal can be determined from the backup audio based on the signal value of the audio signal in the backup audio. The third audio signal is then marked based on its position in the backup audio to obtain the mark bits of the third audio signal. Finally, the first audio signal is determined from the initial audio based on each mark bit.
[0096] In some embodiments, determining a third audio signal from the backup audio based on the signal value of the audio signal in the backup audio includes:
[0097] Determine the first signal difference between the signal values of two adjacent audio signals in the backup audio;
[0098] If the difference between the first signals is greater than the first signal threshold, the largest of the two adjacent audio signals is determined as the third audio signal.
[0099] In this embodiment of the disclosure, after obtaining the backup audio, a first signal difference between the signal values of two adjacent audio signals in the backup audio can be determined. After obtaining each first signal difference, the first signal difference can be compared with a first signal threshold. If the first signal difference is greater than the first signal threshold, the largest audio signal among the two adjacent audio signals is determined as the third audio signal. In this way, each third audio signal can be determined from the backup audio; that is, there can be at least one third audio signal in this disclosure.
[0100] In this embodiment of the disclosure, by determining the first signal difference between the signal values of two adjacent audio signals in the backup audio, and when the first signal difference is greater than the first signal threshold, the largest audio signal among the two adjacent audio signals is determined as the third audio signal, thus enabling the filtering of large signals that meet the conditions from the backup audio.
[0101] After the third audio signal is determined, it can be marked based on its position in the backup audio to obtain the mark bits of the third audio signal. Then, the first audio signal can be determined from the initial audio based on each mark bit.
[0102] Since the backup audio and the initial audio are exactly the same, the marker bit of the third audio signal in the backup audio corresponds to the position of the first audio signal in the initial audio. In this embodiment, by backing up the backup audio and determining the first audio signal based on the marker bit of the third audio signal in the backup audio, the impact of audio processing on the initial audio can be reduced. Using the masking effect model in psychoacoustics, each audio signal is judged according to a pre-set first signal threshold (difference between large and small signals), and large signal detection and marking are performed on the backup audio. Since the backup audio and the initial audio are exactly the same, the marker bit of the backup audio is used to suppress small signals after large signals in the initial audio, and the suppression depth can be self-adjusted.
[0103] In some embodiments, the method further includes:
[0104] A first adjustment value is determined based on the signal values of the first audio signal and the second audio signal;
[0105] The step of reducing the signal value of the second audio signal adjacent to the first audio signal to obtain the output audio signal includes:
[0106] The output audio signal is obtained based on the signal value of the second audio signal and the first adjustment value.
[0107] In this embodiment of the disclosure, a first adjustment value can be determined based on the difference between the signal values of a first audio signal and a second audio signal. The output audio signal is then determined based on the difference between the signal value of the second audio signal and the first adjustment value.
[0108] In other embodiments, after obtaining the first adjustment value, the first adjustment value can be weighted to obtain a first weighted adjustment value. Then, the output audio signal is obtained based on the signal value of the second audio signal and the first weighted adjustment value. For example, the output audio signal can be determined based on the difference between the signal value of the second audio signal and the first weighted adjustment value.
[0109] In this embodiment of the disclosure, a first adjustment value can be automatically determined based on the signal values of the first audio signal and the second audio signal, and then the second audio signal can be adjusted based on the first adjustment value. This improves the intelligence of audio processing and makes the audio to be played smoother and more natural.
[0110] In this embodiment of the disclosure, after the finally suppressed output audio signal is obtained, the audio to be played can be played to the user through an audio playback module (e.g., headphones). Compared with the initial audio, the audio to be played retains the large signals but suppresses many small signals, thereby reducing the sound radiation of the audio playback module to the human ear and achieving the effect of hearing protection.
[0111] In some embodiments, the method further includes:
[0112] During audio playback, hearing protection mode is activated based on detected trigger events;
[0113] Determining the first audio signal from the initial audio based on the signal value of the audio signal in the initial audio includes:
[0114] When the hearing protection mode is successfully activated, the first audio signal is determined from the initial audio based on the signal value of the audio signal in the initial audio.
[0115] In some embodiments, the application interface can be configured for user input to trigger events. For example, when an audio playback event is detected, a touch control can be displayed on the application interface. If the user clicks on the touch control, it is determined that a trigger event has been detected. At this point, hearing protection mode can be activated based on the trigger event.
[0116] In this embodiment of the disclosure, when a user needs hearing protection, they can select to enable the hearing protection mode in the application interface UI window. By providing a trigger entry point for the user, the user can enable or disable the hearing protection mode according to their needs, thereby improving the convenience of using electronic devices.
[0117] In some embodiments, reducing the signal value of the second audio signal adjacent to the first audio signal to obtain the output audio signal includes:
[0118] When hearing protection mode is successfully enabled, adjustment controls are displayed on the interface.
[0119] Determine a second adjustment value corresponding to the adjustment operation applied to the adjustment control;
[0120] The output audio signal is obtained based on the signal value of the second audio signal and the second adjustment value.
[0121] In this embodiment of the present disclosure, when the hearing protection mode is successfully enabled, the adjustment control can be displayed on the display interface, and a second adjustment value corresponding to the adjustment operation applied to the adjustment control can be determined. Based on the signal value of the second audio signal and the second adjustment value, the output audio signal is obtained.
[0122] The adjustment control can be a progress bar displayed on the screen, allowing the user to drag the progress bar to determine the corresponding second adjustment value, thereby obtaining the output audio signal based on the signal value of the second audio signal and the second adjustment value. Alternatively, the adjustment control can be a selection control with different level indicators displayed on the user interface, allowing the user to select different selection controls to determine the corresponding second adjustment value, thereby obtaining the output audio signal based on the signal value of the second audio signal and the second adjustment value.
[0123] In some embodiments, the output audio signal can be obtained based on the difference between the signal value of the second audio signal and the second adjustment value. In other embodiments, after obtaining the second adjustment value, the second adjustment value can be weighted to obtain a second weighted adjustment value, and then the output audio signal can be obtained based on the signal value of the second audio signal and the second weighted adjustment value. For example, the output audio signal can be determined based on the difference between the signal value of the second audio signal and the second weighted adjustment value.
[0124] In this embodiment of the disclosure, adjustment controls are displayed on the display interface, so that the user can determine the corresponding second adjustment value based on the adjustment controls, thereby determining the suppression depth of the second audio signal. Since the user can hear the audio through the audio playback module, the user can make corresponding adjustments through the adjustment controls according to their own audio perception, so that the adjusted audio to be played is more suitable for the user's usage needs, thereby improving the user experience.
[0125] Figure 2 This is a flow chart of an audio processing method according to an exemplary embodiment. Figure 2 ,like Figure 2As shown, when the central processing unit (CPU) of the electronic device detects a hearing protection on / off command, it can send the hearing protection on / off command to the application processor (AP) of the audio processing module. The audio processing module can send the initial audio (raw audio data) to the digital signal processing module (DSP module). The audio processing module can compress the initial audio based on the method in any of the above embodiments to obtain the audio to be played (processed audio data), and send the processed audio data to the digital-to-analog converter for digital-to-analog conversion, and play the audio through the audio playback device.
[0126] The technical solution disclosed herein reduces the influence of the masking effect by reducing the second audio signal that has a masking effect with the first audio signal to the output audio signal. By utilizing the masking effect in psychoacoustics for hearing protection, it effectively reduces the objective output energy of sound, thereby reducing the sound radiation of the music playback device to the human ear, and does not cause the human ear to perceive a decrease in sound volume, that is, the subjective hearing remains unchanged; and it does not require frequency band processing, thus reducing the computational power requirements.
[0127] Figure 3 This is a block diagram illustrating an audio processing apparatus according to an exemplary embodiment. Figure 3 As shown, the audio processing device 300 mainly includes:
[0128] The first determining module 301 is configured to determine a first audio signal from the initial audio based on the signal value of the audio signal in the initial audio.
[0129] The adjustment module 301 is configured to reduce the signal value of the second audio signal adjacent to the first audio signal to obtain an output audio signal; wherein the first audio signal and the second audio signal produce a masking effect.
[0130] The acquisition module 303 is configured to obtain the audio to be played based on the output audio signal.
[0131] In some embodiments, the first determining module 301 is configured as follows:
[0132] The initial audio is backed up to obtain backup audio;
[0133] Based on the signal value of the audio signal in the backup audio, a third audio signal is determined from the backup audio;
[0134] The third audio signal is marked based on its position in the backup audio to obtain the mark bit of the third audio signal;
[0135] The first audio signal is determined from the initial audio based on each of the stated marker bits.
[0136] In some embodiments, the first determining module 301 is configured as follows:
[0137] Determine the first signal difference between the signal values of two adjacent audio signals in the backup audio;
[0138] If the difference between the first signals is greater than the first signal threshold, the largest of the two adjacent audio signals is determined as the third audio signal.
[0139] In some embodiments, the first determining module 301 is configured as follows:
[0140] Determine the second signal difference between the signal values of two adjacent audio signals in the initial audio;
[0141] If the difference between the second signals is greater than the second signal threshold, the larger of the two adjacent audio signals is determined as the first audio signal.
[0142] In some embodiments, the device 300 further includes:
[0143] The second determining module is configured to determine a first adjustment value based on the signal value of the first audio signal and the signal value of the second audio signal;
[0144] The adjustment module 302 is configured as follows:
[0145] The output audio signal is obtained based on the signal value of the second audio signal and the first adjustment value.
[0146] In some embodiments, the device 300 further includes:
[0147] The processing module is configured to activate hearing protection mode based on detected trigger events during audio playback.
[0148] The first determining module 301 is configured as follows:
[0149] When the hearing protection mode is successfully activated, the first audio signal is determined from the initial audio based on the signal value of the audio signal in the initial audio.
[0150] In some embodiments, the adjustment module 302 is configured to:
[0151] When hearing protection mode is successfully enabled, adjustment controls are displayed on the interface.
[0152] Determine a second adjustment value corresponding to the adjustment operation applied to the adjustment control;
[0153] The output audio signal is obtained based on the signal value of the second audio signal and the second adjustment value.
[0154] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0155] Figure 4 This is a hardware structure block diagram illustrating an electronic device 800 according to an exemplary embodiment. For example, device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, wearable device, etc.
[0156] Reference Figure 4 The device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0157] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0158] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of this data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0159] Power supply component 806 provides power to various components of device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 800.
[0160] Multimedia component 808 includes a screen that provides an output interface between device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0161] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0162] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0163] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of device 800, changes in the position of device 800 or a component of device 800, the presence or absence of user contact with device 800, the orientation or acceleration / deceleration of device 800, and temperature changes of device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0164] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Device 800 can access wireless networks based on communication standards, such as Wi-Fi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0165] In an exemplary embodiment, device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0166] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0167] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform an audio processing method, the method comprising:
[0168] A first audio signal is determined from the initial audio based on the signal value of the audio signal in the initial audio.
[0169] The signal value of the second audio signal adjacent to the first audio signal is reduced to obtain the output audio signal; wherein, the first audio signal and the second audio signal produce a masking effect;
[0170] Based on the output audio signal, the audio to be played is obtained.
[0171] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0172] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. An audio processing method, characterized in that, include: A first audio signal is determined from the initial audio based on the signal value of the audio signal in the initial audio. The signal value of the second audio signal adjacent to the first audio signal is reduced to obtain the output audio signal; wherein, the second audio signal is the next audio signal adjacent to the first audio signal; the signal value of the first audio signal is greater than the signal value of the second audio signal; the first audio signal and the second audio signal produce a masking effect; Based on the output audio signal, the audio to be played is obtained.
2. The method according to claim 1, characterized in that, Determining the first audio signal from the initial audio based on the signal value of the audio signal in the initial audio includes: The initial audio is backed up to obtain backup audio; Based on the signal value of the audio signal in the backup audio, a third audio signal is determined from the backup audio; The third audio signal is marked based on its position in the backup audio to obtain the mark bit of the third audio signal; The first audio signal is determined from the initial audio based on each of the stated marker bits.
3. The method according to claim 2, characterized in that, Determining a third audio signal from the backup audio based on the signal value of the audio signal in the backup audio includes: Determine the first signal difference between the signal values of two adjacent audio signals in the backup audio; If the difference between the first signals is greater than the first signal threshold, the largest of the two adjacent audio signals is determined as the third audio signal.
4. The method according to claim 1, characterized in that, Determining the first audio signal from the initial audio based on the signal value of the audio signal in the initial audio includes: Determine the second signal difference between the signal values of two adjacent audio signals in the initial audio; If the difference between the second signals is greater than the second signal threshold, the larger of the two adjacent audio signals is determined as the first audio signal.
5. The method according to claim 1, characterized in that, The method further includes: A first adjustment value is determined based on the signal values of the first audio signal and the second audio signal; The step of reducing the signal value of the second audio signal adjacent to the first audio signal to obtain the output audio signal includes: The output audio signal is obtained based on the signal value of the second audio signal and the first adjustment value.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: During audio playback, hearing protection mode is activated based on detected trigger events; Determining the first audio signal from the initial audio based on the signal value of the audio signal in the initial audio includes: When the hearing protection mode is successfully activated, the first audio signal is determined from the initial audio based on the signal value of the audio signal in the initial audio.
7. The method according to any one of claims 1 to 5, characterized in that, The step of reducing the signal value of the second audio signal adjacent to the first audio signal to obtain the output audio signal includes: When hearing protection mode is successfully enabled, adjustment controls are displayed on the interface. Determine a second adjustment value corresponding to the adjustment operation applied to the adjustment control; The output audio signal is obtained based on the signal value of the second audio signal and the second adjustment value.
8. An audio processing apparatus, characterized in that, include: The first determining module is configured to determine a first audio signal from the initial audio based on the signal value of the audio signal in the initial audio. The adjustment module is configured to reduce the signal value of a second audio signal adjacent to the first audio signal to obtain an output audio signal; wherein, the second audio signal is the next audio signal adjacent to the first audio signal; the signal value of the first audio signal is greater than the signal value of the second audio signal; the first audio signal and the second audio signal produce a masking effect; The acquisition module is configured to obtain the audio to be played based on the output audio signal.
9. An electronic device, characterized in that, include: processor; Memory configured to store processor-executable instructions; The processor is configured to implement the steps of any one of the audio processing methods of claims 1 to 7 during execution.
10. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform any one of the audio processing methods of claims 1 to 7.