Audio processing method and device, equipment and storage medium
By acquiring and analyzing the ambient sound signal of the audio playback device, and combining hearing loss and environmental gain data, the target sound gain parameters are determined, which solves the problem of unclear audio in noisy environments and achieves clear audio output in different environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG XIAOTIANCAI TECH CO LTD
- Filing Date
- 2024-11-05
- Publication Date
- 2026-05-08
AI Technical Summary
Existing audio playback devices, relying on gain parameters based on hearing loss, cannot effectively counteract the ambient sound masking effect in noisy environments, resulting in users being unable to hear the audio content clearly.
By acquiring ambient sound signals collected by the audio playback device, calculating the loudness of different frequency bands, and combining preset hearing loss gain data and ambient sound gain parameters, the target sound gain data is determined and sent to the audio playback device for gain processing.
It improves the user's auditory experience in different environments, ensures that the audio content is clear and audible, and adapts to the user's individual hearing loss situation.
Smart Images

Figure CN122002179A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and to, but is not limited to, an audio processing method, apparatus, device, and storage medium. Background Technology
[0002] Headphones, hearing aids, and neckband speakers are commonly used to play music and other audio content, providing users with an immersive auditory experience. Some audio playback devices offer sound amplification functions for users with hearing impairments, such as the elderly or those with hearing loss. This means that the audio signal is appropriately amplified before playback based on the user's actual hearing loss, thereby improving the user's auditory experience.
[0003] In related technologies, some audio playback devices with sound gain functions can output clear audio content to users in quiet environments. However, in noisy environments, relying solely on sound gain parameters determined based on hearing loss to process the audio signal may not be able to counteract the masking effect of ambient noise on the audio output of the audio playback device, resulting in users being unable to hear the audio content clearly. Summary of the Invention
[0004] In view of this, the audio processing method, apparatus, device, and storage medium provided in the embodiments of this application can perform gain processing on audio based on ambient sound and the user's hearing loss, thereby improving the user's auditory experience in different environments. The audio processing method, apparatus, device, and storage medium provided in the embodiments of this application are implemented as follows:
[0005] A first aspect of this application provides an audio processing method applied to an electronic device, the electronic device being communicatively connected to an audio playback device, the method comprising:
[0006] Acquire ambient sound signals collected by the audio playback device, and calculate loudness data corresponding to the ambient sound signals. The loudness data includes the frequency band loudness corresponding to different frequency bands in the ambient sound signals.
[0007] Based on the loudness of the frequency bands corresponding to the different frequency bands and the preset hearing loss gain data, the target sound gain data is determined. The preset hearing loss gain data includes hearing loss sound gain parameters corresponding to the different frequency bands.
[0008] The target sound gain data is sent to the audio playback device.
[0009] In conjunction with the first aspect, in some possible embodiments, the target sound gain data includes target sound gain parameters corresponding to different frequency bands, and determining the target sound gain data based on the loudness of the frequency bands corresponding to the different frequency bands and preset hearing loss gain data includes:
[0010] Based on the frequency band loudness and preset gain mapping relationship corresponding to the different frequency bands, the ambient sound gain parameters corresponding to the different frequency bands are determined. The preset gain mapping relationship includes the mapping relationship between preset frequency band loudness and preset ambient sound gain parameters.
[0011] Based on a preset fusion coefficient, the hearing loss sound gain parameters corresponding to different frequency bands and the ambient sound gain parameters corresponding to different frequency bands are fused to obtain the target sound gain parameters corresponding to different frequency bands, thereby determining the target sound gain data.
[0012] In conjunction with the first aspect, in some possible embodiments, the loudness of the frequency bands corresponding to the different frequency bands in the ambient sound signal is the average loudness of the ambient sound signal in each frequency band, wherein each frequency band corresponding to the ambient sound signal is the same as each frequency band corresponding to the preset hearing loss gain data.
[0013] In conjunction with the first aspect, in some possible embodiments, before acquiring the ambient sound signal collected by the audio playback device, the method further includes:
[0014] Acquire the sound signal collected by the audio playback device;
[0015] Extract the voiceprint features corresponding to the sound signal, and determine the preset hearing loss gain data corresponding to the voiceprint features in the preset voiceprint library.
[0016] In conjunction with the first aspect, in some possible embodiments, the electronic device includes a display screen, and the method further includes:
[0017] The audio gain compensation setting interface is displayed on the screen, and the audio gain compensation setting interface includes a gain compensation enable control.
[0018] In response to a touch operation on the gain compensation enable control, the audio gain compensation function is enabled to send the target sound gain data to the audio playback device.
[0019] In conjunction with the first aspect, in some possible embodiments, the electronic device includes a display screen, and the method further includes:
[0020] The gain compensation method setting interface is displayed on the screen, and the gain compensation method setting interface includes dynamic compensation controls.
[0021] In response to a touch operation on the dynamic compensation control, the target sound gain data is determined based on the frequency loudness corresponding to the different frequency bands and the preset hearing loss gain data.
[0022] A second aspect of this application provides an audio processing method applied to an audio playback device, the method comprising:
[0023] Collect ambient sound signals and calculate the loudness data corresponding to the ambient sound signals. The loudness data includes the frequency band loudness corresponding to different frequency bands in the ambient sound signals.
[0024] Based on the loudness of the frequency bands corresponding to the different frequency bands and the preset hearing loss gain data, the target sound gain data is determined. The preset hearing loss gain data includes hearing loss sound gain parameters corresponding to the different frequency bands.
[0025] Play audio based on the target sound gain data.
[0026] In conjunction with the second aspect, in some possible embodiments, the audio playback device is communicatively connected to an electronic device, and the method further includes:
[0027] Acquire the target voiceprint features sent by the electronic device and the target hearing loss gain data corresponding to the target voiceprint features, and store the target voiceprint features and the target hearing loss gain data in a preset voiceprint library;
[0028] Before acquiring the ambient sound signal, the method further includes:
[0029] Acquire sound signals;
[0030] Extract the voiceprint features corresponding to the sound signal, and determine the preset hearing loss gain data corresponding to the voiceprint features in the preset voiceprint library.
[0031] A third aspect of this application provides an audio processing apparatus, which is communicatively connected to an audio playback device, comprising:
[0032] The first data acquisition module is used to acquire the ambient sound signal collected by the audio playback device and calculate the loudness data corresponding to the ambient sound signal. The loudness data includes the frequency band loudness corresponding to different frequency bands in the ambient sound signal.
[0033] The first gain processing module is used to determine target sound gain data based on the frequency loudness corresponding to the different frequency bands and preset hearing loss gain data, wherein the preset hearing loss gain data includes hearing loss sound gain parameters corresponding to different frequency bands; and to send the target sound gain data to the audio playback device.
[0034] A fourth aspect of this application provides an audio processing apparatus, comprising:
[0035] The second data acquisition module is used to collect ambient sound signals and calculate the loudness data corresponding to the ambient sound signals. The loudness data includes the frequency band loudness corresponding to different frequency bands in the ambient sound signals.
[0036] The second gain processing module is used to determine the target sound gain data based on the frequency loudness corresponding to the different frequency bands and the preset hearing loss gain data, wherein the preset hearing loss gain data includes hearing loss sound gain parameters corresponding to different frequency bands;
[0037] An audio playback module is used to play audio based on the target sound gain data.
[0038] A fifth aspect of this application provides a computer device including a memory and a processor, the memory storing a computer program executable on the processor, the processor executing the program to implement the steps of the method described in the first or second aspect of the embodiments of this application.
[0039] A sixth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first or second aspect of the embodiments of this application.
[0040] Compared with related technologies, the audio processing method, apparatus, device, and storage medium provided in the embodiments of this application have at least the following beneficial effects:
[0041] In this embodiment, by acquiring ambient sound signals collected by an audio playback device connected to an electronic device, the loudness of different frequency bands in the ambient sound signal can be calculated. Since different frequency bands of sound are perceived differently by humans, and hearing-impaired individuals may experience more severe hearing loss in certain frequency bands, calculating the loudness of these different frequency bands helps to more comprehensively reflect the noise distribution of the environment in which the audio playback device is located, thus providing appropriate gain data. Then, by combining the loudness of these different frequency bands with preset hearing loss gain data, the target sound gain parameters for subsequent audio gain processing can be determined. The preset hearing loss gain data reflects the hearing loss status of the audio playback device user, including hearing loss sound gain parameters corresponding to different frequency bands. Finally, the obtained target sound gain data is sent to the audio playback device, enabling the audio playback device to perform gain processing on the audio based on the target sound gain data. This allows the user to hear the audio content clearly in different environments, improving the user experience of the electronic device and audio playback device. Attached Figure Description
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0043] Figure 1 This is a schematic diagram of the structure of the electronic device and audio playback device disclosed in the embodiments of this application;
[0044] Figure 2 This is a schematic flowchart of an audio processing method disclosed in an embodiment of this application;
[0045] Figure 3 This is another schematic flowchart of the audio processing method disclosed in the embodiments of this application;
[0046] Figure 4 This is a schematic flowchart illustrating the activation of the gain compensation function in the audio processing method disclosed in this application.
[0047] Figure 5 This is a schematic diagram of an electronic device display screen showing an audio gain compensation setting interface as disclosed in an embodiment of this application.
[0048] Figure 6 This is a schematic flowchart illustrating the setting of a gain compensation method in the audio processing method disclosed in the embodiments of this application;
[0049] Figure 7 This is a schematic diagram of an interface for setting the gain compensation method on the display screen of an electronic device disclosed in an embodiment of this application.
[0050] Figure 8 This is a schematic diagram of an electronic device display screen showing an audio playback device settings interface as disclosed in an embodiment of this application.
[0051] Figure 9 This is another schematic flowchart of the audio processing method disclosed in the embodiments of this application;
[0052] Figure 10 This is a schematic flowchart of an audio processing method disclosed in an embodiment of this application applied to an audio playback device;
[0053] Figure 11 A schematic diagram of the structure of an audio processing device provided in an embodiment of this application;
[0054] Figure 12 This is another schematic diagram of the audio processing apparatus provided in the embodiments of this application;
[0055] Figure 13 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific technical solutions of this application will be further described in detail below with reference to the accompanying drawings of the embodiments of this application. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0058] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0059] It should be noted that the terms "first, second, third" used in the embodiments of this application are used to distinguish similar or different objects and do not represent a specific order of objects. It can be understood that "first, second, third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0060] With technological advancements and increasing public awareness of health and quality of life, audio playback devices with hearing aid functions, such as headphones, hearing aids, or neckband speakers, are gaining popularity among users with hearing impairments, including the elderly and those with hearing loss. These devices can amplify sounds that hearing-impaired individuals could not hear or could not clearly perceive, utilizing their residual hearing to send the processed sound to the brain's auditory center, thus enabling them to perceive sound and greatly facilitating their daily lives.
[0061] Because hearing loss can vary greatly among users—for example, encompassing high-frequency or low-frequency hearing loss, mild or severe hearing loss—highly personalized gain adjustments are required for sound processing. Only by tailoring the fitting process to each user's specific hearing loss can appropriate sound signal enhancement be implemented to ensure that the hearing aid meets each user's unique needs and provides a clearer, more natural auditory experience. After fitting the user, the audio playback device processes and outputs the audio signal based on the obtained sound gain data.
[0062] However, when using audio playback devices, users are affected not only by the audio being played but also by ambient noise. This is especially true for some audio playback devices that employ an open-back design with the output end (speaker or oscillator) not entering the ear to improve wearing comfort, making them more susceptible to external influences during use. For example, some audio playback devices can provide clear audio output in quiet environments. However, when the environment becomes noisy, such as in a train station or shopping mall, using only sound gain parameters set based on the user's hearing loss to process the audio signal may not be sufficient to provide a high-quality listening experience, and may even prevent the user from clearly hearing the audio content.
[0063] In view of this, embodiments of this application provide an audio processing method, apparatus, device, and storage medium that can perform gain processing on audio based on ambient sound and the user's hearing loss, thereby improving the user's auditory experience in different environments.
[0064] The electronic device provided in this application embodiment can be a smartwatch or an earphone case, etc., with a cavity for housing an audio playback device. The electronic device can also be a mobile phone, tablet computer, etc., which establishes a connection with the audio playback device via wired or wireless means. The audio playback device provided in this application embodiment can include, but is not limited to, Bluetooth headphones (e.g., true wireless stereo, TWS) headphones, neckband headphones, wired headphones, Bluetooth speakers, etc.
[0065] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of the electronic device and audio playback device disclosed in the embodiments of this application.
[0066] like Figure 1 As shown, in some possible embodiments, the electronic device is a watch 10, and the audio playback device is headphones 20. The watch 10 may include a display screen 11 and a receiving cavity capable of housing the headphones 20. Figure 1 (Not shown in the image). For example... Figure 1 As shown in section (a), when not in use, the earphone 20 can be stored in the housing of the watch 10, and the watch 10 charges the earphone 20. The earphone 20 may include a left earphone and a right earphone worn on the user's left and right ears, respectively.
[0067] In some possible embodiments, the watch 10 can function as a standalone smart device with built-in software content. Users can control the applications used by the watch 10 through the display screen 11, buttons, or the touch area of the earphone to meet the user's daily usage needs.
[0068] In some possible embodiments, the left and right earphones included in the earphone 20 are two earphones with the same structure, and there is no distinction in the placement position in the receiving cavity (that is, the two earphones can be put into any hole above or below). After the user wears them, the system will automatically detect them according to a preset recognition mechanism or algorithm. For example, it can use an accelerometer to determine whether any earphone unit is worn in the user's left or right ear based on the collected inertial information, and control the switching of the left and right channels to play the corresponding audio. This is not limited here.
[0069] It should be noted that, as Figure 1 The watch 10 and earphone 20 shown in parts (a) and (b) are merely examples, and the storage location of the earphone 20 in the watch 10 is not limited. In some embodiments, the receiving cavity for storing the earphone 20 may be located on the sides of the watch 10 or on the back of the display screen 11 of the watch 10, which is not limited here.
[0070] In some possible embodiments, watch 10 can communicate with other electronic devices or servers via a communication network. The communication network can be a wired network or a wireless network. For example, the communication network can be a local area network (LAN) or a wide area network (WAN), such as the Internet. When the communication network is a LAN, for example, it can be a short-range communication network such as a wireless fidelity (WiFi) hotspot network, a WiFi P2P network, a Bluetooth network, a Zigbee network, or a near field communication (NFC) network. When the communication network is a WAN, for example, it can be a 3rd generation wireless telephone technology (3G) network, a 4th generation mobile communication technology (4G) network, a 5th generation mobile communication technology (5G) network, a future public land mobile network (PLMN), or the Internet.
[0071] In some possible embodiments, one or more apps (Applications) can be installed on the watch 10. An app, often shortened to application, is a software program capable of performing one or more specific functions. Installed applications may include instant messaging applications, video applications, audio applications, image capture applications, cloud desktop applications, drawing applications, and so on. The applications mentioned in this application embodiment may be system applications pre-installed on the watch 10 at the factory, or third-party applications downloaded by the user from the network or obtained from other electronic devices during the use of the watch 10.
[0072] In some possible embodiments, the watch 10 may include, but is not limited to, running Android, Windows, or other operating systems.
[0073] In some possible embodiments, the watch 10 and the earphone 20 can establish a Bluetooth Low Energy (BLE) connection to enable the watch 10 to control the functions of the earphone 20, such as adjusting the playback volume or playback content.
[0074] In some possible embodiments, when the earphone 20 is removed and used, the watch 10 and the earphone 20 can establish a classic Bluetooth BT connection so that the earphone 20 can play the audio content corresponding to the application running on the watch 10.
[0075] It should be noted that the protocol versions of Bluetooth Low Energy or Bluetooth Classic mentioned above can be configured according to actual needs, and no restrictions are imposed here.
[0076] In some possible embodiments, the earphone 20 is provided with a microphone ( Figure 1 (Not shown in the image), the earphone 20 can collect ambient sound signals of its surroundings through the microphone.
[0077] It should be noted that due to the significant differences in size and power consumption between the watch 10 and the earphone 20, their data processing capabilities differ considerably. The watch 10 can obtain the ambient sound signal collected by the microphone of the earphone 20 through the communication connection established with the earphone 20, combine it with the preset hearing loss gain data, determine the target sound gain data, and send the target sound gain data back to the earphone 20 so that the earphone 20 can adjust the sound output in real time according to the target sound gain data to ensure that the user hears clear audio content.
[0078] Please see Figure 2 , Figure 2 This is a schematic flowchart of an audio processing method disclosed in an embodiment of this application, such as... Figure 2 The audio processing method shown, when applied to an electronic device, may include the following steps:
[0079] Step 201: Obtain the ambient sound signal collected by the audio playback device and calculate the loudness data corresponding to the ambient sound signal.
[0080] In this embodiment, the electronic device is communicatively connected to the audio playback device. The audio playback device is used to play audio content to the user. Taking headphones, hearing aids, or neckband speakers as examples, the distance between the audio playback device and the user's ear is usually smaller than the distance between the user's ear and electronic devices such as watches, headphone cases, and mobile phones. Therefore, the ambient sound signal collected by the audio playback device can reflect the noise situation within a certain range around the user's ear, providing data support for subsequently determining the target sound gain parameters.
[0081] In some possible embodiments, the audio playback device includes a microphone, which can capture ambient sound signals.
[0082] It should be noted that since various sound sources in the environment are not fixed and may change at any time, to ensure that the target sound gain data generated by the electronic device can effectively enhance the audio content to be played, the electronic device can automatically reacquire the ambient sound signal collected by the audio playback device at preset time intervals. This ensures that the target sound gain data received by the audio playback device can be dynamically adjusted in real time, preventing the device from maintaining a high gain when ambient sound is removed or failing to achieve an effective gain when ambient sound increases. This achieves intelligent management of sound gain, improving the adaptability of audio playback and optimizing the user's listening experience.
[0083] In some possible embodiments, the preset time interval for the electronic device to automatically acquire the ambient sound signal collected by the audio playback device, and the audio duration corresponding to the ambient sound signal can be determined according to the performance of the electronic device or the audio playback device (including but not limited to computing power and power consumption), or set according to the user's sensitivity requirements for sound gain processing, which is not limited here.
[0084] In this embodiment of the application, the loudness data corresponding to the ambient sound signal includes the frequency band loudness corresponding to different frequency bands in the ambient sound signal.
[0085] It should be noted that in related technical fields, loudness is generally defined as the subjective perception of sound intensity by the human ear. It is one of the physical properties of sound and is related to both the amplitude and frequency of the sound. Frequency band, on the other hand, refers to the range of sound frequencies. Different frequency bands correspond to different sound characteristics, such as low, mid, and high frequencies. For user groups such as the elderly or hearing-impaired individuals, their ability to perceive sound across different frequency bands (ranges or intervals of sound frequencies) may differ.
[0086] Therefore, when acquiring loudness data corresponding to ambient sound signals, it is possible to obtain the loudness of different frequency bands instead of the overall loudness of the ambient sound signal. This provides more detailed and accurate sound characteristic information for generating target sound gain data, offering users precise sound gain services and improving their auditory experience.
[0087] Step 202: Determine the target sound gain data based on the frequency loudness corresponding to different frequency bands and the preset hearing loss gain data.
[0088] In this embodiment, the preset hearing loss gain data includes hearing loss sound gain parameters corresponding to different frequency bands. This preset hearing loss gain data can reflect the hearing loss status of users using electronic devices and audio playback devices.
[0089] It should be noted that in a quiet environment (where the loudness of each frequency band is less than the preset loudness threshold), the audio data can be amplified and played using the preset hearing loss gain data, allowing the user to hear clear audio content.
[0090] In this embodiment of the application, the target sound gain data can be determined by combining the loudness of the frequency band corresponding to different frequency bands and the hearing loss sound gain parameters corresponding to different frequency bands in the preset hearing loss gain data.
[0091] In some possible embodiments, the target sound gain data includes target sound gain parameters corresponding to different frequency bands. The target sound gain data is determined based on the loudness of the corresponding frequency bands and preset hearing loss gain data, including:
[0092] Based on the frequency loudness and preset gain mapping relationship corresponding to different frequency bands, the ambient sound gain parameters corresponding to different frequency bands are determined. The preset gain mapping relationship includes the mapping relationship between preset frequency band loudness and preset ambient sound gain parameters.
[0093] Based on the preset fusion coefficient, the hearing loss sound gain parameters corresponding to different frequency bands and the ambient sound gain parameters corresponding to different frequency bands are fused to obtain the target sound gain parameters corresponding to different frequency bands, thereby determining the target sound gain data.
[0094] It should be noted that the target sound gain data includes target sound gain parameters corresponding to different frequency bands. After receiving the target sound gain data, the audio playback device performs different levels of gain processing on the signal components of different frequency bands in the audio content to be played, according to the target sound gain parameters corresponding to different frequency bands. For example, the signal components in the 500Hz to 1000Hz frequency band are given a gain of "+20dB" according to the target sound gain data, and the signal components in the 100Hz to 1500Hz frequency band are given a gain of "+30dB" to meet the hearing loss conditions of users in different frequency bands.
[0095] Furthermore, the preset gain mapping relationship includes the mapping relationship between preset frequency band loudness and preset ambient sound gain parameters. It is understandable that, within the same frequency band, different frequency band loudnesses may correspond to different ambient sound gain parameters. Conversely, within different frequency bands, the same frequency band loudness may correspond to different ambient sound gain parameters.
[0096] In some possible embodiments, the preset gain mapping relationship can be determined by a statistical model based on extensive audiological research and data from feedback from different users in various environments. The statistical model typically considers the perceived loudness of different ambient sounds (including ambient sounds of different frequency bands and loudness levels) and the gain compensation required for users with different levels of hearing loss to listen to audio played by an audio playback device under different ambient sound conditions. By analyzing and processing these statistical models, a preset gain mapping relationship applicable to different ambient sound conditions can be obtained according to preset frequency band division rules.
[0097] In some possible embodiments, the preset gain mapping relationship can also be determined based on the masking effect strength between different characteristic frequency bands. The presence of one sound reduces the auditory sensitivity of the human ear to another. This effect is common in daily life; for example, in noisy environments, it is difficult for people to hear the details of conversations or music. Different frequency bands may produce different masking effects. For example, low-frequency pure tones can effectively mask high-frequency pure tones, but the masking effect of high-frequency pure tones on low-frequency pure tones is not significant. Also, human voices are relatively difficult to mask. Therefore, corresponding ambient sound gain parameters can be set for different frequency bands and loudness levels. For example, a higher ambient sound gain parameter can be set for frequency bands commonly associated with human voices, so that users can hear audio content containing human voices played by the audio playback device more clearly.
[0098] After determining the ambient sound gain parameters corresponding to different frequency bands, the hearing loss sound gain parameters and ambient sound gain parameters corresponding to different frequency bands can be fused according to the preset fusion coefficients to obtain target sound gain data including target sound gain parameters corresponding to different frequency bands.
[0099] It should be noted that the preset fusion coefficients can include fusion sub-coefficients corresponding to different frequency bands, or the same preset fusion coefficients can be used for fusion processing across different frequency bands; this is not limited here. The preset fusion coefficients can be determined based on expert evaluation, user feedback, or best practices in different environments. For example, if the preset fusion coefficients are the same across different frequency bands, and according to the preset fusion coefficients, the coefficients of the hearing loss sound gain parameter and the environmental sound gain parameter corresponding to different frequency bands are both 1, then the target sound gain parameter corresponding to different frequency bands is equal to the sum of the two.
[0100] In some possible embodiments, the preset fusion coefficients can be dynamically adjusted based on the loudness of different frequency bands in the environment. For example, in a noisy environment, high-frequency sounds played by an audio playback device may be masked by background noise; therefore, the coefficients of the ambient sound gain parameters in these frequency bands are increased to improve speech clarity.
[0101] In this embodiment of the application, the frequency band division in the loudness data and the preset hearing loss gain data may be the same or different.
[0102] When the frequency bands are the same, the ambient sound gain parameters and hearing loss sound gain parameters of the corresponding frequency bands can be fused simply by aligning the different frequency bands in the loudness data and the different frequency bands in the preset hearing loss gain data.
[0103] When frequency bands are divided differently, similar frequency bands can be aligned, and the frequency band division of the target sound gain data can be obtained based on either the loudness data or the preset hearing loss gain data. For example, the loudness data may include multiple frequency bands at 2000Hz intervals, such as 0-2000Hz, 2000-4000Hz, and 4000Hz-6000Hz, while the preset hearing loss gain data may include multiple frequency bands at 1000Hz intervals, such as 0-1000Hz, 1000-2000Hz, and 2000Hz-3000Hz. During the fusion process, one of the frequency band division methods can be selected as the basis for fusion. For example, when selecting the division rule for the preset hearing loss gain data, the obtained target sound gain data will include target sound gain parameters for multiple frequency bands at 1000Hz intervals; this is not limited here.
[0104] In some possible embodiments, the loudness of different frequency bands in the ambient sound signal is the average loudness of the ambient sound signal in each frequency band, wherein each frequency band corresponding to the ambient sound signal is the same as each frequency band corresponding to the preset hearing loss gain data.
[0105] It should be noted that the preset hearing loss gain data is predetermined, and the frequency range of each frequency band is fixed. The division method of each frequency band in the ambient sound signal can be set to be the same as the division method of the preset hearing loss gain data. This is so that when determining the target sound gain data later, the loudness of the frequency bands corresponding to different frequency bands in the ambient sound signal obtained from the loudness data can be better aligned with the hearing loss sound gain parameters corresponding to different frequency bands in the preset hearing loss gain data. This improves the accuracy of sound gain adjustment and optimizes the sound quality of the audio playback device to adapt to the user's hearing loss.
[0106] In some possible embodiments, the target sound gain data includes target sound gain parameters corresponding to different frequency bands. The target sound gain data is determined based on the loudness of the corresponding frequency bands and preset hearing loss gain data, including:
[0107] Based on the preset sound gain algorithm, the loudness of the frequency bands corresponding to different frequency bands and the preset hearing loss gain data are used as inputs to the preset sound gain algorithm to determine the target sound gain data.
[0108] It should be noted that this preset sound gain algorithm may include a preset neural network model. By inputting frequency band loudness and hearing loss sound gain parameters into the preset neural network model, the model can output target sound gain data to adapt to the user's hearing loss in the current environment. This method can provide more personalized and precise audio adjustments, improving the user's auditory experience.
[0109] During training, the neural network model can use loudness data and hearing loss gain data from different users in different environments as a training set. The output sound gain data is then given to the users, who use this data on their audio playback devices and provide feedback. By labeling the feedback, the users provide confidence scores to the neural network model, thereby evaluating and improving the model's accuracy and applicability. This process may involve multiple iterations to continuously optimize the model's performance.
[0110] Step 203: Send the target sound gain data to the audio playback device.
[0111] In this embodiment of the application, after determining the target sound gain data, the electronic device sends the target sound gain data to the audio playback device so that the audio playback device can perform gain processing on the played audio according to the target sound gain data.
[0112] It should be noted that electronic devices can establish BT or BLE connections with audio playback devices. The audio content played by the audio playback device can be sent by the electronic device through the BT connection, stored internally by the audio playback device, or sent by other devices connected to the audio playback device.
[0113] In some possible embodiments, the electronic device acquires ambient sound signals collected by the audio playback device via a BLE connection and sends target sound gain data to the audio playback device via the BLE connection. The audio playback device can acquire audio signals via a BLE connection with the electronic device or other devices, perform gain processing on the audio signals according to the received target sound gain data, and finally play them. In this way, the audio playback device can leverage the superior data processing performance of the electronic device to improve the efficiency of acquiring target sound gain data, so as to better respond to changes in loudness at various frequencies in the environment, provide users with real-time sound gain services, and enhance the user's auditory experience.
[0114] By implementing the above technical solution, the audio processing method provided in this application can perform gain processing on audio based on ambient sound and the user's hearing loss, thereby improving the user's auditory experience in different environments.
[0115] Please see Figure 3 , Figure 3 This is another schematic flowchart of the audio processing method disclosed in the embodiments of this application, as shown below. Figure 3 The audio processing method shown, when applied to an electronic device, may include the following steps:
[0116] Step 301: Acquire the sound signal collected by the audio playback device.
[0117] In some possible embodiments, before acquiring the ambient sound signal collected by the audio playback device, the method further includes:
[0118] Acquire sound signals collected by the audio playback device;
[0119] Extract the voiceprint features corresponding to the sound signal, and determine the preset hearing loss gain data corresponding to the voiceprint features in the preset voiceprint library.
[0120] It should be noted that the audio playback device can collect ambient sound signals through its microphone. The electronic device acquires the sound signals and matches them in a preset voiceprint library to find the preset hearing loss gain data corresponding to the user of the audio playback device, so as to provide the user with sound gain services that are suitable for their own hearing loss.
[0121] In some possible embodiments, after the electronic device acquires the audio signal, it can perform further processing and analysis, including but not limited to audio signal preprocessing, such as noise reduction, pre-emphasis, framing and windowing, to extract more accurate voiceprint features, which are not limited here.
[0122] Step 302: Extract the voiceprint features corresponding to the sound signal, and determine the preset hearing loss gain data corresponding to the voiceprint features in the preset voiceprint library.
[0123] In some possible embodiments, the voiceprint library includes at least one set of correspondences between stored voiceprint features and stored hearing loss gain data.
[0124] Electronic devices can extract voiceprint features corresponding to sound signals through preset voiceprint extraction algorithms, such as Mel frequency cepstral coefficients (MFCCs) and linear predictive cepstral coefficients (LPCCs). The extracted voiceprint features are then matched with each stored voiceprint feature in the voiceprint database. The feature confidence between the voiceprint feature and each stored voiceprint feature is calculated. The stored hearing loss gain data corresponding to the stored voiceprint features whose feature confidence is greater than or equal to the preset confidence is determined as the preset hearing loss gain data.
[0125] Step 303: Obtain the ambient sound signal collected by the audio playback device and calculate the loudness data corresponding to the ambient sound signal.
[0126] Step 304: Determine the target sound gain data based on the frequency loudness corresponding to different frequency bands and the preset hearing loss gain data.
[0127] Step 305: Send the target sound gain data to the audio playback device.
[0128] Steps 303 to 305 are similar to steps 201 to 203, and will not be described again here.
[0129] By implementing the above technical solution, the audio processing method provided in this application can automatically identify and obtain the preset hearing loss gain data corresponding to the user of the audio playback device, provide personalized sound gain services, and improve the accuracy of audio gain processing.
[0130] Please see Figure 4 , Figure 4 This is a flowchart illustrating the activation of the gain compensation function in the audio processing method disclosed in this application. Figure 4 The audio processing method shown, when applied to an electronic device, may include the following steps:
[0131] Step 401: Display the audio gain compensation settings interface on the screen. The audio gain compensation settings interface includes a gain compensation enable control.
[0132] In some possible embodiments, the electronic device includes a display screen that shows an audio gain compensation settings interface, allowing the user to select whether to enable the sound gain compensation function.
[0133] Step 402: In response to a touch operation on the gain compensation enable control, the audio gain compensation function is enabled to send target sound gain data to the audio playback device.
[0134] Please see Figure 5 , Figure 5This is a schematic diagram illustrating an audio gain compensation setting interface displayed on a screen of an electronic device as disclosed in an embodiment of this application. Figure 5 As shown in section (a), an audio gain compensation setting interface is provided, which includes a gain compensation enable control 520. Users can enable the audio gain compensation function by touching the gain compensation enable control 520 to send target sound gain data to the audio playback device. This target sound gain data can be the target sound gain data determined in this embodiment based on the loudness of the corresponding frequency bands and preset hearing loss gain data.
[0135] like Figure 5 As shown in section (b), in some possible embodiments, the gain compensation enable control 520 may include an identification enable control 521 and a fixed enable control 522.
[0136] In some possible embodiments, the audio processing method further includes:
[0137] In response to a touch operation on the recognition enable control 521, if the electronic device detects that the sound information collected by the audio playback device includes target voiceprint features, the audio gain compensation function is enabled to send target sound gain data to the audio playback device, wherein the target voiceprint feature is any stored voiceprint feature in a preset voiceprint library; or,
[0138] In response to a touch operation on the fixed enable control 522, the audio gain compensation function is enabled to send target sound gain data to the audio playback device.
[0139] It should be noted that when the selection recognition enable control 521 is used, the audio gain compensation will be turned off when the audio playback device is connected to the electronic device. The audio gain compensation function will only be enabled after the electronic device detects the user's voiceprint characteristics. Moreover, the gain will be maintained regardless of whether the audio is turned on or off during the current wearing cycle, until the user removes the headphones. However, when the user selects the fixed enable control 522, the electronic device can determine the target sound gain data and increase the volume according to the method provided in this application, regardless of when the user uses the audio playback device and connects to the electronic device.
[0140] In some possible embodiments, the audio gain compensation setting interface also includes a gain compensation off control 510, which the electronic device can turn off the audio gain compensation function in response to a touch operation on the gain compensation off control 510, so that the audio playback device can play audio without setting the gain.
[0141] Please see Figure 6 , Figure 6 This is a schematic flowchart illustrating the setting of a gain compensation method in the audio processing method disclosed in this application. Figure 6The audio processing method shown, when applied to an electronic device, may include the following steps:
[0142] Step 601: Display the gain compensation method setting interface on the screen. The gain compensation method setting interface includes dynamic compensation controls.
[0143] Please see Figure 7 , Figure 7 This is a schematic diagram of an interface for setting the gain compensation method on the display screen of an electronic device disclosed in an embodiment of this application. Figure 7 The gain compensation setting interface shown includes a dynamic compensation control 710 and a fixed compensation control 720.
[0144] Step 602: In response to a touch operation on the dynamic compensation control, determine the target sound gain data based on the frequency loudness corresponding to different frequency bands and preset hearing loss gain data.
[0145] In some possible embodiments, the electronic device responds to the user's touch operation on the dynamic compensation control, at which time the sound gain data sent to the audio playback device is the target sound gain data determined according to the frequency band loudness corresponding to different frequency bands and preset hearing loss gain data.
[0146] In some possible embodiments, the audio processing method further includes:
[0147] In response to a touch operation on the fixed compensation control 720, a preset hearing loss gain parameter is sent to the audio playback device.
[0148] It should be noted that when the user selects the fixed compensation control 720 to trigger, the electronic device can send preset hearing loss gain parameters to the audio playback device. This allows the audio playback device to directly process and play the audio based on the preset hearing loss gain parameters, regardless of ambient noise. This also reduces the power consumption of both the electronic device and the audio playback device, extending their usage time. Users can choose different gain compensation methods according to their needs; no restrictions are specified here.
[0149] In some possible embodiments, the audio processing method further includes:
[0150] The audio playback device settings interface is displayed on the screen. The audio playback device settings interface includes audio gain compensation settings controls and gain compensation method settings controls.
[0151] In response to a touch operation on the audio gain compensation setting controls, control the display screen to show the audio gain compensation setting interface; or,
[0152] In response to a touch operation on the gain compensation mode setting control, the display screen is controlled to show the gain compensation mode setting interface.
[0153] Please see Figure 8 , Figure 8 This is a schematic diagram of an electronic device display screen showing an audio playback device settings interface, as disclosed in an embodiment of this application. Figure 8 The audio playback device settings interface shown includes an audio gain compensation setting control 810 and a gain compensation method setting control 820.
[0154] By implementing the above technical solution, the audio processing method provided in this application can set and modify different functions according to the user's touch operation.
[0155] Please see Figure 9 , Figure 9 This is another schematic flowchart of the audio processing method disclosed in the embodiments of this application, such as... Figure 9 The method shown, when applied to electronic devices, may include the following steps:
[0156] Step 901: Acquire at least two ambient sound sub-signals collected by at least two audio playback sub-devices, and calculate at least two loudness sub-data corresponding to the at least two ambient sound sub-signals.
[0157] In some possible embodiments, the audio playback device includes at least two audio playback sub-devices.
[0158] Taking headphones as an example, headphones are usually used in pairs, including a left earphone and a right earphone. The hearing loss of a user's left and right ears may be different, and the ambient noise at the user's left and right ears may also be different. Therefore, by acquiring at least two ambient sound sub-signals collected by at least two audio playback sub-devices, the target sound gain data generated subsequently can be more closely matched to the user's hearing condition, so that the audio heard by the left and right ears is roughly the same.
[0159] Step 902: Based on the frequency loudness corresponding to different frequency bands in each environmental sound sub-signal and the preset hearing loss gain data, determine at least two target sound gain sub-parameters corresponding to at least two audio playback sub-devices.
[0160] In some possible embodiments, the preset hearing loss gain data includes at least two preset hearing loss gain sub-data corresponding to at least two audio playback sub-devices.
[0161] Taking headphones as an example, the hearing loss in a user's left and right ears may differ, and the ambient sound may also differ. For any headphone, by combining the loudness of different frequency bands in the ambient sound sub-signal collected by the headphone with the preset hearing loss gain sub-data corresponding to the headphone, two target sound gain sub-parameters corresponding to the headphone can be obtained.
[0162] It should be noted that, in addition to common personal headphones, some conference headphones that can receive audio synchronously can also obtain the target sound gain sub-parameters for each headphone by connecting to the same electronic device through communication, which is not limited here.
[0163] For any audio playback sub-device, the method for determining the target sound gain sub-parameter based on the frequency loudness corresponding to different frequency bands in the ambient sound sub-signal and the preset hearing loss gain sub-data is similar to the method provided in steps 201 to 203, and will not be repeated here.
[0164] Step 903: Send the corresponding target sound gain sub-parameters to each audio playback sub-device.
[0165] In the above technical solution, by sending corresponding target sound gain sub-parameters to each audio playback sub-device of the audio playback device, personalized audio adjustment can be achieved, ensuring that the sound output by each audio playback sub-device is optimized according to the user's hearing loss and ambient noise. When the audio playback device is headphones, it allows the user to hear clear audio content in both ears, improving the user experience.
[0166] Please see Figure 10 , Figure 10 This is a schematic flowchart illustrating the application of the audio processing method disclosed in this application to an audio playback device. Figure 10 The method shown, when applied to an audio playback device, may include the following steps:
[0167] Step 1001: Collect ambient sound signals and calculate the loudness data corresponding to the ambient sound signals. The loudness data includes the frequency band loudness corresponding to different frequency bands in the ambient sound signals.
[0168] In some possible embodiments, the audio playback device, such as headphones, may have a built-in high-performance processor that can process the collected ambient sound to obtain loudness data and further determine the target sound gain data without the aid of other devices.
[0169] In some possible embodiments, the audio playback device is communicatively connected to an electronic device, and the method further includes:
[0170] Acquire the target voiceprint features sent by the electronic device and the target hearing loss gain data corresponding to the target voiceprint features, and store the target voiceprint features and target hearing loss gain data in a preset voiceprint library;
[0171] Before collecting ambient sound signals, the method also includes:
[0172] Acquire sound signals;
[0173] Extract the voiceprint features corresponding to the sound signal, and determine the preset hearing loss gain data corresponding to the voiceprint features in the preset voiceprint library.
[0174] It should be noted that when determining the target sound gain parameters by combining ambient sound and the user's hearing loss, if the headphones do not store the user's hearing loss gain data, it is necessary to acquire and record it through other devices, such as electronic devices. After acquiring the target voiceprint features and the corresponding target hearing loss gain data sent by the electronic device, the audio playback device will store them in its internal storage medium for later use. The audio playback device can automatically determine the user's identity based on the sampled sound signal and select the user's corresponding preset hearing loss gain data to determine the target sound gain data.
[0175] Step 1002: Determine the target sound gain data based on the frequency loudness corresponding to different frequency bands and the preset hearing loss gain data. The preset hearing loss gain data includes the hearing loss sound gain parameters corresponding to different frequency bands.
[0176] Step 1003: Play the audio based on the target sound gain data.
[0177] By implementing the above technical solution, the audio processing method provided in this application, when the performance of the audio playback device meets the preset requirements, is applied to the audio playback device to determine the target sound gain data required for gain processing of the audio, thereby improving the level of intelligence in audio processing and meeting the personalized needs of different users.
[0178] It should be understood that although the steps in the above flowcharts are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the above flowcharts may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0179] Based on the foregoing embodiments, this application provides an audio processing device, which includes various modules and units included in each module, and can be implemented by a processor; of course, it can also be implemented by specific logic circuits; in the implementation process, the processor can be a central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA), etc.
[0180] Figure 11 This is a schematic diagram of the structure of an audio processing device provided in an embodiment of this application, such as... Figure 11 As shown, the audio processing device may include a first data acquisition module 1101 and a first gain processing module 1102, wherein:
[0181] The first data acquisition module 1101 is used to acquire ambient sound signals collected by the audio playback device and calculate the loudness data corresponding to the ambient sound signals. The loudness data includes the frequency band loudness corresponding to different frequency bands in the ambient sound signals.
[0182] The first gain processing module 1102 is used to determine the target sound gain data based on the frequency loudness corresponding to different frequency bands and the preset hearing loss gain data, wherein the preset hearing loss gain data includes hearing loss sound gain parameters corresponding to different frequency bands; and to send the target sound gain data to the audio playback device.
[0183] In some possible embodiments, the target sound gain data includes target sound gain parameters corresponding to different frequency bands. The first gain processing module 1102 is further configured to determine the ambient sound gain parameters corresponding to different frequency bands based on the frequency band loudness and a preset gain mapping relationship. The preset gain mapping relationship includes the mapping relationship between preset frequency band loudness and preset ambient sound gain parameters. Based on a preset fusion coefficient, the hearing loss sound gain parameters corresponding to different frequency bands and the ambient sound gain parameters corresponding to different frequency bands are fused to obtain the target sound gain parameters corresponding to different frequency bands, thereby determining the target sound gain data.
[0184] In some possible embodiments, before acquiring the ambient sound signal collected by the audio playback device, the first data acquisition module 1101 is further used to acquire the sound signal collected by the audio playback device; extract the voiceprint features corresponding to the sound signal; and determine the preset hearing loss gain data corresponding to the voiceprint features in the preset voiceprint library.
[0185] In some possible embodiments, the audio processing device further includes a display processing module for displaying an audio gain compensation setting interface, the audio gain compensation setting interface including a gain compensation enable control; in response to a touch operation on the gain compensation enable control, the audio gain compensation function is enabled to send target sound gain data to the audio playback device.
[0186] In some possible embodiments, the display processing module is further configured to display a gain compensation method setting interface, which includes a dynamic compensation control; in response to a touch operation on the dynamic compensation control, to determine target sound gain data based on the frequency loudness corresponding to different frequency bands and preset hearing loss gain data.
[0187] In some possible embodiments, the audio playback device includes at least two audio playback sub-devices. The first data acquisition module 1101 is further configured to acquire at least two ambient sound sub-signals collected by the at least two audio playback sub-devices, calculate at least two loudness sub-data corresponding to the at least two ambient sound sub-signals, each loudness sub-data including the frequency band loudness corresponding to different frequency bands in the corresponding ambient sound sub-signals; and the first gain processing module 1102 is configured to determine at least two target sound gain sub-parameters corresponding to the at least two audio playback sub-devices based on the frequency band loudness corresponding to different frequency bands in each ambient sound sub-signal and preset hearing loss gain data, the preset hearing loss gain data including at least two preset hearing loss gain sub-data corresponding to the at least two audio playback sub-devices; and send the corresponding target sound gain sub-parameters to each audio playback sub-device.
[0188] Figure 12 This is another schematic diagram of the audio processing device provided in the embodiments of this application, as shown below. Figure 12 As shown, the audio processing device may include a second data acquisition module 1201, a second gain processing module 1202, and an audio playback module 1203, wherein:
[0189] The second data acquisition module 1201 is used to collect ambient sound signals and calculate the loudness data corresponding to the ambient sound signals. The loudness data includes the frequency band loudness corresponding to different frequency bands in the ambient sound signals.
[0190] The second gain processing module 1202 is used to determine the target sound gain data based on the frequency loudness corresponding to different frequency bands and the preset hearing loss gain data. The preset hearing loss gain data includes hearing loss sound gain parameters corresponding to different frequency bands.
[0191] The audio playback module 1203 is used to play audio based on the target sound gain data.
[0192] In some possible embodiments, the audio processing device is communicatively connected to the electronic device. The second data acquisition module 1201 is further configured to acquire the target voiceprint features sent by the electronic device and the target hearing loss gain data corresponding to the target voiceprint features, and store the target voiceprint features and target hearing loss gain data in a preset voiceprint library. Before acquiring the ambient sound signal, the second data acquisition module 1201 is further configured to acquire the sound signal; extract the voiceprint features corresponding to the sound signal, and determine the preset hearing loss gain data corresponding to the voiceprint features in the preset voiceprint library.
[0193] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0194] It should be noted that, in the embodiments of this application... Figure 11 or Figure 12 The module division of the audio processing device shown is illustrative and represents only one logical functional division; in actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, exist as separate physical units, or be integrated into one unit with two or more units. The integrated units can be implemented in hardware, as software functional units, or a combination of both.
[0195] It should be noted that, in the embodiments of this application, if the above-described methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0196] This application provides a computer device, which may be a server, and its internal structure diagram may be as follows: Figure 13 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements the methods described above.
[0197] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method provided in the above embodiments.
[0198] This application provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the method provided in the above-described method embodiments.
[0199] Those skilled in the art will understand that Figure 13The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0200] In one embodiment, the audio processing apparatus provided in this application can be implemented as a computer program, and the computer program can be implemented as follows: Figure 13 The device operates on the computer device shown. The memory of the computer device can store the various program modules that make up the above-described apparatus. The computer program, composed of the various program modules, causes the processor to execute the steps of the methods in the various embodiments of this application described in this specification.
[0201] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium, storage medium, and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0202] It should be understood that the phrases "one embodiment," "an embodiment," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment," "in one embodiment," or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments; their similarities or commonalities can be referred to mutually, and for the sake of brevity, they will not be repeated here.
[0203] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three kinds of relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist simultaneously, and object B exists alone.
[0204] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0205] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or modules can be electrical, mechanical, or other forms.
[0206] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.
[0207] In addition, each functional module in the various embodiments of this application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.
[0208] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0209] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0210] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0211] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0212] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0213] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An audio processing method, characterized in that, The method is applied to an electronic device, which is communicatively connected to an audio playback device, and the method includes: Acquire ambient sound signals collected by the audio playback device, and calculate loudness data corresponding to the ambient sound signals. The loudness data includes the frequency band loudness corresponding to different frequency bands in the ambient sound signals. Based on the loudness of the frequency bands corresponding to the different frequency bands and the preset hearing loss gain data, the target sound gain data is determined. The preset hearing loss gain data includes hearing loss sound gain parameters corresponding to the different frequency bands. The target sound gain data is sent to the audio playback device.
2. The method according to claim 1, characterized in that, The target sound gain data includes target sound gain parameters corresponding to different frequency bands. Determining the target sound gain data based on the loudness of the corresponding frequency bands and preset hearing loss gain data includes: Based on the frequency band loudness and preset gain mapping relationship corresponding to the different frequency bands, the ambient sound gain parameters corresponding to the different frequency bands are determined. The preset gain mapping relationship includes the mapping relationship between preset frequency band loudness and preset ambient sound gain parameters. Based on a preset fusion coefficient, the hearing loss sound gain parameters corresponding to different frequency bands and the ambient sound gain parameters corresponding to different frequency bands are fused to obtain the target sound gain parameters corresponding to different frequency bands, thereby determining the target sound gain data.
3. The method according to claim 1 or 2, characterized in that, The loudness of the frequency bands corresponding to different frequency bands in the ambient sound signal is the average loudness of the ambient sound signal in each frequency band, wherein each frequency band corresponding to the ambient sound signal is the same as each frequency band corresponding to the preset hearing loss gain data.
4. The method according to claim 1 or 2, characterized in that, Before acquiring the ambient sound signal collected by the audio playback device, the method further includes: Acquire the sound signal collected by the audio playback device; Extract the voiceprint features corresponding to the sound signal, and determine the preset hearing loss gain data corresponding to the voiceprint features in the preset voiceprint library.
5. The method according to claim 1 or 2, characterized in that, The electronic device includes a display screen, and the method further includes: The audio gain compensation setting interface is displayed on the screen, and the audio gain compensation setting interface includes a gain compensation enable control. In response to a touch operation on the gain compensation enable control, the audio gain compensation function is enabled to send the target sound gain data to the audio playback device.
6. The method according to claim 1 or 2, characterized in that, The electronic device includes a display screen, and the method further includes: The gain compensation method setting interface is displayed on the screen, and the gain compensation method setting interface includes dynamic compensation controls. In response to a touch operation on the dynamic compensation control, the target sound gain data is determined based on the frequency loudness corresponding to the different frequency bands and the preset hearing loss gain data.
7. The method according to claim 1 or 2, characterized in that, The audio playback device includes at least two audio playback sub-devices. The step of acquiring the ambient sound signal sent by the audio playback device and calculating the loudness data corresponding to the ambient sound signal includes: Acquire at least two ambient sound sub-signals collected by the at least two audio playback sub-devices, and calculate at least two loudness sub-data corresponding to the at least two ambient sound sub-signals, wherein each loudness sub-data includes the frequency band loudness corresponding to different frequency bands in the corresponding ambient sound sub-signal; The step of determining the target sound gain data based on the loudness of the corresponding frequency bands and preset hearing loss gain data includes: Based on the frequency band loudness corresponding to different frequency bands in each environmental sound sub-signal and the preset hearing loss gain data, at least two target sound gain sub-parameters corresponding to the at least two audio playback sub-devices are determined, and the preset hearing loss gain data includes at least two preset hearing loss gain sub-data corresponding to the at least two audio playback sub-devices. Sending the target sound gain data to the audio playback device includes: Send the corresponding target sound gain sub-parameters to each audio playback sub-device.
8. An audio processing method, characterized in that, The method is applied to an audio playback device, and the method includes: Collect ambient sound signals and calculate the loudness data corresponding to the ambient sound signals. The loudness data includes the frequency band loudness corresponding to different frequency bands in the ambient sound signals. Based on the loudness of the frequency bands corresponding to the different frequency bands and the preset hearing loss gain data, the target sound gain data is determined. The preset hearing loss gain data includes hearing loss sound gain parameters corresponding to the different frequency bands. Play audio based on the target sound gain data.
9. The method according to claim 8, characterized in that, The audio playback device is communicatively connected to the electronic device, and the method further includes: Acquire the target voiceprint features sent by the electronic device and the target hearing loss gain data corresponding to the target voiceprint features, and store the target voiceprint features and the target hearing loss gain data in a preset voiceprint library; Before acquiring the ambient sound signal, the method further includes: Collect sound signals; Extract the voiceprint features corresponding to the sound signal, and determine the preset hearing loss gain data corresponding to the voiceprint features in the preset voiceprint library.
10. An audio processing apparatus, characterized in that, The audio processing device is communicatively connected to the audio playback device, including: The first data acquisition module is used to acquire the ambient sound signal collected by the audio playback device and calculate the loudness data corresponding to the ambient sound signal. The loudness data includes the frequency band loudness corresponding to different frequency bands in the ambient sound signal. The first gain processing module is used to determine target sound gain data based on the frequency loudness corresponding to the different frequency bands and preset hearing loss gain data, wherein the preset hearing loss gain data includes hearing loss sound gain parameters corresponding to different frequency bands; and to send the target sound gain data to the audio playback device.
11. An audio processing apparatus, characterized in that, include: The second data acquisition module is used to collect ambient sound signals and calculate the loudness data corresponding to the ambient sound signals. The loudness data includes the frequency band loudness corresponding to different frequency bands in the ambient sound signals. The second gain processing module is used to determine the target sound gain data based on the frequency loudness corresponding to the different frequency bands and the preset hearing loss gain data, wherein the preset hearing loss gain data includes hearing loss sound gain parameters corresponding to different frequency bands; An audio playback module is used to play audio based on the target sound gain data.
12. A computer device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 7 or claims 8 to 9.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method as described in any one of claims 1 to 7 or 8 to 9.