Snoring / Sleep Apnea Sound
Analysis
Jacob Zurasky ECE5525Fall 2010
Goals
◦ Determine if the principles of speech processing relate to snoring sounds.
◦ Use homomorphic filtering techniques to analyze snoring for pitch and also vocal tract response.
◦ Develop a method to distinguish a simple snore from a sleep apnea event.
Snoring / Sleep Apnea Analysis
Background
Past Research - SRD Store amplitude and frequency spectrum data to SD card
Interface to Sleep Lab polysomnogram equipment
Top Figure is the frequency spectrum (0-2kHz)
Bottom figure is the snore amplitude
SRD – Sample Data Output
Past Research – iPhone App
Assume: s[n] = h[n] * p[n]
FFT -> log( ) -> IFFT, yields the cepstrum
Separate by low quefrency liftering
FFT -> exp( ) -> IFFT, vocal tract response
Homomorphic Filtering – Speech
Assume: s[n] = h[n] * p[n] (palatal flow)
Use sliding hamming window, 50% overlap
Analyze different sounds clips for differences in h[n] and p[n] between normal snoring and an apnea event.
Homomorphic Filtering - Snoring
Signal - apnea1.wav
0 1 2 3 4 5 6 7 8-0.5
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4Sound Signal
Am
plitu
de
Time (s)
FFT – apnea1.wavFFT, Window: 45 mS Frame: 11 mS
Freq
uenc
y (h
Z)
Time (s)0 1 2 3 4 5 6 7
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
5500
Cepstrum – apnea1.wav
0 0.2 0.40.6 0.8 1 1.2 1.4
1.6 1.80
1
2
3
4
5
6
7
8
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
Time (s)
Quefrency (mS)
Cepstrum Surface, Window: 45 mS Frame: 11 mS
Vocal Tract Response – apnea1
0
0.5
1
1.5
2
2.50
1
2
3
4
5
6
7
8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Time (s)
Vocal Tract Impulse Response, Window: 45 mS Frame: 11 mS
Time (mS)
Signal - apnea2.wav
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4Sound Signal
Am
plitu
de
Time (s)
FFT – apnea2.wavFFT, Window: 45 mS Frame: 11 mS
Freq
uenc
y (h
Z)
Time (s)0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
5500
Cepstrum – apnea2.wav
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.80
0.5
11.5
2
2.5
3
3.5
4
4.5
5
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
Time (s)
Quefrency (mS)
Cepstrum Surface, Window: 45 mS Frame: 11 mS
Vocal Tract Response – apnea2
0
0.5
1
1.5
2
2.5 00.5
11.5
22.5
33.5
44.5
5
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Time (s)
Vocal Tract Impulse Response, Window: 45 mS Frame: 11 mS
Time (mS)
Signal - snore1.wav
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1Sound Signal
Am
plitu
de
Time (s)
FFT – snore1.wavFFT, Window: 45 mS Frame: 11 mS
Freq
uenc
y (h
Z)
Time (s)0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
5500
Cepstrum – snore1.wav
00.2
0.40.6
0.81
1.21.4
1.61.8
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Time (s)
Quefrency (mS)
Cepstrum Surface, Window: 45 mS Frame: 11 mS
Vocal Tract Response – snore1
0
0.5
1
1.5
2
2.5 0
0.2
0.4
0.6
0.8
1
1.2
1.4-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Time (s)
Vocal Tract Impulse Response, Window: 45 mS Frame: 11 mS
Time (mS)
Signal - snore2.wav
0 0.5 1 1.5 2 2.5 3-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8Sound Signal
Am
plitu
de
Time (s)
FFT – snore2.wavFFT, Window: 45 mS Frame: 11 mS
Freq
uenc
y (h
Z)
Time (s)0 0.5 1 1.5 2 2.5
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
5500
Cepstrum – snore2.wav
0
0.2
0.40.6
0.8
11.2
1.41.6
1.8 0
0.5
1
1.5
2
2.5
3
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Time (s)
Cepstrum Surface, Window: 45 mS Frame: 11 mS
Quefrency (mS)
Vocal Tract Response – snore2
0
0.5
1
1.5
2
2.5 0
0.5
1
1.5
2
2.5
3
-0.5
0
0.5
1
1.5
2
2.5
Time (s)
Vocal Tract Impulse Response, Window: 45 mS Frame: 11 mS
Time (mS)
Observations p[n], ‘Voicing’, of the sleep apnea files has a
much larger magnitude in the cepstral domain.
Vocal tract response during a simple snore is more stable than during an apnea.
Vocal tract response is slower changing during a simple snore.
Redesign the SRD to incorporate the functions of the MATLAB code.
Faster processor, floating point architecture
Continue research to develop a method for in home screening of sleep apnea.
Future Goals
Top Related