Abstract:
The present invention relates to an audio processing method for hearing protection in an ambient environment, includes steps of: sampling digital audio signals decoded to obtain a plurality of amplitude values of the digital audio signals; obtaining a default gain value; calculating an actual audio energy of the digital audio signals sampled during a predetermined period time according to the amplitude values sampled in the predetermined period time and the default gain value; collecting ambient noises to calculate an ambient noise level; obtaining a reference audio energy according to the ambient noise level; comparing the actual audio energy with the reference audio energy; and generating a hearing protection signal if the actual audio energy reaches the reference audio energy, whereby protecting users&#39; hearing. The present invention also provides a corresponding audio processing apparatus.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     1. Field of the Invention  
         [0002]     The present invention relates to an audio processing apparatus and method for hearing protection in an ambient environment, especially to an audio processing apparatus and method for evaluating ambient noise level, and automatically adjusting a default gain value or emitting a prompt signal according to the ambient noise level evaluated.  
         [0003]     2. Description of Related Art  
         [0004]     The continuous development of new digital technologies has helped portable audio devices (such as MP3 player) become popular. When environmental noise external of the portable audio device is loud or when a favorite song is played, a user commonly increases a gain value of the portable audio device. However users all have a physiological hearing threshold, i.e., loudness discomfort level (LDL). If the user is exposed to an environment with a noise level that is larger than the user&#39;s LDL for a long time, the user&#39;s hearing may be damaged.  
         [0005]     In order to solve the problems mentioned, there is a common gain control apparatus and method available in the market. The gain control apparatus provides a gain setting table, the gain setting table lists a plurality of gain values corresponding to each noise level. The gain control apparatus firstly senses ambient noise, and calculates an ambient noise level of the ambient noise in a predetermined time field; obtaining a predetermined gain value corresponding to the ambient noise level from the gain setting table; adjusts a gain value to the predetermined gain value. Whereby the gain value of the gain control apparatus is changeable along with the ambient noise level.  
         [0006]     However, if a user is in an environment where the ambient noise level changes frequently, the gain control apparatus will frequently change the gain value accordingly, whereby the user will be uncomfortable. Furthermore, audio signals with different amplitudes will have different loudness at a same gain value.  
         [0007]     Therefore, a heretofore unaddressed need exists in the industry to overcome the aforementioned deficiencies and inadequacies.  
       SUMMARY OF THE INVENTION  
       [0008]     In order to solve said problems, the present invention provides an audio processing method, apparatus and system for hearing protection while an audio processing apparatus outputs audio signals in an ambient environment. The audio processing method, apparatus and system evaluates ambient noise level, and automatically adjusts a gain value or emitting a prompt signal according to the ambient noise level evaluated.  
         [0009]     The audio processing method includes the steps of: sampling digital audio signals decoded to obtain a plurality of amplitude values of the digital audio signals; obtaining a default gain value; calculating an actual audio energy of the digital audio signals sampled during a predetermined period time according to the amplitude values sampled in the predetermined period time and the default gain value; collecting ambient noises to calculate an ambient noise level; obtaining a reference audio energy according to the ambient noise level; comparing the actual audio energy with the reference audio energy; and generating a hearing protection signal if the actual audio energy reaches the reference audio energy.  
         [0010]     The audio processing apparatus includes a storage unit, a processing unit, a decoding unit, a digital/analog converter, a gain control unit, a sound output device, a microphone, an analog/digital converter and a gain management unit. The storage unit stores a plurality of audio files and a default gain value. The processing unit fetches an audio file from the storage unit. The decoding unit decodes the audio file fetched to generate digital audio signals. The digital/analog converter converts the digital audio signals to analog audio signals. The gain control unit amplifies the analog audio signals converted according to the default gain value stored in the storage unit. The sound output device outputs sound corresponding to the analog audio signals amplified. The microphone collects ambient noises from the ambient environment to generate analog noise signals. The analog/digital converter converts the analog noise signals to digital noise signals. The gain management unit includes a sampling module, an obtaining module, a calculating module and a noise processing module. The sampling module samples the digital audio signals generated by the decoding unit to obtain a plurality of amplitude values of the digital audio signals sampled. The obtaining module obtains the default gain value of the gain control unit from the storage unit. The calculating module calculates an actual audio energy during a predetermined period time by the default gain value and the amplitude values sampled in the predetermined period time. The noise processing module calculates an ambient noise level according to the digital noise signals converted, obtaining a reference audio energy according to the ambient noise level, comparing the actual audio energy with the reference audio energy, and generating a hearing protection signal if the actual audio energy reaches the reference audio energy.  
         [0011]     In another aspect of the invention, the audio processing apparatus includes a storage unit, a processing unit, a decoding unit, a digital/analog converter, a gain control unit, a sound output device, a microphone and an analog/digital converter. The storage unit stores a plurality of audio files and a default gain value. The processing unit fetches an audio file from the storage unit. The decoding unit decodes the audio file fetched to generate digital audio signals. The digital/analog converter converts the digital audio signals to analog audio signals. The gain control unit amplifies the analog audio signals converted according to the default gain value stored in the storage unit. The sound output device outputs sound corresponding to the analog audio signals amplified. The microphone collects ambient noises from the ambient environment to generate analog noise signals. The analog/digital converter converts the analog noise signals to digital noise signals. The processing unit includes a sampling module, an obtaining module, a calculating module and a noise processing module. The sampling module samples the digital audio signals generated by the decoding unit to obtain a plurality of amplitude values of the digital audio signals sampled. The obtaining module obtains the default gain value of the gain control unit from the storage unit. The calculating module calculates an actual audio energy during a predetermined period time by the default gain value and the amplitude values sampled in the predetermined period time. The noise processing module calculates an ambient noise level according to the digital noise signals converted, obtaining a reference audio energy according to the ambient noise level, comparing the actual audio energy with the reference audio energy, and generating a hearing protection signal if the actual audio energy reaches the reference audio energy.  
         [0012]     Other systems, methods, features, and advantages will be or become apparent to one with skill in the art upon examination of the following drawings and detailed description. It is intended that all such additional systems, methods, features, and advantages be included within this description, be within the scope of the present invention, and be protected by the accompanying claims. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0013]      FIG. 1  is a block diagram of a hardware infrastructure of an audio processing apparatus for hearing protection in an ambient environment in accordance with a first preferred embodiment of the present invention;  
         [0014]      FIG. 2  is a schematic diagram of main function modules of a gain management unit of  FIG. 1 ;  
         [0015]      FIG. 3  is a common flowchart of playing an audio file;  
         [0016]      FIG. 4  is a flowchart of a preferred audio processing method for hearing protection in ambient environment by utilizing the audio processing apparatus of  FIG. 1  in according with the first preferred embodiment of the present invention;  
         [0017]      FIG. 5  is a flowchart of a preferred audio processing method for hearing protection in ambient environment by utilizing the audio processing apparatus of  FIG. 1  in according with a second preferred embodiment of the present invention;  
         [0018]      FIG. 6  is a block diagram of a hardware infrastructure of an audio processing apparatus for hearing protection in an ambient environment in accordance with a third preferred embodiment of the present invention; and  
         [0019]      FIG. 7  is a schematic diagram of main function modules of a processing unit of  FIG. 6 . 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0020]     The audio processing apparatus of the present invention allows hearing protection while outputting audio signals in an ambient environment. The audio processing apparatus can be used in a car stereo system and other portable electric device such as an MP3, an electronic book, a mobile telephone, and so on. In the preferred embodiment, for simplicity, the audio processing apparatus incorporated in an MP3 is depicted. The following detailed description of the embodiments is made with reference to the attached drawings.  
         [0021]      FIG. 1  is a block diagram of a hardware infrastructure of an audio processing apparatus  10  for hearing protection in an ambient environment in accordance with a first preferred embodiment of the present invention. The audio processing apparatus  10  includes a storage unit  11 , a command input unit  12 , a processing unit  13 , a decoding unit  14 , a digital/analog (D/A) converter  15 , a gain control unit  16 , a sound output device  17 .  
         [0022]     The storage unit  11  stores a plurality of audio files, a default gain value, and a decoding program. The storage unit  11  can be a flash storage, a hard disk driver, and the like. The processing unit  13  controls components of the apparatus  10 , i.e., the storage unit  11 , the command input unit  12 , the decoding unit  14 , and the gain control unit  16 . The processing unit  13  can be a digital signal processor (DSP), a processing unit (CPU), and the like.  
         [0023]     The command input unit  12  generates a command for playing an audio file in response to a selection operation on the audio file to be played. The processing unit  13  fetches the audio file from the storage unit  11  in response to the command for playing the audio file.  
         [0024]     The decoding unit  14  activates the decoding program stored in the storage unit  11 , decodes the audio file fetched from the storage unit  11  to generate digital audio signals. The D/A converter  15  converts the digital audio signals from the decoding unit  14  to generate analog audio signals.  
         [0025]     The gain control unit  16  amplifies the analog audio signals received from the D/A converter  15  by a default gain value stored in the storage unit  11 . The sound output device  17  outputs sound corresponding to the analog audio signals amplified. The sound output device  17  can be an earphone or a speaker.  
         [0026]     The audio processing apparatus  10  further includes a gain management unit  18  controlled by the processing unit  13 . Referring to  FIG. 2 , the gain management unit  18  includes a sampling module  180 , an obtaining module  181 , a calculating module  182 , a noise processing module  183 , and a hearing protection module  184 .  
         [0027]     The sampling module  180  samples the digital audio signals generated by the decoding unit  14  to obtain a plurality of amplitude values of the digital audio signals sampled. The obtaining module  181  obtains the default gain value of the gain control unit  16  from the storage unit  11 .  
         [0028]     The calculating module  182  calculates an actual audio energy during a predetermined period time according to the default gain value and the amplitude values sampled in the predetermined period time by: Q=[Σ(mi*V) 2 /N] 1/2 , where Q presents the actual audio energy, T presents the predetermined period time, i is any natural number, mi presents the amplitude values sampled in the predetermined period time T, V presents the default gain value, and N presents a count of the amplitude values mi sampled in the predetermined period time T.  
         [0029]     The audio processing apparatus  10  further includes a microphone  19  and an analog/digital converter  20 . The microphone  18  collects ambient noises from the ambient environment to generate analog noise signals. The analog/digital converter  20  converts the analog noise signals to digital noise signals.  
         [0030]     The noise processing module  183  calculates an ambient noise level according to the digital noise signals generated, obtains a reference audio energy corresponding the ambient noise level calculated, compares the actual audio energy with the reference audio energy, and generates a hearing protection signal if the actual audio energy reaches the reference audio energy. The reference audio energy is an upper threshold allowable for a user&#39;s hearing.  
         [0031]     The hearing protection module  184  signals the gain control unit  16  to automatically reduce the default gain value to a reduced gain value according to the hearing protection signal, and stores the reduced gain value in the storage unit  11 , thus, updating the default gain value of the gain control unit  16  stored therein. Then, the gain control unit  16  amplifies the analog audio signals from the D/A converter  15  by the reduced gain value.  
         [0032]     In other preferred embodiment, the hearing protection module  184  may generate prompt signals to prompt the user to manually reduce the default gain value to the reduced gain value according to the hearing protection signal, and stores the reduced gain value in the storage unit  11 , thus, updating the default gain value of the gain control unit  16  stored therein. Then, the gain control unit  15  amplifies the prompt signals generated, and emits the prompt signals amplified to the sound output device  17 . Furthermore, the hearing protection module  184  may also directly emit the prompt signals generated to the sound output device  17 .  
         [0033]      FIG. 3  is a common flowchart for playing an audio file. In step S 30 , the command input unit  12  generates the command for playing the audio file in response to the selection operation on the audio file to be played. In step S 31 , the processing unit  13  fetches the audio file from the storage unit  11  in response to the command generated by the command input unit  12 .  
         [0034]     In step S 32 , the decoding unit  14  decodes the audio file fetched from the storage unit  11  to generate digital audio signals. In step S 33 , the D/A converter  15  converts the digital audio signals from the decoding unit  14  to generate analog audio signals.  
         [0035]     In step S 34 , the gain control unit  16  amplifies the analog audio signals from the D/A converter  15  by the default gain value stored in the storage unit  11 . In step S 35 , the sound output device  17  outputs sound corresponding to the analog audio signals amplified.  
         [0036]      FIG. 4  is a flowchart of a first preferred audio processing method for hearing protection in ambient environment by utilizing the audio processing apparatus of  FIG. 1 . In step S 40 , the sampling module  180  samples the digital audio signals generated by the decoding unit  14  to obtain the plurality of amplitude values of the digital audio signals sampled. In step S 41 , the obtaining module  181  obtains the default gain value of the gain control unit  16  from the storage unit  11 .  
         [0037]     In step S 42 , the calculating module  182  calculates the actual audio energy during the predetermined period time according to the default gain value and the amplitude values sampled by the sampling module  180  in the predetermined period time.  
         [0038]     Synchronously, in step S 43 , the microphone  18  collects ambient noises from the ambient environment. In step S 44 , the analog/digital converter  20  converts the ambient noises to the digital ambient noises.  
         [0039]     In step S 45 , the noise processing module  183  calculates the ambient noise level according to the digital ambient noises converted by the analog/digital converter  20 .  
         [0040]     In step S 46 , the noise processing module  183  subtracts the predetermined ambient noise level from the ambient noise level to get the margin, divides the predetermined ambient noise level by the margin to obtain the change ratio by: change ratio=(ambient noise level−predetermined ambient noise level)/predetermined ambient noise level.  
         [0041]     In step S 47 , the noise processing module  183  multiplies the predetermined audio energy by the change ratio to obtain the reference audio energy.  
         [0042]     In step S 48 , the noise processing module  183  compares the actual audio energy with the reference audio energy, determines whether the actual audio energy reaches the reference audio energy. If the actual audio energy does not reach the reference audio energy, the procedure goes to start.  
         [0043]     If the actual audio energy reaches the reference audio energy, in step S 49 , the hearing protection module  184  signals the gain control unit  16  to automatically reduce the default gain value to the reduced gain value according to the hearing protection signal, and stores the reduced gain value in the storage unit  11 , thus, updating the default gain value stored therein, or emits prompt signals to prompt the user to manually reduce the default gain value according to the hearing protection signal, then the procedure goes to start.  
         [0044]      FIG. 5  is a flowchart of a second preferred audio processing method for hearing protection in ambient environment by utilizing the audio processing apparatus of  FIG. 1 . The difference between the second preferred method and the first preferred method is that in step S 56 , the noise processing module  183  obtains the reference audio energy corresponding the ambient noise level calculated from the setting table listed in the storage unit  11 .  
         [0045]      FIG. 6  is a block diagram of a hardware infrastructure of an audio processing system for hearing protection in accordance with a third preferred embodiment of the present invention. The difference between the third embodiment and the first and second embodiment is that the audio processing apparatus  100  of the third embodiment does not include the gain management unit  18 , and a processing unit  61  performs the functions thereof. Referring to  FIG. 7 , the processing unit  61  includes a sampling module  610 , an obtaining module  611 , a calculating module  612 , a noise processing module  613 , and a hearing protection module  614 , which respectively performs the same functions as the sampling module  180 , the obtaining module  181 , the calculating module  182 , the noise processing module  183 , and the hearing protection module  184  of the gain management unit  18  in the first and second embodiment.  
         [0046]     It is understood that the invention may be embodied in other forms without departing from the spirit thereof. Thus, the present examples and embodiments are to be considered in all respects as illustrative and not restrictive, and the invention is not to be limited to the details given herein.