You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/12/01 15:10:23 UTC

[GitHub] [cordova-plugin-media-capture] ityoung2016 commented on issue #143: How to initialize sampling rate in cordova-plugin-media-capture?

ityoung2016 commented on issue #143:
URL: https://github.com/apache/cordova-plugin-media-capture/issues/143#issuecomment-736614085


   
   Dear Kevin,
   
   44.1 kHz means that an audio signal has been sampled 44100 times per second. The highest frequency that a human can hear is about 20 kHz and proper processing (e.g. noise suppression) requires that the signal be sampled at at least twice that number. That means the sampling frequency should be greater than 40000 samples per second (40 kHz). The digital sound  industry chose 44.1 kHz as meeting that requirement. Computational issues probably also played a role in that choice because 44100 is a highly composite number, (2*3*5*7)^2 = 44100, which makes for faster processing algorithms such as the FFT. 
   
   Dogs can hear above 20 kHz but you and I can’t so I don’t see any advantage to sampling at 192 kHz (high-definition audio) for human audio purposes. Selling audio equipment that uses high-definition sampling is, in general, a good way to separate people from their money. Unless one is combining many audio channels into one data stream, the higher sampling rate is overkill. 
   
   But can you go below 44.1 kHz?  Yes, but you have to be careful. Undersampling, going below 44.1 kHz, may work if there is negligible energy in the higher frequencies. The human voice rarely goes above 5 kHz so a sampling rate of 11 kHz should be sufficient. Musical accompaniment in the background,however, could mess up that calculation and the resulting sound quality. Some applications suppress the energy in the higher frequencies by lowpass filtering the signal from the microphones before the audio signal is sampled. There are digital tricks as well. 
   
   Data storage and processing times improve as the number of samples per second go down but the quality of the resulting audio signal can suffer. Like life, the audio world is filled with tradeoffs. 
   
   You can read more about this hear:
   
   https://www.headphonesty.com/2019/07/sample-rate-bit-depth-bit-rate/
   
   And if you want to see the frequency spectrum of your voice to see what the highest frequency is, try Laboratory Exercise 3.1 in my free app:
   
   https://apps.apple.com/nl/app/stochastic-signal-processing/id1450268179?l=en
   
   Good luck and stay well,
   
   Ted Young
   
   ****************************************
   
   > On 1 Dec 2020, at 12:44, Kévin Perrée <no...@github.com> wrote:
   > 
   > I get sample rates of 44.1hz too why?
   > 
   > Is it possible to match voice memo app quality / codecs / and settings ?
   > 
   > 
   > 
   > —
   > You are receiving this because you modified the open/close state.
   > Reply to this email directly, view it on GitHub, or unsubscribe.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org