There is disclosed a system and method for treating obstructive sleep apnea
by terminating an obstructive sleep apnea event before the cessation of breathing
occurs. The system comprises one or more microphones capable of detecting breathing
sounds within an airway of a person. The microphones generate signals representative
of the breathing sounds and send the signals to a controller. The controller uses
digital signal processing to identify at least one signal pattern that is associated
with a breathing pattern of the person that occurs at the onset of an obstructive
sleep apnea event. When the controller detects a signal pattern that indicates
the onset of an obstructive apnea event, the controller sends an alarm signal to
a stimulus generator. The stimulus generator creates a stimulus (an electric current,
a sound, a vibrator, a flashing light, etc.) to cause the sleeping person to move
in a manner to terminate the obstructive sleep apnea event before cessation of
breathing occurs. The obstructive sleep apnea event is terminated without waking
the sleeping person and without causing the sleeping person physiological stress
associated with cessation of breathing.