Applied Speech and Audio Processing: With matlab examples
Download 2.66 Mb. Pdf ko'rish
|
Applied Speech and Audio Processing With MATLAB Examples ( PDFDrive )
- Bu sahifa navigatsiya:
- Basic audio processing
- Infobox 2.3
Absolute scaling considers the format that the audio was captured in, and scales
relative to that (so we would divide each element in the input vector by the biggest value in that representation: 32 768 for 16-bit signed linear). Relative scaling scales relative to the largest value in the sample vector. This is the method we used when playing back audio earlier. 14 Basic audio processing In general the choice of scaling method depends on whether the absolute amplitude of the original sound is important; for example if you are handling many music recordings for a performance, then you would want to preserve some pieces as being quieter than others, so you would use absolute scaling. On the other hand, if you wanted to detect the pitch in recorded speech, you might use relative scaling since it probably doesn’t matter how loud the speech was originally as long as the pitch is evident. Infobox 2.3 The endian problem The two competing formats are big and little endian. Big endian means the most significant byte is presented/stored first, and is used by computers such as Sun and HP workstations. Little endian means that the least significant byte is presented/stored first, as used by the Intel and AMD processors inside most desktop PCs and laptops. Some processors (such as the ARM7) allow for switchable endianess. Unfortunately, endianess is complicated by the variable access-width of modern computers. When everything was byte-wide it was easier, but now there is an added dimension of difficulty. Given an unknown system, it is probably easier to check if it is little endian, and if not classify it as big endian rather than working the other way around. Example Given a 32-bit audio sample stored in a byte-wide file system (a very common scenario), with the stored word being made up of least significant byte (LSB), second most significant byte (B1), third most significant byte (B2) and most significant byte (MSB). Does the following diagram show a little or big-endian representation? 4 3 MSB 2 B2 1 B1 0 LSB 7 0 In the diagram, the storage address (in bytes) is given on the left, and the bit position shown below. In this case the bit positions are not really important. Checking for little endian first, we identify the lowest byte-wide address, and count upwards, looking at the order in which the stored bytes are arranged. In this case the lowest address is 0 and the lowest byte starts at bit 0. The next byte up holds B1, and so on. So counting the contents from lowest byte address upwards, we get {LSB, B1, B2, MSB}. Since this DOES follow least-to-most it must be little endian. By contrast, the following diagram shows a big-endian representation of a 16-bit sample: 2 1 LSB 0 MSB 7 0 These days, by using the wave file format, the endianess is taken care of. It is also irrelevant with byte-wide formats such as 8-bit samples or A-law samples; however problems do arise when handling raw PCM audio files that are sampled at 16-bit. |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling