Nonlinear sound pressure gain method and device based on logarithmic function and medium
The gain of the sound frequency band is directly calculated by logarithmic function curve, which solves the problem of low calculation efficiency of sound intensity gain in hearing aids, achieving more efficient acoustic experience and hearing assistance effects.
Patent Information
- Application Number
- CN202410998871.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-12
AI Technical Summary
The calculation efficiency of sound intensity gain in existing hearing aids is low, resulting in increased delay and acoustic gain mutations, affecting the comfort of hearing impaired people.
Using a nonlinear sound pressure gain method based on logarithmic function, the segmentation function and logarithmic function curve of the sound frequency band are calculated through the hearing loss data of the target user, and the gain calculation is performed directly in the same frequency band to avoid the gain sudden change of the segmentation linear function. , simplify the calculation process.
It improves the efficiency of sound intensity gain calculation, reduces the computational complexity, and provides better acoustic experience and hearing assistance effects.
Smart Images

Figure CN118945577A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal processing technology, and in particular to a nonlinear sound pressure gain method, device and medium based on a logarithmic function. Background Art
[0002] As China's population ages, more and more people are hearing impaired. According to conservative statistics, by 2022, the number of people in China who need to wear hearing aids and related hearing intervention equipment will reach more than 27.8 million, but the actual number of people wearing hearing aids is less than 5%, while this proportion is 37% in the United States and 16% on average worldwide. Therefore, how to provide better hearing aids or hearing equipment for the hearing-impaired has become one of the hot topics for technicians.
[0003] In the related art, a piecewise function is generally used to divide the input sound into different frequency bands, and then perform piecewise linear enhancement or compression of the sound signal according to the input sound pressure intensity in the frequency band. This piecewise linear function has a fixed slope in each segment. When the number of segments is relatively small, the inflection points between the slopes will be more obvious, resulting in a more prominent effect of the acoustic gain mutation, which will cause the human ear to feel uncomfortable with the sound intensity. At the same time, since the sound is processed in frequency bands, WDRC operations need to be performed on the sound intensity in all frequency bands. This also leads to the use of traditional piecewise linear functions to continuously judge the intensity of the input sound pressure in each frequency band, which greatly increases the overall algorithm time of the hearing aid and increases the delay.
[0004] Therefore, how to solve the current low efficiency of sound intensity gain calculation has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The present application provides a nonlinear sound pressure gain method, device and storage medium based on a logarithmic function, aiming to improve the efficiency of sound intensity gain calculation.
[0006] In a first aspect, the present application provides a nonlinear sound pressure gain method based on a logarithmic function, the method comprising:
[0007] Calculate the piecewise function of the sound frequency band based on the hearing loss data of the target user;
[0008] Based on the piecewise function, calculating the logarithmic function curve of the sound frequency band;
[0009] Obtain the sound frequency band and input sound pressure intensity of the input sound pressure;
[0010] Based on the logarithmic function curve corresponding to the sound frequency band, a gain calculation is performed on the input sound pressure intensity to obtain an output sound pressure intensity.
[0011] In a second aspect, the present application further provides a nonlinear sound pressure gain device based on a logarithmic function, the nonlinear sound pressure gain device based on a logarithmic function comprising:
[0012] A piecewise function calculation module, used to calculate the piecewise function of the sound frequency band based on the hearing loss data of the target user;
[0013] A logarithmic function curve calculation module, used for calculating the logarithmic function curve of the audio frequency band based on the piecewise function;
[0014] An input sound pressure determination module, used to obtain a sound frequency band and input sound pressure intensity of the input sound pressure;
[0015] The output sound pressure intensity calculation module is used to perform gain calculation on the input sound pressure intensity based on the logarithmic function curve corresponding to the sound frequency band to obtain the output sound pressure intensity.
[0016] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the above-mentioned nonlinear sound pressure gain method based on a logarithmic function are implemented.
[0017] The present application provides a nonlinear sound pressure gain method, device and storage medium based on logarithmic function. The method of the present application includes calculating the piecewise function of the sound frequency band based on the hearing loss data of the target user; calculating the logarithmic function curve of the sound frequency band based on the piecewise function; obtaining the sound frequency band and the input sound pressure intensity of the input sound pressure; performing gain calculation on the input sound pressure intensity based on the logarithmic function curve corresponding to the sound frequency band to obtain the output sound pressure intensity. In the above manner, the present application calculates the piecewise function of the sound frequency band through the hearing loss function of the target user, and then calculates the logarithmic function curve of the sound frequency band through the piecewise function, and then uses the logarithmic function curve to realize the gain calculation of the input sound pressure intensity to obtain the output sound pressure intensity, avoiding the gain mutation of the sound pressure intensity of the piecewise linear function at each segmentation point, and bringing a better acoustic experience. At the same time, for the same sound frequency band, the same logarithmic function curve is used for gain calculation, and there is no need to perform segmentation processing on the input sound pressure intensity, which reduces the calculation complexity and improves the gain calculation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A schematic flow chart of a first embodiment of a nonlinear sound pressure gain method based on a logarithmic function provided in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of dividing a sound frequency band provided in an embodiment of the present application;
[0021] Figure 3 A schematic flow chart of an extended solution of the second step of the first embodiment of a nonlinear sound pressure gain method based on a logarithmic function provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of segmented turning point coordinates provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of a piecewise logarithmic function curve provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of the result of the first correction of a piecewise logarithmic function curve provided in an embodiment of the present application;
[0025] Figure 7 A schematic diagram of the result of the second correction of a piecewise logarithmic function curve provided in an embodiment of the present application;
[0026] Figure 8 A schematic diagram of multiple piecewise logarithmic function curves within a sound frequency band provided in an embodiment of the present application;
[0027] Fig. 9 A schematic diagram of a logarithmic function curve of a sound frequency band provided in an embodiment of the present application;
[0028] Fig.10 A schematic flow chart of a second embodiment of a nonlinear sound pressure gain method based on a logarithmic function provided in an embodiment of the present application;
[0029] Fig.11 It is a structural schematic diagram of a first embodiment of a nonlinear sound pressure gain device based on a logarithmic function provided by the present application;
[0030] Fig.12 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application.
[0031] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0034] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0035] Please refer to Figure 1 , Figure 1 A schematic flow chart of a first embodiment of a nonlinear sound pressure gain method based on a logarithmic function provided in an embodiment of the present application.
[0036] like Figure 1 As shown, the nonlinear sound pressure gain method based on logarithmic function includes steps S101 to S104.
[0037] S101, calculating a piecewise function of a sound frequency band based on hearing loss data of a target user;
[0038] In one embodiment, if Figure 2 As shown, in hearing devices such as hearing aids and hearing amplifiers, there are multiple different sound frequency bands. For input signals of different frequencies, each sound frequency band is divided into a silent area, an amplification area, a compression area, and a restriction area based on the input sound pressure.
[0039] Among them, the input sound pressure in the silent zone does not need to be amplified, while the input sound pressure in the amplification zone, compression zone and restriction zone needs to be amplified. Since the sound pressure amplification factors in different areas are different, the sound band is divided into multiple sound segments. The conversion function of the output sound pressure and input sound pressure corresponding to each sound segment is different, thus constituting a piecewise function of the sound band.
[0040] The input signal in the amplification zone is amplified in multiple linear ways, which is suitable for medium-intensity sound gain and maintains the natural characteristics of the sound.
[0041] The compression zone is used to compress the sound signal when the sound intensity exceeds a certain threshold, so that the output signal grows slower than the input signal, which helps protect the ears of people with hearing loss from sudden loud noises.
[0042] The sound frequency band in the restricted zone is kept at a certain level no matter how the input signal strength increases, preventing discomfort or damage caused by excessive sound. It helps manage high-intensity sound and ensures that the output signal does not exceed the user's comfort threshold.
[0043] The logarithmic function curve calculated by this scheme mainly acts on the amplification area, compression area and limitation area of the sound frequency band.
[0044] It is understandable that the regional division of the audio band is to meet the specific needs of people with different hearing loss and provide personalized hearing assistance. By adjusting the audio band, the performance of hearing aids or other hearing assistance devices can be optimized to provide the best hearing experience and protection. Therefore, it is first necessary to determine the audio band based on the hearing loss data of the target user (i.e., the hearing loss person).
[0045] In one embodiment, the hearing loss data may include the degree of hearing loss and the type of hearing loss. The degree of hearing loss includes mild, moderate, severe and profound, etc. The type of hearing loss may include conductive, sensorineural and mixed, etc.
[0046] For example, the specific form of hearing loss data can be frequency points, that is, through a hearing test, the sound frequency of the hearing-impaired person in various sound frequency bands is tested, and these frequency points include but are not limited to 125Hz, 250Hz, 500Hz, 1000Hz, 2000Hz, 4000Hz and 8000Hz, etc. Among them, below 1000Hz is considered low frequency, 1000Hz to 4000Hz is considered medium frequency, and above 4000Hz is considered high frequency.
[0047] Generally, when assessing hearing loss, the degree of hearing loss is usually assessed based on the average value of three frequencies: 500 Hz, 1000 Hz, and 2000 Hz, or the average value of four frequencies including 4000 Hz.
[0048] S102, calculating a logarithmic function curve of the sound frequency band based on the piecewise function;
[0049] Furthermore, if Figure 3 As shown, step S102 specifically includes:
[0050] S1021, calculating the turning point coordinates of at least one segment turning point in the audio frequency band based on the segment function;
[0051] In one embodiment, a plurality of segment turning points correspond to one audio frequency band, and a straight line between two adjacent segment turning points represents a piecewise linear function.
[0052] Furthermore, based on the performance parameters of the hearing gain device, the maximum number of segments of the wide dynamic range compression WDRC in the sound band is determined; based on the WDRC piecewise function, the hearing loss data and the maximum number of segments, the piecewise linear function between the segment turning points in each sound band is calculated; based on the piecewise linear function between the segment turning points, the turning point coordinates of each segment turning point are obtained.
[0053] In one embodiment, although there are many causes of hearing loss, more than 90% of them are caused by presbycusis, which is mainly due to the natural aging, shedding and death of the inner and outer hair cells of the cochlea, which causes the elderly to be impaired in their perception of the sound pressure intensity in different frequency bands, so WDRC compensation is required according to the sound pressure of the damaged frequency band.
[0054] Among them, WDRC (Wide Dynamic Range Compression) divides the input sound into different frequency bands, and then enhances or compresses the sound signal through a piecewise linear function according to the sound pressure intensity of the input in the frequency band. This piecewise linear function has a fixed slope within the fixed sound pressure intensity segment of the sound band.
[0055] In one embodiment, if Figure 4 As shown in the figure, the maximum number of WDRC segments in the sound frequency band is determined according to the performance of the hearing aid product: "N". Then, according to the hearing loss data of the hearing-impaired, the segmented WDRC algorithm function in each frequency band is obtained, and the turning point coordinates between each segment are recorded "(x0, y0), (x1, y1), (x2, y2), ..., (x i ,y i )…”.
[0056] S1022, based on the non-standard logarithmic function and the turning point coordinates, respectively calculating the piecewise logarithmic function curves between each piecewise turning point;
[0057] In one embodiment, if Figure 5 As shown, Figure 5 : is a schematic diagram of a logarithmic function curve provided in an embodiment of the present application. The calculation formula of the logarithmic function curve is as follows:
[0058]
[0059] Wherein, X represents the input sound pressure intensity, Y represents the output sound pressure intensity, and a is the base of the logarithmic function.
[0060] In one embodiment, from Figure 5 As can be seen from the figure, the curve Y passes through the turning point (x1, y1), but the lower half of the curve (i.e. before point x1) is farther away from Figure 4 The piecewise function in is far away, and the curve passes through the quiet zone before point x1, but the quiet zone does not require gain processing of the sound pressure, so the curve needs to be corrected.
[0061] In one embodiment, the curve Y is corrected and needs to be translated to avoid the quiet zone, so as to obtain Figure 6 The curve shown can be expressed as:
[0062]
[0063] Among them, A is the value of the quiet zone, that is, the horizontal coordinate value x0 of the first turning point coordinate. Figure 6 As shown, the upper part of the moved curve is far away from the upper part of the piecewise function, so the curve needs to be further corrected.
[0064] Furthermore, based on the non-standard logarithmic function and the turning point coordinates corresponding to the adjacent segment turning points, a segment logarithmic function curve between the segment turning points is calculated.
[0065] In one embodiment, the above curve is shifted upward to obtain Figure 7 The curve shown can be expressed as:
[0066]
[0067] A i =x i-1
[0068]
[0069] Among them, i represents the number of segment turning points in the audio band, X i represents the input sound pressure intensity of the sound frequency band between the i-th segment turning point and the i-1-th segment turning point, Y i represents the output sound pressure intensity of the audio frequency band between the i-th segment turning point and the i-1-th segment turning point, a i represents the base of the piecewise logarithmic function, A i represents the input sound pressure intensity of the i-1th segment turning point, B i represents the average value of the output sound pressure intensity between the i-th segment turning point and the i-1-th segment turning point, (x i-1 ,y i-1 ) represents the turning point coordinates of the i-1th segment turning point, (x i ,y i) represents the turning point coordinates of the i-th segment turning point.
[0070] Thus, the non-standard logarithmic function provided in the embodiment of the present application can be obtained.
[0071] For example, according to the formula:
[0072]
[0073] It can be seen that the base of the non-standard logarithmic function is:
[0074]
[0075] In one embodiment, for each piecewise function, the non-standard logarithmic function curve corresponding to each piecewise function is calculated according to the coordinates of two turning points corresponding to each piecewise function.
[0076] Specifically, by (x i-1 ,y i-1 ) calculates the value of the base "a" of the nonstandard logarithmic function, that is:
[0077]
[0078] Where i represents the piecewise order of the piecewise function.
[0079] For example, the base of the nonstandard logarithmic function corresponding to the first piecewise function is:
[0080]
[0081] The A value corresponding to the first piecewise function is x0, and B can be found based on y0 and y1:
[0082]
[0083] Therefore, we can get that the non-standard logarithmic function corresponding to the first piecewise function is:
[0084]
[0085] Among them, (x0, y0) is the coordinate of the first turning point, (x1, y1) is the coordinate of the second turning point, X1 represents the input sound pressure intensity of the first piecewise function, and Y1 represents the output sound pressure intensity of the first piecewise function.
[0086] In one embodiment, the non-standard logarithmic function corresponding to each piecewise function is calculated in sequence according to the cyclic decrease of the maximum number of segments N:
[0087]
[0088] Among them, i=1,2,3,…,N-1, where N represents the maximum number of segments.
[0089] In one embodiment, if Figure 8 As shown, according to the above method, the logarithmic curves Y1 and Y2 of (x1, y1) and (x2, y2) are adjusted respectively, from Figure 8 It can be seen that the two curves deviate from the upper and lower parts of the passing points respectively, so a comprehensive average is needed to obtain the following Fig. 9 The average curve Y is shown:
[0090]
[0091] Among them, i=1,2.
[0092] S1023. Based on the averaging formula, calculate the average curve of each segmented logarithmic function curve to obtain the logarithmic function curve corresponding to the audio frequency band.
[0093] In one embodiment, according to the averaging formula:
[0094]
[0095] The average curve of the non-standard logarithmic function corresponding to all piecewise functions is calculated to obtain a logarithmic function curve corresponding to a sound frequency band.
[0096] In one embodiment, according to the above method, the logarithmic function curves corresponding to all the sound frequency bands are obtained.
[0097] S103, obtaining a sound frequency band and an input sound pressure intensity of the input sound pressure;
[0098] In one embodiment, a hearing aid or other hearing-assistive device captures sounds in the environment, i.e., input audio, through a microphone and converts it into an electrical signal, which is then decomposed into multiple frequency bands through multiple filters in a digital signal processing system.
[0099] In one embodiment, the gain is dynamically adjusted in different sound segments according to the input sound pressure intensity to ensure that the sound is within the user's comfortable hearing threshold. For example, in the compression area, the gain of the input signal decreases as the sound pressure level increases to avoid discomfort caused by excessively loud sounds. Therefore, when decomposing the input sound pressure into multiple sound segments, it is also necessary to detect the input sound pressure intensity of each sound segment.
[0100] S104 , based on the logarithmic function curve corresponding to the sound frequency band, perform gain calculation on the input sound pressure intensity to obtain the output sound pressure intensity.
[0101] In one embodiment, according to the logarithmic function curve corresponding to each sound segment of the sound frequency band, the input sound pressure intensity X of each sound segment is input, and the output sound pressure intensity Y of each sound segment can be calculated.
[0102] This embodiment provides a nonlinear sound pressure gain method based on a logarithmic function, which calculates the piecewise function of the audio band through the hearing loss function of the target user, and then calculates the logarithmic function curve of the audio band through the piecewise function, and then uses the logarithmic function curve to implement the gain calculation of the input sound pressure intensity to obtain the output sound pressure intensity, thereby avoiding the gain mutation of the sound pressure intensity at each segmentation point of the piecewise linear function, and bringing a better acoustic experience. At the same time, for the same audio band, the same logarithmic function curve is used for gain calculation, and there is no need to perform segmented processing on the input sound pressure intensity, which reduces the calculation complexity and improves the gain calculation efficiency.
[0103] Please refer to Fig.10 , Fig.10 A schematic flow chart of a second embodiment of a nonlinear sound pressure gain method based on a logarithmic function provided in an embodiment of the present application.
[0104] like Fig.10 As shown, based on the above Figure 1 In the illustrated embodiment, before step S103, the process further includes steps S201 to S203.
[0105] S201, obtaining device configuration parameters set by a target user;
[0106] In one embodiment, after the piecewise function and the non-standard logarithmic function are calculated based on the hearing loss data of the target user, they can be stored in the operating program of a hearing assistive device such as a hearing aid. When the hearing assistive device captures the ambient sound through a microphone, the piecewise function or the non-standard logarithmic function can be called to perform gain calculation on the input sound pressure without repeatedly evaluating the hearing loss data of the target user to construct the piecewise function and the non-standard logarithmic function.
[0107] In one embodiment, the hearing loss data of the target user, including the hearing thresholds in different sound frequency bands, is obtained through a hearing test, and then the device configuration parameters are set through a control panel on the hearing assistive device or a supporting application.
[0108] Exemplarily, the device configuration parameters may include volume, frequency band gain, compression ratio, delay requirement parameters, maximum output limit, and frequency response, etc.
[0109] S202, determining a target user's delay requirement parameter for sound pressure output based on device configuration parameters;
[0110] In one embodiment, the optimal device configuration parameters may be calculated based on the hearing threshold, used as default device configuration parameters, and recommended to the target user; the target user may also be allowed to set them independently according to personal preferences.
[0111] In one embodiment, the actual processing time and presentation effect of the same audio signal of the non-standard logarithmic function and the piecewise function can be used. The processing efficiency of the non-standard logarithmic function is higher, but the accuracy of the output sound pressure intensity is poor; while the processing efficiency of the piecewise function is low, but the accuracy of the output sound pressure intensity is higher. Therefore, after the target user experiences it, the delay requirement parameter can be selected according to the actual needs of the target user.
[0112] S203: When the delay requirement parameter is less than a preset delay parameter threshold, determine a logarithmic function curve corresponding to the audio frequency band.
[0113] In one embodiment, the delay parameter threshold can be determined based on the processing time of the non-standard logarithmic function and the piecewise function for the sound. For example, for the same audio signal, from the audio signal input to the output, the calculation time of the piecewise function is a first time length, and the calculation time of the non-standard logarithmic function is a second time length, wherein the second time length is less than the first time length. Therefore, the delay parameter threshold can be set to the time length between the second time length and the first time length.
[0114] In one embodiment, when the delay requirement parameter of the hearing aid device is less than the delay parameter threshold, it means that the target user has a higher delay requirement for sound pressure processing and needs a smaller delay time, that is, a faster output gain sound pressure is required; at this time, a non-standard logarithmic function is used to calculate the output sound pressure intensity.
[0115] In another embodiment, when the delay requirement parameter of the hearing aid device is greater than or equal to the delay parameter threshold, it means that the target user has a low delay requirement for sound pressure processing and can accept a larger delay time; at this time, a piecewise function can be used to calculate the output sound pressure intensity.
[0116] Furthermore, when the delay requirement parameter is greater than the delay parameter threshold, a gain calculation is performed on the input sound pressure intensity based on a piecewise function to obtain the output sound pressure intensity.
[0117] In one embodiment, the piecewise function divides the input sound into different frequency bands, and then performs piecewise linear enhancement or compression on the sound signal according to the input sound pressure intensity within the frequency band. This piecewise linear function has a fixed slope within each segment, and the piecewise linear function has a higher accuracy in calculating the sound signal gain within each segment. However, when there are more segments, more times the input sound pressure intensity needs to be judged, resulting in a longer calculation delay.
[0118] Generally, piecewise function is a multi-channel loudness compensation algorithm. Since the sensitivity of hearing-impaired patients to sound varies with frequency, hearing aids and other hearing-assistive devices should set different gains for sound signals in different frequency regions. These frequency regions are called channels or frequency bands. The final output signal is a combination of amplified different channels. Multi-channel loudness compensation algorithms can accurately match the hearing loss of hearing-impaired people. In addition, while gaining the sound, in order to prevent excessive gain to protect hearing, input and output compression strategies should be used at the same time.
[0119] In one embodiment, after a hearing aid or other hearing-assistive device captures an input sound signal, the input sound pressure intensity of each sound segment is determined according to the sound segmentation rule of the sound frequency band, and then the gain of the input sound pressure intensity of each sound segment is calculated using the piecewise function line corresponding to each sound segment, that is, the gain of the input sound pressure intensity of each channel is calculated independently in the channel of each sound segment. Finally, according to the gain of each sound segment, the input sound pressure intensity of each sound segment is gained (including signal enhancement and signal compression, etc.) to obtain the output sound pressure intensity.
[0120] This embodiment allows the coexistence of non-standard logarithmic functions and piecewise functions. According to the target user's demand and acceptability for delay, a function algorithm suitable for the target user is selected to perform gain processing of the input sound pressure intensity. Considering the processing efficiency and accuracy of the non-standard logarithmic function and the piecewise function, the user is allowed to select a delay parameter that suits his or her needs. Using a non-standard logarithmic function to calculate the output sound pressure intensity can meet the user's demand for fast response; using a piecewise function to calculate the output sound pressure intensity allows a longer processing time to obtain higher accuracy.
[0121] See also Fig.11 , Fig.11 It is a structural schematic diagram of a first embodiment of a nonlinear sound pressure gain device based on a logarithmic function provided by the present application. The nonlinear sound pressure gain device based on a logarithmic function is used to execute the aforementioned nonlinear sound pressure gain method based on a logarithmic function.
[0122] like Fig.11 As shown, the nonlinear sound pressure gain device 300 based on logarithmic function includes: a piecewise function calculation module 301, a logarithmic function curve calculation module 302, an input sound pressure determination module 303 and an output sound pressure intensity calculation module 304.
[0123] A piecewise function calculation module 301 is used to calculate a piecewise function of at least one audio frequency band based on the hearing loss data of the target user;
[0124] The logarithmic function curve calculation module 302 is used to calculate the logarithmic function curve of each audio frequency band based on the piecewise function;
[0125] An input sound pressure determination module 303, used to obtain a sound frequency band and an input sound pressure intensity of the input sound pressure;
[0126] The output sound pressure intensity calculation module 304 is used to perform gain calculation on the input sound pressure intensity based on the logarithmic function curve corresponding to the sound frequency band to obtain the output sound pressure intensity.
[0127] In one embodiment, the nonlinear sound pressure gain device 300 based on a logarithmic function further includes an algorithm determination module, including:
[0128] A configuration parameter acquisition unit, used to acquire device configuration parameters set by a target user;
[0129] A delay requirement determination unit, used to determine a delay requirement parameter of a target user for sound pressure output based on a device configuration parameter;
[0130] The logarithmic function curve determining unit is used to determine the logarithmic function curve corresponding to the audio frequency band when the delay requirement parameter is less than a preset delay parameter threshold.
[0131] In one embodiment, the algorithm determination module further includes:
[0132] The gain calculation unit is used to perform gain calculation on the input sound pressure intensity based on a piecewise function to obtain the output sound pressure intensity when the delay demand parameter is greater than the delay parameter threshold.
[0133] In one embodiment, the logarithmic function curve calculation module 302 includes:
[0134] A turning point coordinate calculation unit, used for calculating the turning point coordinates of at least one segment turning point in the audio frequency band based on the segment function;
[0135] A piecewise logarithmic function curve calculation unit, used for respectively calculating the piecewise logarithmic function curves between each piecewise turning point based on the non-standard logarithmic function and the turning point coordinates;
[0136] The logarithmic function curve calculation unit is used to calculate the average curve of each segmented logarithmic function curve based on the average formula to obtain the logarithmic function curve corresponding to the sound frequency band.
[0137] In one embodiment, the turning point coordinate calculation unit includes:
[0138] A maximum segment number determination subunit, used for determining a maximum segment number of wide dynamic range compression WDRC in a sound frequency band based on performance parameters of the hearing gain device;
[0139] A piecewise linear function calculation subunit, for calculating a piecewise linear function between each segment turning point in the sound frequency band based on the WDRC piecewise function, the hearing loss data and the maximum number of segments;
[0140] The turning point coordinate obtaining subunit is used to obtain the turning point coordinates of each segment turning point based on the piecewise linear function between the segment turning points.
[0141] In one embodiment, the piecewise logarithmic function curve calculation unit includes:
[0142] The piecewise logarithmic function calculation subunit is used to calculate the piecewise logarithmic function curve between each piecewise turning point based on the non-standard logarithmic function and the turning point coordinates corresponding to the adjacent piecewise turning points;
[0143] Among them, the piecewise logarithmic function curve is expressed as:
[0144]
[0145]
[0146] A i =x i-1
[0147]
[0148] Among them, i represents the number of segment turning points in the audio band, X i represents the input sound pressure intensity of the sound frequency band between the i-th segment turning point and the i-1-th segment turning point, Y i represents the output sound pressure intensity of the audio frequency band between the i-th segment turning point and the i-1-th segment turning point, a i represents the base of the piecewise logarithmic function, A i represents the input sound pressure intensity of the i-1th segment turning point, B i represents the average value of the output sound pressure intensity between the i-th segment turning point and the i-1-th segment turning point, (x i-1 ,y i-1 ) represents the turning point coordinates of the i-1th segment turning point, (x i ,y i ) represents the turning point coordinates of the i-th segment turning point.
[0149] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned embodiment of the nonlinear sound pressure gain method based on a logarithmic function, and will not be repeated here.
[0150] The apparatus provided in the above embodiment may be implemented in the form of a computer program. The computer program may be Fig.12 Runs on the computer device shown.
[0151] See also Fig.12 , Fig.12 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.
[0152] See also Fig.12 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0153] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any nonlinear sound pressure gain method based on a logarithmic function.
[0154] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0155] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any nonlinear sound pressure gain method based on a logarithmic function.
[0156] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0157] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0158] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:
[0159] Calculate the piecewise function of the sound frequency band based on the hearing loss data of the target user;
[0160] Based on the piecewise function, calculate the logarithmic function curve of the sound frequency band;
[0161] Obtain the sound frequency band and input sound pressure intensity of the input sound pressure;
[0162] Based on the logarithmic function curve corresponding to the sound frequency band, the input sound pressure intensity is gain calculated to obtain the output sound pressure intensity.
[0163] In one embodiment, before the processor performs gain calculation on the input sound pressure intensity based on the logarithmic function curve corresponding to the sound frequency band to obtain the output sound pressure intensity, it is also used to implement:
[0164] Get the device configuration parameters set by the target user;
[0165] Based on the equipment configuration parameters, determine the target user's delay requirement parameters for sound pressure output;
[0166] When the delay requirement parameter is less than a preset delay parameter threshold, a logarithmic function curve corresponding to the audio frequency band is determined.
[0167] In one embodiment, after determining the delay requirement parameter of the target user for the sound pressure output based on the device configuration parameter, the processor is further configured to implement:
[0168] When the delay requirement parameter is greater than the delay parameter threshold, a gain calculation is performed on the input sound pressure intensity based on a piecewise function to obtain the output sound pressure intensity.
[0169] In one embodiment, when the processor calculates the logarithmic function curve of the sound frequency band based on the piecewise function and the hearing loss data of the target user, it is configured to implement:
[0170] Based on the piecewise function, calculating the turning point coordinates of at least one piecewise turning point in the audio frequency band;
[0171] Based on the non-standard logarithmic function and the turning point coordinates, the piecewise logarithmic function curves between each piecewise turning point are calculated respectively;
[0172] Based on the averaging formula, the average curve of each segmented logarithmic function curve is calculated to obtain the logarithmic function curve corresponding to the sound frequency band.
[0173] In one embodiment, when calculating the turning point coordinates of at least one segment turning point in the audio frequency band based on the piecewise function, the processor is used to implement:
[0174] Determine the maximum number of segments of wide dynamic range compression (WDRC) within the sound frequency band based on the performance parameters of the hearing enhancement device;
[0175] Based on the WDRC piecewise function, hearing loss data and the maximum number of segments, the piecewise linear function between the turning points of each segment in the sound frequency band is calculated;
[0176] Based on the piecewise linear function between each piecewise turning point, the turning point coordinates of each piecewise turning point are obtained.
[0177] In one embodiment, when the processor implements calculating the piecewise logarithmic function curves between each piecewise turning point based on the non-standard logarithmic function and the turning point coordinates, the processor implements:
[0178] Based on the non-standard logarithmic function and the turning point coordinates corresponding to the adjacent segment turning points, a segment logarithmic function curve between the segment turning points is calculated;
[0179] Among them, the piecewise logarithmic function curve is expressed as:
[0180]
[0181] A i =x i-1
[0182]
[0183] Among them, i represents the number of segment turning points in the audio band, X i represents the input sound pressure intensity of the sound frequency band between the i-th segment turning point and the i-1-th segment turning point, Y i represents the output sound pressure intensity of the audio frequency band between the i-th segment turning point and the i-1-th segment turning point, a i represents the base of the piecewise logarithmic function, A i represents the input sound pressure intensity of the i-1th segment turning point, B i represents the average value of the output sound pressure intensity between the i-th segment turning point and the i-1-th segment turning point, (x i-1 ,y i-1 ) represents the turning point coordinates of the i-1th segment turning point, (x i ,y i ) represents the turning point coordinates of the i-th segment turning point.
[0184] A computer-readable storage medium is also provided in an embodiment of the present application, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement any one of the nonlinear sound pressure gain methods based on a logarithmic function provided in the embodiments of the present application.
[0185] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0186] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A nonlinear sound pressure gain method based on a logarithmic function, characterized in that: The method comprises: Calculate the piecewise function of the sound frequency band based on the hearing loss data of the target user; Based on the piecewise function, calculating the logarithmic function curve of the sound frequency band; Obtain the sound frequency band and input sound pressure intensity of the input sound pressure; Based on the logarithmic function curve corresponding to the sound frequency band, a gain calculation is performed on the input sound pressure intensity to obtain an output sound pressure intensity.
2. The nonlinear sound pressure gain method based on logarithmic function according to claim 1, characterized in that: Before performing gain calculation on the input sound pressure intensity based on the logarithmic function curve corresponding to the sound frequency band to obtain the output sound pressure intensity, the method further includes: Get the device configuration parameters set by the target user; Determining the delay requirement parameters of the target user for the sound pressure output based on the device configuration parameters; When the delay requirement parameter is less than a preset delay parameter threshold, the logarithmic function curve corresponding to the audio frequency band is determined.
3. The nonlinear sound pressure gain method based on logarithmic function according to claim 2, characterized in that: After determining the target user's delay requirement parameter for sound pressure output based on the device configuration parameter, the method further includes: When the delay requirement parameter is greater than the delay parameter threshold, a gain calculation is performed on the input sound pressure intensity based on the piecewise function to obtain the output sound pressure intensity.
4. The nonlinear sound pressure gain method based on logarithmic function according to claim 1, characterized in that: The step of calculating the logarithmic function curve of the audio frequency band based on the piecewise function comprises: Based on the piecewise function, calculating the turning point coordinates of at least one piecewise turning point in the audio frequency band; Based on the non-standard logarithmic function and the turning point coordinates, respectively calculating the piecewise logarithmic function curves between the piecewise turning points; Based on the averaging formula, the average curve of each of the segmented logarithmic function curves is calculated to obtain the logarithmic function curve corresponding to the audio frequency band.
5. The nonlinear sound pressure gain method based on logarithmic function according to claim 4, characterized in that: The step of calculating the turning point coordinates of at least one segment turning point in the audio frequency band based on the segment function comprises: Determining the maximum number of segments of wide dynamic range compression (WDRC) within the audio frequency band based on the performance parameters of the hearing gain device; Calculating a piecewise linear function between each segment turning point in the audio frequency band based on the WDRC piecewise function, the hearing loss data and the maximum number of segments; Based on the piecewise linear function between each piecewise turning point, the turning point coordinates of each piecewise turning point are obtained.
6. The nonlinear sound pressure gain method based on logarithmic function according to claim 4, characterized in that: The step of calculating the piecewise logarithmic function curves between the piecewise turning points based on the non-standard logarithmic function and the turning point coordinates comprises: Based on the non-standard logarithmic function and the turning point coordinates corresponding to the adjacent segment turning points, calculating a segment logarithmic function curve between the segment turning points; Wherein, the piecewise logarithmic function curve is expressed as: Among them, i represents the number of segment turning points in the audio band, X i represents the input sound pressure intensity of the sound frequency band between the i-th segment turning point and the i-1-th segment turning point, Y i represents the output sound pressure intensity of the audio frequency band between the i-th segment turning point and the i-1-th segment turning point, a i represents the base of the piecewise logarithmic function, A i represents the input sound pressure intensity of the i-1th segment turning point, B i represents the average value of the output sound pressure intensity between the i-th segment turning point and the i-1-th segment turning point, (x i-1 ,y i-1 ) represents the turning point coordinates of the i-1th segment turning point, (x i ,y i ) represents the turning point coordinates of the i-th segment turning point.
7. The nonlinear sound pressure gain method based on logarithmic function according to claim 4, characterized in that: The averaging formula is expressed as: Where i = 1, 2, 3, ..., N-1, N represents the maximum number of segments, Y i A piecewise logarithmic function curve representing the audio frequency band between the i-th segment turning point and the i-1-th segment turning point.
8. The nonlinear sound pressure gain method based on logarithmic function according to claim 1, characterized in that: The audio frequency band includes a silent area, an amplified area, a compressed area and a restricted area.
9. A nonlinear sound pressure gain device based on a logarithmic function, characterized in that: The nonlinear sound pressure gain device based on logarithmic function comprises: A piecewise function calculation module, used to calculate the piecewise function of the sound frequency band based on the hearing loss data of the target user; A logarithmic function curve calculation module, used for calculating the logarithmic function curve of the audio frequency band based on the piecewise function; An input sound pressure determination module, used to obtain a sound frequency band and input sound pressure intensity of the input sound pressure; The output sound pressure intensity calculation module is used to perform gain calculation on the input sound pressure intensity based on the logarithmic function curve corresponding to the sound frequency band to obtain the output sound pressure intensity.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the nonlinear sound pressure gain method based on a logarithmic function as claimed in any one of claims 1 to 8 are implemented.
