YouTube2Text

Digital Audio Explained — Transcript

by Computer Science Lessons · 1,707 words · 290 segments · language en · Watch on YouTube

Full transcript

  1. 0:00[Music]
  2. 0:23before we consider how sound is stored
  3. 0:26and processed by a computer let's first
  4. 0:28consider what sound actually is and how
  5. 0:31it's captured
  6. 0:32this is an abstract model of the air
  7. 0:35around us
  8. 0:36in reality the air molecules are not
  9. 0:38uniformly sized and spaced like this
  10. 0:42and they're in a constant state of
  11. 0:44random motion even when there's no noise
  12. 0:46at all
  13. 0:48nevertheless when a sound is made
  14. 0:50perhaps by the clap of a pair of hands a
  15. 0:52vibrating guitar string or someone's
  16. 0:55voice the air molecules nearby are
  17. 0:58disturbed
  18. 1:00as each molecule collides with its
  19. 1:02nearest neighbours a wave of alternating
  20. 1:04compressions and decompressions moves
  21. 1:07away from the source of the sound
  22. 1:10on a dry day at 20 degrees celsius this
  23. 1:13longitudinal wave travels at a speed of
  24. 1:16343
  25. 1:18meters per second
  26. 1:23to capture this sound we can use a
  27. 1:25microphone
  28. 1:26a dynamic microphone contains a magnet
  29. 1:29surrounded by a coil of copper wire and
  30. 1:32attached to the coil is a thin membrane
  31. 1:34a diaphragm
  32. 1:37when a sound wave hits the diaphragm the
  33. 1:39coil moves in relation to the magnet and
  34. 1:42this induces an electrical current in
  35. 1:44the wire
  36. 1:45this current can then be recorded
  37. 1:47somehow and the sound played back later
  38. 1:50if you plot a chart of the electrical
  39. 1:52current generated by a microphone versus
  40. 1:55time you might see this classic
  41. 1:58representation of a sound wave
  42. 2:00again you're looking at a simplified
  43. 2:02picture here
  44. 2:04this sine wave is really just an
  45. 2:06approximation of what might be produced
  46. 2:08by a guitar string for example
  47. 2:11the distinctive sound of a note from a
  48. 2:13guitar owes itself to the many subtle
  49. 2:16overtones that are produced along with
  50. 2:18the primary sine wave
  51. 2:21this is how the peaks and troughs of
  52. 2:23this graph relate to the positive and
  53. 2:26negative air pressures within the
  54. 2:28original compression wave
  55. 2:30the maximum height of this graph is
  56. 2:32related to the number of molecules
  57. 2:34displaced by the original disturbance
  58. 2:36that created the sound
  59. 2:38or to put it another way the maximum
  60. 2:41height of this graph reflects the amount
  61. 2:43of compression at that point in time
  62. 2:46the higher the level of compression the
  63. 2:48louder the sound
  64. 2:50this is the so-called amplitude
  65. 2:54the distance between two adjacent peaks
  66. 2:57two adjacent troughs or to be more
  67. 2:59precise the length of a single cycle is
  68. 3:02known as the wavelength
  69. 3:05the shorter the wavelength the higher
  70. 3:07the frequency of the sound and hence the
  71. 3:10higher the pitch that you hear
  72. 3:14now let's consider how a computer goes
  73. 3:16about saving this information in a
  74. 3:18digital audio file
  75. 3:20it's important to appreciate first that
  76. 3:23sound is an analog phenomenon in other
  77. 3:26words its properties vary continuously
  78. 3:30for example at this point in time the
  79. 3:32sound has a particular value for
  80. 3:34loudness
  81. 3:35at this point in time the value is
  82. 3:37smaller it's quieter
  83. 3:40because this is an analog wave there are
  84. 3:43an infinite number of values of loudness
  85. 3:46in between the two
  86. 3:48in other words loudness varies
  87. 3:51continuously
  88. 3:53not only that but a sound wave can have
  89. 3:56a long wavelength which means a low
  90. 3:58frequency or a short wavelength which
  91. 4:01means a high frequency
  92. 4:04and it can have an infinite number of
  93. 4:05values for wavelength in between
  94. 4:08so wavelength and therefore frequency
  95. 4:11also vary continuously
  96. 4:15it's impossible for a computer to store
  97. 4:17an infinite number of values for
  98. 4:20loudness and frequency
  99. 4:22so instead the sound is sampled at
  100. 4:25regular intervals and at each interval a
  101. 4:28numeric value for loudness is recorded
  102. 4:31this results in a set of numbers
  103. 4:34these numbers are a digital
  104. 4:36representation of the original wave
  105. 4:39this sampling may be done while the
  106. 4:41sound is being captured or it may be
  107. 4:44done while an analog recording of the
  108. 4:45sound is being played back perhaps from
  109. 4:48an old style cassette tape or an lp
  110. 4:50record
  111. 4:51a circuit known as an analog to digital
  112. 4:54converter is used to do this there's one
  113. 4:56of these behind the microphone socket on
  114. 4:59a typical computer
  115. 5:01and because we're talking about
  116. 5:03computers let's not forget that these
  117. 5:05numbers are actually saved as binary
  118. 5:08numbers
  119. 5:10when the digital recording is played
  120. 5:12back the digital data in the sound file
  121. 5:15are used to recreate the original wave
  122. 5:18the electrical signal generated can then
  123. 5:21be amplified and fed to a loudspeaker or
  124. 5:23headphones
  125. 5:25but you can clearly see that what we
  126. 5:27have now is just an approximation of the
  127. 5:30original analog waveform
  128. 5:33this means that when the recorded sound
  129. 5:35is played back it's not exactly the same
  130. 5:38as the original sound
  131. 5:39the quality is not necessarily as good
  132. 5:43to improve the quality of the recording
  133. 5:45the original analog wave can be sampled
  134. 5:48more frequently in other words we can
  135. 5:50increase the sample rate
  136. 5:53you can see that when this sound wave is
  137. 5:55recreated from the data encoded with a
  138. 5:58higher sample rate it's a much better
  139. 6:00approximation of the original analog
  140. 6:03wave
  141. 6:04of course if you double the sample rate
  142. 6:07you may double the quality of the
  143. 6:08recorded sound but you also double the
  144. 6:11amount of data that needs to be stored
  145. 6:14resulting in a bigger sound file
  146. 6:16getting the balance right is important
  147. 6:20in this example you can see a wave with
  148. 6:22a much shorter wavelength and therefore
  149. 6:24a much higher frequency
  150. 6:27if the sample rate is too low for this
  151. 6:29wave not enough data will be captured
  152. 6:31when it's digitized
  153. 6:33and the reconstructed wave will bear
  154. 6:36little resemblance to the original
  155. 6:38analog wave
  156. 6:39if the sample rate is too low it will
  157. 6:42completely fail to capture the nature of
  158. 6:45high frequency sounds
  159. 6:48in order to capture a high frequency
  160. 6:50sound with any degree of accuracy the
  161. 6:52wave must be sampled at least twice per
  162. 6:56cycle
  163. 6:59sample rates are measured in samples per
  164. 7:02second namely hertz
  165. 7:06a typical sample rate is eight thousand
  166. 7:09times a second that's eight thousand
  167. 7:11hertz or eight kilohertz
  168. 7:14this is used for telephone calls and
  169. 7:16voice over internet data transmission
  170. 7:19a sample rate of eight kilohertz is
  171. 7:21often referred to as speech quality
  172. 7:25with an audio cd the sample rate is much
  173. 7:28higher at forty 44 100 hertz about 44
  174. 7:31kilohertz
  175. 7:33although this is more than enough to
  176. 7:35cater for the sensitivity of most human
  177. 7:37ears many people argue that the sound
  178. 7:40from an analog recording such as an lp
  179. 7:43record has a much warmer quality than
  180. 7:45the cd
  181. 7:48but the sample rate isn't the only thing
  182. 7:51that can affect the quality of digital
  183. 7:53sound
  184. 7:54an equally important factor is the
  185. 7:57number of binary digits available to
  186. 7:59encode the loudness of each sample the
  187. 8:02so-called bit depth
  188. 8:05suppose for a moment that there are only
  189. 8:07three bits available to encode the value
  190. 8:10of each sample this means that each
  191. 8:13sample can have one of only eight
  192. 8:16possible values ranging from zero to
  193. 8:18seven
  194. 8:20while the original analog wave is being
  195. 8:22sampled the analog to digital converter
  196. 8:25has to decide which of these eight
  197. 8:27values to assign to each sample in a
  198. 8:30process called quantization
  199. 8:33each original value has to be rounded
  200. 8:35either up or down to a value that can be
  201. 8:38encoded using only three bits
  202. 8:40the rounding errors that result from a
  203. 8:43low bit depth mean that the quality of
  204. 8:45the digital recording can be far removed
  205. 8:48from the original sound even at a
  206. 8:50suitably high sample rate
  207. 8:53what you see here of course is a rather
  208. 8:55extreme example most digital audio
  209. 8:58applications use a bit depth of 16 bits
  210. 9:01so each sample can have one of 65
  211. 9:05536 possible values
  212. 9:08needless to say though the higher the
  213. 9:10bit depth the more data and therefore
  214. 9:13the bigger the sound file
  215. 9:17audio applications for studio recording
  216. 9:20mixing and mastering might use a bit
  217. 9:22depth of 24 bits allowing for one of
  218. 9:25over 16.7 million possible values per
  219. 9:29sample
  220. 9:3132 bits per sample that's over 4 billion
  221. 9:34possible values is also available
  222. 9:38the benefit of a high bit depth is much
  223. 9:41better precision while editing and a
  224. 9:43much bigger dynamic range
  225. 9:46that is the difference between the
  226. 9:48loudest and the quietest values possible
  227. 9:52in summary
  228. 9:54an analog sound can be captured using a
  229. 9:56microphone
  230. 9:58this converts the sound to an analog
  231. 10:00electrical signal which can be sampled
  232. 10:02and digitized
  233. 10:04the quality of the digital sound depends
  234. 10:06on the number of samples taken per
  235. 10:08second namely the sample rate
  236. 10:11if the sample rate is too low it may
  237. 10:13fail to record high frequency sounds
  238. 10:17the quality of the digital sound also
  239. 10:19depends on the bit depth
  240. 10:21the number of bits available to encode
  241. 10:23the loudness of each sample
  242. 10:25if the bit depth is too low measurements
  243. 10:28during sampling will be inaccurate which
  244. 10:30will result in a fuzzy recording
  245. 10:33you may also come across a figure known
  246. 10:35as the bit rate for a sound recording
  247. 10:39this is the number of bits delivered per
  248. 10:41second during playback
  249. 10:43the bit rate is easily calculated by
  250. 10:46multiplying the bit depth by the sample
  251. 10:49rate
  252. 10:50if the sound has been recorded in stereo
  253. 10:52then this is multiplied by the number of
  254. 10:54channels which is usually two
  255. 10:58higher sample rates and bit depths
  256. 11:00result in digital recordings that are
  257. 11:02closer to the original sound but this
  258. 11:04comes at a cost
  259. 11:06bigger file sizes
  260. 11:10the most common raw uncompressed audio
  261. 11:14format is lpcm which stands for linear
  262. 11:18pulse code modulation
  263. 11:20this is the format used on audio cds
  264. 11:24you don't often see files with the lpcm
  265. 11:26extension because the raw audio data is
  266. 11:29normally contained within a wrapper file
  267. 11:32these wrapper file formats include dot
  268. 11:34wav waveform audio file format which was
  269. 11:38developed by microsoft and ibm
  270. 11:41and aiff audio interchange format which
  271. 11:45is the apple equivalent
  272. 11:47one of the most well-known compressed
  273. 11:49sound formats is mp3 which can make a
  274. 11:53sound file up to 14 times smaller
  275. 11:56mp3 is a lossy compression format
  276. 11:59because it removes data for sound beyond
  277. 12:02the normal hearing range of people and
  278. 12:04reduces the quality of sounds that are
  279. 12:06difficult to hear
  280. 12:08some people nevertheless argue that
  281. 12:10compressed digital sound is noticeably
  282. 12:13inferior to uncompressed sound
  283. 12:16indeed some musicians have changed the
  284. 12:18way they produce music to work within
  285. 12:20the limitations of compressed formats
  286. 12:23like mp3
  287. 12:25perhaps in these days of high bandwidth
  288. 12:27and more discerning audiences compressed
  289. 12:30music will eventually fall out of favor
  290. 12:33altogether

About this transcript

This page contains the full transcript of Digital Audio Explained by Computer Science Lessons, generated from the public captions YouTube serves with the video. The transcript has 1,707 words across 290 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.