Respiratory sound analysis for flow estimation during wakefulness and sleep, and its applications for sleep apnea detection and monitoring