[chinese][english] When we analyze audio signals, we usually adopt the method of short-term analysis since most audio signals are more or less stable within a short period of time, say 20 ms or so. When we do frame blocking, there may be some soverlap between neighboring frames to capture subtle change in the audio signals. Note that each frame is the basic unit for our analysis. Within each frame, we can observe the three most distinct acoustic features, as follows.
These three acoustic features can be related to the waveform of audio signals, as follows:
- Volume: This feature represents the loudness of the audio signal, which is correlated to the amplitude of the signals. Sometimes it is also referred to as energy or intensity of audio signals.
- Pitch: This feature represents the vibration rate of audio signals, which can be represented by the fundamental frequency, or equivalently, the reciprocal of the fundamental period of voiced audio signals.
- Timbre: This feature represents the meaningful content (such as a vowel in English) of audio signals, which is characterized by the waveform within a fundamental period of voice signals.
·í§Ú̦b¤ÀªRÁnµ®É¡A³q±`¥H¡uµu®É¶Z¤ÀªR¡v¡]Short-term Analysis¡^¬°¥D¡A¦]¬°µ°T¦bµu®É¶¡¤º¬O¬Û¹ïéwªº¡C§Ú̳q±`±NÁnµ¥ý¤Á¦¨µ®Ø¡]Frame¡^¡A¨CÓµ®Øªø«×¤j¬ù¦b 20 ms ¥ª¥k¡A¦A®Ú¾Úµ®Ø¤ºªº°T¸¹¨Ó¶i¦æ¤ÀªR¡C¦b¤@Ó¯S©wµ®Ø¤º¡A§ÚÌ¥i¥HÆ[¹î¨ìªº¤TÓ¥DnÁnµ¯S¼x¥i»¡©ú¦p¤U¡G
³o¨Ç¯S¼x¥i¥Î¹Ï§Î»¡©ú¦p¤U¡G
- µ¶q¡]Volume¡^¡G¥NªíÁnµªº¤j¤p¡A¥i¥ÑÁnµ°T¸¹ªº¾_´T¨ÓÃþ¤ñ¡A¾_´T¶V¤j¡A¥Nªí¦¹Ánµªi§Îªºµ¶q¶V¤j¡Cµ¶q¤SºÙ¬°¯à¶q¡]Energy¡^©Î±j«×¡]Intensity¡^µ¥¡C
- µ°ª¡]Pitch¡^¡G¥NªíÁnµªº°ª§C¡A¥i¥Ñ°ò¥»ÀW²v¡]Fundamental Frequency¡^¨ÓÃþ¤ñ¡A³o¬O°ò¥»¶g´Á¡]Fundamental Period¡^ªºË¼Æ¡CÁnµªº°ò¥»ÀW²v¶V°ª¡A¥Nªíµ°ª¶V°ª¡F¤Ï¤§¡AÁnµªº°ò¥»ÀW²v¶V§C¡A¥Nªíµ°ª¶V§C¡C
- µ¦â¡]Timbre¡^¡G¥NªíÁnµªº¤º®e¡]¨Ò¦p^¤åªº¥Àµ¡^¡A¥i¥Ñ¨C¤@Óªi§Î¦b¤@Ó°ò¥»¶g´ÁªºÅܤƨÓÃþ¤ñ¡C¤£¦Pªºµ¦â§Y¥Nªí¤£¦Pªºµ°T¤º®e¡A¨Ò¦p¤£¦Pªº¦r¥À¦³¤£¦Pªºµoµ¡A³£¬O¥Ñ©óµ¦â¤£¦P¦Ó²£¥Í¡C
Take human voices as an example, then the above three acoustic features will correlates to some physical quantities:
¦pªG¬O¥Î¤HÁn¨Ó»¡©ú¡A³o¨Ç»yµ¯S¼xªºª«²z·N¸q¦p¤U¡G
- Volume: It correlates to the compression of your lungs. A large volume of audio signals corresponds to a large compression.
- Pitch: It correlates to the vibration frequency of your vocal cord. A high pitch corresponds to a high vibration frequency.
- Timbre: It correlates to the positions and shapes of your lips and tongue. Different timbres corresponds to different positions and shapes of your lips and tongue.
- µ¶q¡G¥NªíªÍ³¡À£ÁY¤O¶qªº¤j¤p¡A¤O¶q¶V¤j¡Aµ¶q¶V¤j¡C
- µ°ª¡G¥NªíÁn±a¾_°Êªº§ÖºC¡A¾_°Ê¶V§Ö¡Aµ°ª·|¶V°ª¡C
- µ¦â¡G¥Nªí¼L®B©M¦ÞÀYªº¦ì¸m©M§Îª¬¡A¤£¦Pªº¦ì¸m©M§Îª¬¡A´N·|²£¥Í¤£¦Pªº»yµ¤º®e¡C
We shall explain methods to extract these acoustic features in the other chapters of this book. It should be noted that these acoustic features mostly corresponds to human's "perception" and therefore cannot be represented exactly by mathematical formula or quantities. However, we still try to "quantitify" these features for further computer-based analysis in the hope that the used formula or quantities can emulate human's perception as closely as possible.
¦³Ãö³o¨Ç»yµ¯S¼xªº§ì¨ú©M¤ÀªR¡A·|¦b«áÄò³¹¸`¦³¸Ô²Ó»¡©ú¡C¯S§Onª`·Nªº¬O¡A³o¨Ç¯S¼x³£¬O¥Nªí¡u¤H¦Õªº·Pı¡v¡A¨Ã¨S¦³¤@©wªº¼Æ¾Ç¤½¦¡¥i´M¡A©Ò¥H·í§Ú̸յۦb¡u¶q¤Æ¡v³o¨Ç¯S¼x®É¡A¥u¬O®Ú¾Ú¤@¨Ç¼Æ¾Ú©M¸gÅç¨Ó¶q¤Æ¡A¨ÓºÉ¶q¹Gªñ¤H¦Õªº·Pı¡A¦ý¨Ã¤£¥Nªí³o¨Ç¡u¶q¤Æ¡v«áªº¼Æ¾Ú©Î¤½¦¡´N¥i¥H§¹¥þ¥NªíÁnµªº¯S¼x¡C
The basic approach to the extraction of audio acoustic features can be summarized as follows:
- Perform frame blocking such that a strem of audio signals is converted to a set of frames. The time duration of each frame is about 20~30 ms. If the frame duration is too big, we cannot catch the time-varying characteristics of the audio signals. On the other hand, if the frame duration is too small, then we cannot extract valid acoustic features. In general, a frame should be contains several fundamental periods of the given audio signals. Usually the frame size (in terms of sample points) is equal to the powers of 2 (such as 256, 512, 1024 ,etc) such that it is suitable for fast fourier transform.
- If we want to reduce the difference between neighboring frames, we can allow overlap between them. Usually the overlap is 1/2 to 2/3 of the original frame. The more overlap, the more computation is needed.
- Assuming the audio signals within a frame is stationary, we can extract acoustic features such as zero crossing rates, volume, pitch, MFCC, LPC, etc.
- We can perform endpoint detection based on zero crossing rate and volume, and keep non-silence frames for further analysis.
µ°T¯S¼x©â¨úªº°ò¥»¤è¦¡¦p¤U¡G
- ±Nµ°T¤Á¦¨¤@ÓÓµ®Ø¡Aµ®Øªø«×¤j¬ù¬O 20~30 ms¡Cµ®ØY¤Ó¤j¡A´NµLªk§ì¥Xµ°TÀH®É¶¡Åܤƪº¯S©Ê¡F¤Ï¤§¡Aµ®ØY¤Ó¤p¡A´NµLªk§ì¥Xµ°Tªº¯S©Ê¡C¤@¯ë¦Ó¨¥¡Aµ®Ø¥²¶·¯à°÷¥]§t¼ÆÓµ°Tªº°ò¥»¶g´Á¡C¡]¥t¡Aµ®Øªø«×³q±`¬O 2 ªº¾ã¼Æ¦¸¤è¡AY¤£¬O¡A«h¦b¶i¦æ¡u³Å¥ß¸Âà´«¡v®É¡A»Ý¸É¹s¦Ü 2 ªº¾ã¼Æ¦¸¤è¡A¥H«K¨Ï¥Î¡u§Ö³t³Å¥ß¸Âà´«¡v¡C¡^
- Y¬O§Æ±æ¬Û¾Fµ®Ø¤§¶¡ªºÅܤƤ£¬O¤Ó¤j¡A¥i¥H¤¹³\µ®Ø¤§¶¡¦³«Å|¡A«Å|³¡¤À¥i¥H¬Oµ®Øªø«×ªº 1/2 ¨ì 2/3 ¤£µ¥¡C¡]«Å|³¡¤À¶V¦h¡A¹ïÀ³ªºpºâ¶q¤]´N¶V¤j¡C¡^
- °²³]¦b¤@Óµ®Ø¤ºªºµ°T¬Oéwªº¡A¹ï¦¹µ®Ø¨D¨ú¯S¼x¡A¦p¹L¹s²v¡Bµ¶q¡Bµ°ª¡BMFCC °Ñ¼Æ¡BLPC °Ñ¼Æµ¥¡C
- ®Ú¾Ú¹L¹s²v¡Bµ¶q¤Îµ°ªµ¥¡A¶i¦æºÝÂI°»´ú¡]Endpoint Detection¡^¡A¨Ã«O¯dºÝÂI¤ºªº¯S¼x¸ê°T¡A¥H«K¶i¦æ¤ÀªR©Î¿ëÃÑ¡C
When we are performing the above procedures, there are several terminologies that are used often:
- Frame size: The sampling points within each frame
- Frame overlap: The sampling points of the overlap between consecutive frames
- Frame step (or hop size): This is equal to the frame size minus the overlap.
- Frame rate: The number of frames per second, which is equal to the sample frequency divided by the frame step.
¦b¶i¦æ¤Wz¤ÀªR®É¡A¦³´XÓ¦Wµü±`¥Î¨ì¡A»¡©ú¦p¤U¡G
- µ®ØÂI¼Æ¡]Frame Size¡^¡G¨C¤@Óµ®Ø©Ò§t¦³ªºÂI¼Æ¡C
- µ®Ø«Å|¶q¡]Frame Overlap¡^¡Gµ®Ø¤§¶¡«Å|ªºÂI¼Æ¡C
- µ®Ø¸õ¶Z¡]Frame Step or Hop Size¡^¡G¦¹µ®Ø°_ÂI©M¤U¤@Óµ®Ø°_ÂIªº¶ZÂ÷ÂI¼Æ¡Aµ¥©óµ®ØÂI¼Æ´î¥hµ®Ø«Å|¡C
- µ®Ø²v¡]Frame Rate¡^¡G¨C¬í¥X²{ªºµ®Ø¼Æ¥Ø¡Aµ¥©ó¨ú¼ËÀW²v°£¥Hµ®Ø¸õ¶Z¡C
For instance, if we have a stream of audio signals with sample frequency fs=16000, and a frame duration of 25 ms, overlap of 15 ms, then
- Frame size = fs*25/1000 = 400 (sample points)¡C
- Frame overlap = fs*15/1000 = 240 (sample points)¡C
- Frame step (or hop size) = 400-240 = 160 (sample points)¡C
- Frame rate = fs/160 = 100 frames/sec¡C
Á|¨Ò¦Ó¨¥¡A¦pªG¨ú¼ËÀW²v fs=16000 ¥B¨C¤@Óµ®Ø©Ò¹ïÀ³ªº®É¶¡¬O 25 ms¡A«Å| 15 ms¡A¨º»ò
- Frame size = fs*25/1000 = 400 ÂI¡C
- Frame overlap = fs*15/1000 = 240 ÂI¡C
- Frame step (or hop size) = 400-240 = 160 ÂI¡C
- Frame rate = fs/160 = 100 frames/sec¡C
Audio Signal Processing and Recognition (µ°T³B²z»P¿ëÃÑ)