The embodiments discussed herein are related to a sound processing apparatus and a breathing detection method.
Conventionally, with respect to technology that detects the state of breathing during sleep, one approach has been to detect the state of breathing by detecting breath sounds, dividing the detected breath sounds into plural frequency blocks by a band-pass filter, etc., and comparing a detection value (voltage value) of each divided block with a predetermined threshold (see, e.g., Japanese Laid-Open Patent Publication No. 2007-289660).
Since breathing differs among individuals and even changes in various ways with the same individual depending on sleeping conditions, such as changes in the method of breathing (e.g., switching from nose breathing to mouth breathing) and changes in sleeping position (e.g., switching from sleeping on one's side to sleeping face down or on one's back), the frequency characteristics of breathing change. Therefore, according to the conventional technology, the method of using a threshold for breathing detects no breathing for a detected value that is below the threshold. If the detected value of noise exceeds the threshold, this method detects the noise as breathing. Thus, the conventional technology has a problem of erroneously determining the state of breathing when there are differences among individuals or a change in the state of breathing.
According to an aspect of an embodiment, a sound processing apparatus includes a processor configured to convert an input audio signal into a frequency domain signal; calculate similarity of the current frequency domain signal and a previous frequency domain signal; and determine a breathing state of a biological entity indicated by the audio signal, based on the similarity.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention.
Preferred embodiments of a sound processing apparatus and a breathing detection method will be described in detail with reference to the accompanying drawings. The sound processing apparatus and the breathing detection method accurately determine the breathing state, using breathing cycles during sleep, the duration of one breath, and similarity of frequency characteristics of temporally proximal breaths.
The time/frequency converting unit 2 receives an input of a digital audio signal divided into frames according to a given sampling rate and converts this temporally varying audio signal into a frequency domain signal. The power spectrum calculating unit 3 calculates a temporal power spectrum of the frequency domain signal resulting from the conversion of the audio signal by the time/frequency converting unit 2. The similarity calculating unit 4 calculates the similarity of the current power spectrum calculated by the power spectrum calculating unit 3 and a past power spectrum of a predetermined range. The duration calculating unit 5 calculates the duration of the similarity calculated by the similarity calculating unit 4. The determining unit 6 determines the presence or absence of breathing based on the duration calculated by the duration calculating unit 5.
The sound processing apparatus accurately determines the breathing state by performing processing utilizing the above properties of breathing states during sleep. Breathing (the person is breathing) is determined when a signal having frequency characteristics similar to those of the current and past signals that include the breathing cycle T1 is continuously present for a given period of time (the duration period T2). Thus, the sound processing apparatus determines the current signal, which continues to be similar to the past signals for a given period of time, to indicate breathing and therefore, can correctly detect breathing even when the breathing is indicated by minimal electrical power (breath sounds during sleep are small) and exclude noise indicated by significant electrical power, thereby preventing erroneous detection. Consequently, the presence or absence of breathing can be accurately determined irrespective of the magnitude of the electrical power and surrounding environmental conditions.
The similarity calculating unit 24 compares the current power spectrum and a past power spectrum stored in the buffer 27 to calculate the similarity. Past similarity data for a predetermined period and calculated by the similarity calculating unit 24 is stored in a buffer 28. The duration calculating unit 25 compares the current similarity with past similarity stored in the buffer 28 to calculate the duration period. The determining unit 26 determines the state as a “breathing state” if the duration period calculated by the duration calculating unit 25 is within a predetermined range (T2).
The similarity is determined using the following equation:
|P(t,k)−P(t−x,k)|≦TH
If the above equation is satisfied, the flag is flag(x,k)=1. Namely, when the electrical power of the current frame t relative to the electrical power of the previous frame (t−x) is less than or equal to threshold TH, it is determined that “there is a similarity” and the flag is set to “1”. Conversely, when the electrical power of the current frame t relative to the electrical power of the previous frame (t−x) is greater than threshold TH, it is determined that “there is no similarity” and the flag is set to “0”.
The similarity calculating unit 24 performs the above processing with respect to all frequency bands and regards the sum of the flags of all frequency bands as shown in the following equation as similarity.
Thereafter, the similarity calculating unit 24 calculates the similarity with respect to each value of x satisfying x1≦x≦x2 (i.e., 1 breathing cycle T1).
On the other hand, if the electrical power of the power spectrum of the current frame is greater than threshold TH based on the electrical power of the power spectrum of the previous frame (step S3: NO), the similarity calculating unit 24 goes to step S5 without adding 1 to the similarity. At step S5, the similarity calculating unit 24 determines if the index is the final index and if not (step S5: NO), the similarity calculating unit 24 shifts the frequency k (index number+1) (step S6) and returns to step S3. On the other hand, if the index is the final index (step S5: YES), the similarity determination has been completed with respect to all frequencies and the processing is finished.
In terms of the value of the similarity, the duration calculating unit 25 determines a similarity exceeding the threshold as a high similarity. For example, if the threshold is set at 10, the hatched area of the similarity value “12” exceeding the threshold 10 is affixed with an identifier F and is stored to the buffer 28. Therefore, in practice, the values depicted in
The continued frames at distance xa and distance xb are determined to have finished the frame continuation when the value of the similarity becomes lower than the threshold. In
(1) When a start frame of the duration period in which the similarity is greater than or equal to the threshold at distance xb is the same frame as the start frame of a duration period in which the similarity is greater than or equal to the threshold at distance xa or a frame previous thereto, the duration period at distance xa is not used and the duration period corresponding to the continued frames at distance xb is obtained.
(2) In cases other than (1) above, the duration period corresponding to the continued frames at distance xa is obtained.
The similarity calculating unit 24 calculates the similarity by the processing depicted in
At step S16, if the similarity of the input signal (frame) becomes less than the threshold (step S16: NO), the duration calculating unit 25 determines if there is a component (frequency) of continued duration at another distance x from the current frame (step S22). If there is a component of continued duration at another distance x from the current frame (step S22: YES), the duration calculating unit 25 calculates the duration period up to the previous frame (step S23).
The determining unit 26 determines if the duration period is within the range of the one-breath duration period T2 (y1≦y≦y2) (step S24). If the duration period is within the range of one-breath duration period T2 (step S24: YES), the determining unit 26 determines that breathing is present and outputs results of the breathing determination (step S25). The determining unit 26 resets the duration period to 0 (step S26) and the flow returns to step S18. On the other hand, at step S22, if there is no component of continued duration at another distance x from the current frame (step S22: NO) or at step S24, if the duration period is not within the range of one-breath duration period T2 (step S24: NO), the flow goes to step S26 where the duration period is reset to 0.
At step S18, if distance x from the current frame has reached x2 (five seconds in the above example) (step S18: YES), the duration calculating unit 25 determines if the current frame is the final frame (step S20) and if not (step S20: NO), the flow returns to step S12 to execute processing of the next frame (step S21). On the other hand, at step S20, if the current frame is the final frame (step S20: YES), the duration calculating unit 25 ends the breathing determining processing.
According to the first embodiment, breathing sound similarity is obtained by frequency band and if a similar signal has a given duration period, then it is determined that there is breathing. Therefore, even small breaths during sleep can be detected correctly and the presence or absence of the breathing can be determined accurately.
A second embodiment represents the first embodiment with an additional function of removing the background noise.
In the estimation of the background noise, for example, in each frequency band, the value of the previous power is updated with the value of the current power when the power of the current frame is less than or equal to N times (e.g., twice) the power indicative of the estimated noise level at the previous frame. For example, the background noise pow(t,k)=COEFF×noise_pow (t−x, k)+(1−COEFF)×P(t,k) (P(t,k)≦2×noise_pow(t−x,k)) noise_pow(t−x,k) (otherwise) (where, COEFF is a constant.)
The above background noise estimating method is one example and processing may be performed of averaging the electrical power within a given period. Various processing can be used.
|P(t,k)−P(t−x,k)|≦TH
Namely, when the above conditions of the similarity determination are satisfied but the electrical power P(t,k) is of a level lower than the background noise level depicted in
At step 33, if the power spectrum of the current frame is greater than the background noise level (step S33: YES), the similarity calculating unit 34 compares the power spectrum of the current frame with the power spectrum of the previous frame and determines if the difference is less than or equal to threshold TH (step S34). If the electrical power of the power spectrum of the current frame is less than or equal to threshold TH based on the electrical power of the power spectrum of the previous frame (step S34: YES), the similarity calculating unit 34 adds 1 to the similarity (step S35). On the other hand, if the electrical power of the power spectrum of the current frame is greater than threshold TH based on the electrical power of the power spectrum of the previous frame (step S34: NO), the similarity calculating unit 34 goes to step S36 without performing the addition of the similarity. At step S36, the similarity calculating unit 34 determines if the current index is the final index and if not (step S36: NO), the similarity calculating unit 34 shifts frequency k (index number +1) (step S37) and returns to step S33. On the other hand, if the current index is the final index (step S36: YES), the similarity determination has been completed with respect to all frequencies and the processing is finished.
According to the second embodiment, similarity can be prevented from being heightened between frames in which only the background noise is present and the breathing state can be detected more accurately.
In a third embodiment, another configuration of the similarity calculating unit will be described. The third embodiment uses a correlation of the power spectra calculated by the power spectrum calculating unit 23 as the similarity. The similarity calculating unit of the third embodiment uses the components depicted in the first embodiment but internal processing of the similarity calculating unit 24 differs. While various methods are conceivable for the correlation calculation, a general correlation equation using a correlation coefficient such as the following equation can be used.
A fourth embodiment is configured to prevent an erroneous determination consequent to background noise as described by the second embodiment and uses power spectra correlation as similarity as described by the third embodiment. The fourth embodiment uses the components depicted in the second embodiment but the internal processing of the similarity calculating unit 34 differs. With respect to the calculation of the correlation, for example, the general correlation equation described in the third embodiment can be used. In the fourth embodiment as well, in the same manner as in the third embodiment, description will be made by the example of calculating the correlation using the average value of the power spectrum of the frame.
The similarity calculating unit 34 sets the index of frequency k to 1 (index=1) (step S52). The similarity calculating unit 34 determines if the power spectrum of the current frame is greater than the background noise level (step S53). If the power spectrum of the current frame is greater than the background noise level (step S53: YES), the similarity calculating unit 34 continues to perform the processing of step S54 and thereafter, but if the power spectrum of the current frame is not greater than the background noise level (step S53: NO), the flow goes to step S56.
At step S53, if the power spectrum of the current frame is greater than the background noise level (step S53: YES), the similarity calculating unit 34 updates the average values of the power spectra of the current frame and the previous frame, output from the power spectrum calculating unit 23 (step S54) and adds the frequency index number to the memory (step S55). At step S56, the similarity calculating unit 34 determines if the current index is the final index and if not (step S56: NO), the similarity calculating unit 34 shifts frequency k (index number +1) (step S57) and returns to step S53. On the other hand, if the current index is the final index (step S56: YES), the similarity calculating unit 34 reads out the calculated average values of the power spectra and the index numbers from the memory, performs the above correlation calculation (step S58), and ends the processing.
According to the fourth embodiment, similarity can be prevented from being heightened between the frames in which only the background noise is present and the breathing state can be detected more accurately. Further, the detection of the breathing state can be processed using the general-purpose correlation equation.
A fifth embodiment is a variation example of the fourth embodiment and represents the processing on the assumption that the background noise level is too great to detect the breathing state.
The similarity calculating unit 34 sets the index of frequency k to 1 (index=1) (step S62). The similarity calculating unit 34 determines if the power spectrum of the current frame is greater than or equal to the background noise level (step S63). If the power spectrum of the current frame is greater than or equal to the background noise level (step S63: YES), the similarity calculating unit 34 continues to perform the processing of step S64 and thereafter, but if the power spectrum of the current frame is less than the background noise level (step S63: NO), the flow goes to step S67.
At step S63, if the power spectrum of the current frame is greater than or equal to the background noise level (step S63: YES), the similarity calculating unit 34 updates the average values of the power spectra of the current frame and the previous frame, output from the power spectrum calculating unit 23 (step S64) and adds the frequency index number to the memory (step S65). The similarity calculating unit 34 then adds 1 to the number of the frequency bands in which the power spectrum is greater than or equal to the background noise level and stores the number to the memory (step S66).
At step S67, the similarity calculating unit 34 determines if the current index is the final index and if not (step 67: NO), the similarity calculating unit 34 shifts frequency k (index number +1) (step S68) and returns to step S63. On the other hand, if the current index is the final index (step S67: YES), the similarity calculating unit 34 reads out from the memory, the number of frequency bands in which the power spectrum is greater than or equal to the background noise level and determines if this number of frequency bands is greater than or equal to a predetermined threshold (step S69). If the number of the frequency bands in which the power spectrum is greater than or equal to the background noise level is greater than or equal to the threshold (step S69: YES), the similarity calculating unit 34 reads out the calculated power spectrum average values and the index numbers from the memory, performs the above correlation calculation (step S70), and ends the processing. On the other hand, if the number of frequency bands in which the power spectrum is greater than or equal to the background noise level is less than the threshold (step S69: NO), the similarity calculating unit 34 determines the correlation as 0 (non-existent) (step S71) and ends the processing without performing the correlation calculating processing.
The threshold is set as a value corresponding to the number of bands of frequency k in the power spectrum calculating unit 23 and if the number of bands of frequency k is 64 steps, for example, a value of 30 to 40, which is the value on the order of 60% of the number of steps, is set as the threshold. According to the fifth embodiment, when the background noise level is high, the breathing state is considered to be undetectable and the correlation calculation is not performed, thereby enabling environmental changes at the time of occurrence of the background noise to be coped with and achieving efficient processing.
A sixth embodiment is configured to determine a state of apnea by adding an apnea determining unit to the configuration of the first embodiment.
The apnea determining unit 42 first determines, based on the breathing determination results, if breathing is present in the current frame (step S81). If breathing is present in the current frame (step S81: YES), the apnea determining unit 42 reads out past results of the breathing determination from the buffer 43 and determines if there is a non-breathing period lasting for the given period (TN) or longer before the current frame (step S82). If there is a non-breathing period lasting for the given period (TN) or longer before the current frame (step S82: YES), the apnea determining unit 42 determines if breathing is present before the non-breathing period at step S82 (step S83). If breathing is present (step S83: YES), the apnea determining unit 42 determines a state of apnea (step S84) and ends the processing. On the other hand, if the determination results at step S81, step S82, or step S83 are NO, the apnea determining unit 42 ends the processing without performing the apnea determination.
According to the sixth embodiment, based on the manner of transition to a state of apnea, a state of apnea can be determined accurately by detecting the presence or absence of breathing from past data sequentially. While the breathing state may be undetectable depending on the direction or the condition of a microphone to acquire a sound signal, the above processing can ultimately determine that the sound signal indicates a state of apnea after detecting both the breathing state and the non-breathing state and thus, makes it possible to accurately determine a state of apnea even consequent to a change in the performance of the microphone, etc. The sound processing apparatus 41 or an external device may be designed to output an alarm upon receipt of determination results indicating a state of apnea, enabling further use in monitoring babies, young children, the elderly under nursing care, etc.
The sound processing apparatus described above can be configured using, for example, a cellular phone. The breathing state can be detected simply and accurately by executing a breathing detection program of the cellular phone at bedtime. Application is not limited to a cellular phone and the same breathing detection can be realized using mobile devices such a personal computer, a personal digital assistant (PDA), etc., having a built-in microphone. The microphone may be externally connected.
The breathing detection method described in the embodiments can be implemented by executing a prepared program on a computer such as a personal computer and a workstation. The breathing detecting processing described above can be performed by causing a CPU of the computer to execute the sound processing (breathing detection) program stored in a ROM, etc. At the time of such an execution, the CPU, using a RAM, etc., (not depicted) as a work area, implements the functions of the FFT to the determining unit. Sound (breathing during sleep) as the sound signal is detected by the microphone as a voltage value and the results of the breathing determination are output for display on a display unit. The buffers can be configured using a memory unit such as the RAM. The program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD and is executed by being read out by the computer from the recording medium. The program may be a transmission medium that can be distributed by way of a network such as the Internet.
All examples and conditional language provided herein are intended for pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed as limitations to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although one or more embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
This application is a continuation application of International Application PCT/JP2010/059877, filed on Jun. 10, 2010 and designating the U.S., the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP2010/059877 | Jun 2010 | US |
Child | 13693711 | US |