CN-122002179-A - Audio processing method and device, equipment and storage medium
Abstract
The embodiment of the application discloses an audio processing method, an audio processing device, equipment and a storage medium, wherein the method is applied to electronic equipment, the electronic equipment is in communication connection with an audio playing device, the method comprises the steps of obtaining an environment sound signal collected by the audio playing device, calculating loudness data corresponding to the environment sound signal, wherein the loudness data comprises frequency band loudness corresponding to different frequency bands in the environment sound signal, determining target sound gain data according to the frequency band loudness corresponding to the different frequency bands and preset hearing loss gain data, wherein the preset hearing loss gain data comprises hearing loss sound gain parameters corresponding to the different frequency bands, and sending the target sound gain data to the audio playing device. The method and the device can combine the environment sound and the hearing loss of the user to perform gain processing on the audio, and improve the hearing experience of the user in different environments.
Inventors
- TAN SHIQIANG
Assignees
- 广东小天才科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241105
Claims (13)
- 1. An audio processing method, wherein the method is applied to an electronic device, the electronic device being communicatively connected to an audio playing device, the method comprising: acquiring an environmental sound signal acquired by the audio playing device, and calculating loudness data corresponding to the environmental sound signal, wherein the loudness data comprises frequency band loudness corresponding to different frequency bands in the environmental sound signal; determining target sound gain data according to the frequency band loudness corresponding to the different frequency bands and preset hearing loss gain data, wherein the preset hearing loss gain data comprises hearing loss sound gain parameters corresponding to the different frequency bands; And sending the target sound gain data to the audio playing device.
- 2. The method of claim 1, wherein the target sound gain data includes target sound gain parameters corresponding to different frequency bands, and the determining the target sound gain data according to the frequency band loudness corresponding to the different frequency bands and the preset hearing loss gain data includes: Determining environmental sound gain parameters corresponding to different frequency bands according to frequency band loudness corresponding to the different frequency bands and a preset gain mapping relation, wherein the preset gain mapping relation comprises a mapping relation between the preset frequency band loudness and the preset environmental sound gain parameters; And according to a preset fusion coefficient, carrying out fusion processing on hearing loss sound gain parameters corresponding to different frequency bands and environment sound gain parameters corresponding to different frequency bands to obtain 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, wherein the loudness of the frequency bands corresponding to the different frequency bands in the ambient audio signal is an average loudness of the ambient audio signal corresponding to each frequency band, where each frequency band corresponding to the ambient audio 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, wherein prior to said acquiring the ambient sound signal acquired by the audio playback device, the method further comprises: Acquiring sound signals acquired by the audio playing device; And extracting voiceprint characteristics corresponding to the sound signals, and determining the preset hearing loss gain data corresponding to the voiceprint characteristics in a preset voiceprint library.
- 5. The method of claim 1 or 2, wherein the electronic device comprises a display screen, the method further comprising: Displaying an audio gain compensation setting interface through the display screen, wherein the audio gain compensation setting interface comprises a gain compensation enabling control; in response to a touch operation of the gain compensation enable control, an audio gain compensation function is enabled to send the target sound gain data to the audio playback device.
- 6. The method of claim 1 or 2, wherein the electronic device comprises a display screen, the method further comprising: Displaying a gain compensation mode setting interface through the display screen, wherein the gain compensation mode setting interface comprises a dynamic compensation control; And responding to the touch operation of the dynamic compensation control, so as to determine the target sound gain data according to the frequency band loudness corresponding to the different frequency bands and the preset hearing loss gain data.
- 7. The method according to claim 1 or 2, wherein the audio playing device includes at least two audio playing sub-devices, the acquiring the environmental sound signal sent by the audio playing device, and calculating the loudness data corresponding to the environmental sound signal includes: Acquiring at least two environment sound sub-signals acquired by the at least two audio playing sub-devices, and calculating at least two loudness sub-data corresponding to the at least two environment sound sub-signals, wherein each loudness sub-data comprises frequency band loudness corresponding to different frequency bands in the corresponding environment sound sub-signals; the determining target sound gain data according to the frequency band loudness corresponding to the different frequency bands and the preset hearing loss gain data comprises the following steps: Determining at least two target sound gain sub-parameters corresponding to the at least two audio playing sub-devices according to frequency band loudness corresponding to different frequency bands in each environment sound sub-signal and the preset hearing loss gain data, wherein the preset hearing loss gain data comprises at least two preset hearing loss gain sub-data corresponding to the at least two audio playing sub-devices; The sending the target sound gain data to the audio playing device includes: and sending the corresponding target sound gain sub-parameters to each audio playing sub-device.
- 8. An audio processing method, wherein the method is applied to an audio playing device, and the method comprises: Collecting an environment sound signal, and calculating loudness data corresponding to the environment sound signal, wherein the loudness data comprises frequency band loudness corresponding to different frequency bands in the environment sound signal; determining target sound gain data according to the frequency band loudness corresponding to the different frequency bands and preset hearing loss gain data, wherein the preset hearing loss gain data comprises hearing loss sound gain parameters corresponding to the different frequency bands; And playing the audio according to the target sound gain data.
- 9. The method of claim 8, wherein the audio playback device is communicatively coupled to an electronic device, the method further comprising: Acquiring target voiceprint features and target hearing loss gain data corresponding to the target voiceprint features sent by the electronic equipment, and storing the target voiceprint features and the target hearing loss gain data in a preset voiceprint library; before the acquisition of the ambient sound signal, the method further comprises: collecting sound signals; and extracting voiceprint features corresponding to the sound signals, and determining the preset hearing loss gain data corresponding to the voiceprint features in the preset voiceprint library.
- 10. An audio processing device, the audio processing device communicatively coupled to an audio playback device, comprising: The first data acquisition module is used for acquiring the environment sound signals acquired by the audio playing device, calculating loudness data corresponding to the environment sound signals, wherein the loudness data comprise frequency band loudness corresponding to different frequency bands in the environment sound signals; The first gain processing module is used for determining target sound gain data according to the frequency band loudness corresponding to the different frequency bands and preset hearing loss gain data, wherein the preset hearing loss gain data comprise hearing loss sound gain parameters corresponding to the different frequency bands, and sending the target sound gain data to the audio playing device.
- 11. An audio processing apparatus, comprising: The second data acquisition module is used for acquiring an environmental sound signal, calculating loudness data corresponding to the environmental sound signal, wherein the loudness data comprises frequency band loudness corresponding to different frequency bands in the environmental sound signal; the second gain processing module is used for determining target sound gain data according to the frequency band loudness corresponding to the different frequency bands and preset hearing loss gain data, wherein the preset hearing loss gain data comprise hearing loss sound gain parameters corresponding to the different frequency bands; and the audio playing module is used for playing audio according to 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 the processor implements the steps of the method of any one of claims 1 to 7 or 8 to 9 when the program is executed.
- 13. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any one of claims 1 to 7 or 8 to 9.
Description
Audio processing method and device, equipment and storage medium Technical Field The embodiment of the application relates to the technical field of data processing, in particular to an audio processing method, an audio processing device, audio processing equipment and a storage medium. Background Audio playback devices such as headphones, hearing aids, or neck-mounted speakers are often used to play audio content such as music, providing an immersive hearing experience for the user. Some audio playing devices can provide a sound gain function for a hearing impaired user group, such as the elderly or hearing impaired patients, that is, perform appropriate gain processing on audio signals according to actual hearing impaired conditions of different users, and play the audio signals, so as to improve the hearing experience of users. In the related art, some audio playback apparatuses having a sound gain function are capable of outputting clear audio contents to a user in a quiet environment. However, in a noisy environment, the audio signal is processed only by the sound gain parameter determined based on the hearing loss condition, and the masking effect of the environmental sound on the output audio of the audio playing device may not be counteracted, so that the user cannot hear the audio content. Disclosure of Invention In view of this, the audio processing method, the device, the equipment and the storage medium provided by the embodiment of the application can combine the environment sound and the hearing loss condition of the user to perform gain processing on the audio, thereby improving the hearing experience of the user in different environments. The audio processing method, the device, the equipment and the storage medium provided by the embodiment of the application are realized as follows: A first aspect of the present application provides an audio processing method, the method being applied to an electronic device, the electronic device being communicatively connected to an audio playing apparatus, the method comprising: acquiring an environmental sound signal acquired by the audio playing device, and calculating loudness data corresponding to the environmental sound signal, wherein the loudness data comprises frequency band loudness corresponding to different frequency bands in the environmental sound signal; determining target sound gain data according to the frequency band loudness corresponding to the different frequency bands and preset hearing loss gain data, wherein the preset hearing loss gain data comprises hearing loss sound gain parameters corresponding to the different frequency bands; And sending the target sound gain data to the audio playing device. With reference to the first aspect, in some possible embodiments, the target sound gain data includes target sound gain parameters corresponding to different frequency bands, and the determining the target sound gain data according to the frequency band loudness corresponding to the different frequency bands and the preset hearing loss gain data includes: Determining environmental sound gain parameters corresponding to different frequency bands according to frequency band loudness corresponding to the different frequency bands and a preset gain mapping relation, wherein the preset gain mapping relation comprises a mapping relation between the preset frequency band loudness and the preset environmental sound gain parameters; And according to a preset fusion coefficient, carrying out fusion processing on hearing loss sound gain parameters corresponding to different frequency bands and environment sound gain parameters corresponding to different frequency bands to obtain target sound gain parameters corresponding to different frequency bands, thereby determining the target sound gain data. With reference to the first aspect, in some possible embodiments, loudness of frequency bands corresponding to the different frequency bands in the environmental audio signal is an average value of loudness of the environmental audio signal corresponding to each frequency band, where each frequency band corresponding to the environmental audio signal is the same as each frequency band corresponding to the preset hearing loss gain data. With reference to the first aspect, in some possible embodiments, before the acquiring the environmental sound signal acquired by the audio playing device, the method further includes: Acquiring sound signals acquired by the audio playing device; And extracting voiceprint characteristics corresponding to the sound signals, and determining the preset hearing loss gain data corresponding to the voiceprint characteristics in a preset voiceprint library. With reference to the first aspect, in some possible embodiments, the electronic device includes a display screen, and the method further includes: Displaying an audio gain compensation setting interface through the display screen, wherein the audio gain compensation setting