📚 Speech & Audio Processing Revision for AS OCR Computer Science | AS OCR 计算机:口语/听力备考专项
This revision guide focuses on the topics of speech and audio processing relevant to the AS OCR Computer Science specification. In this context, ‘speech’ refers to voice input and output technologies, while ‘listening’ encompasses how computers capture, digitise, store and compress sound. Understanding these concepts is essential for tackling questions about sound representation, file size calculations, and the principles of audio compression. We will break down key ideas with clear explanations and practical examples to help you prepare effectively for your exam.
本备考指南聚焦于与 AS OCR 计算机科学大纲相关的口语与听力处理专题。在这里,“口语”指的是语音输入与输出技术,而“听力”则涵盖计算机如何捕捉、数字化、存储及压缩声音。理解这些概念对于解答声音表示、文件大小计算以及音频压缩原理类题目至关重要。我们将以清晰的解释和实例分解关键知识点,帮你高效备考。
1. Sound as Analogue Data | 声音作为模拟数据
Sound travels through the air as continuous pressure waves. These waves are analogue in nature, meaning their amplitude varies smoothly over time. Computers, however, work with digital data. To store or process audio, a conversion from analogue to digital must take place. This process is known as digitisation, and it involves sampling the sound wave at discrete intervals.
声音以连续的压力波在空气中传播。这些波本质上是模拟的,其振幅随时间平滑变化。然而计算机处理的是数字数据。为存储或处理音频,必须进行模数转换。这一过程称为数字化,涉及在离散时间间隔上对声波进行采样。
A microphone captures sound and converts it into an analogue electrical signal. An analogue‑to‑digital converter (ADC) then transforms this signal into a stream of binary values. The quality of the resulting digital audio depends on two main factors: the sampling rate and the bit depth.
麦克风捕捉声音并将其转换为模拟电信号。模数转换器(ADC)接着将该信号转化为二进制数据流。所得数字音频的品质取决于两个主要因素:采样率与位深度。
2. Sampling and Sampling Rate | 采样与采样率
Sampling is the process of measuring the amplitude of an analogue sound wave at regular time intervals. The sampling rate (or sampling frequency) is the number of samples taken per second, measured in hertz (Hz). For example, the standard sampling rate for CD‑quality audio is 44.1 kHz, meaning 44 100 samples are recorded every second.
采样是按固定时间间隔测量模拟声波振幅的过程。采样率(或称采样频率)是每秒采集的样本数,单位是赫兹 (Hz)。例如,CD 品质音频的标准采样率为 44.1 kHz,即每秒记录 44 100 个样本。
A higher sampling rate captures more detail of the original wave, leading to better sound fidelity. However, it also generates more data, increasing the file size. The Nyquist theorem states that the sampling rate must be at least twice the highest frequency present in the sound to reproduce it accurately. Human hearing ranges from about 20 Hz to 20 kHz, which is why 44.1 kHz was chosen for CDs.
更高的采样率能捕捉到原始波形中更多细节,从而带来更好的声音保真度。但它也会产生更多数据,增大文件体积。奈奎斯特定理指出,要准确还原声音,采样率必须至少是声音中最高频率的两倍。人耳可听范围约为 20 Hz 至 20 kHz,正因如此 CD 才选用了 44.1 kHz。
3. Sample Resolution and Bit Depth | 样本分辨率与位深度
Each sample stores an amplitude value as a binary number. The number of bits used to represent each sample is known as the sample resolution or bit depth. Common bit depths are 16‑bit (CD quality) and 24‑bit (studio quality). With 16 bits, each sample can take one of 2^16 (65 536) possible values, allowing fine distinctions between loud and soft sounds.
每个样本用二进制数存储振幅值。用于表示每个样本的二进制位数称为样本分辨率或位深度。常见的位深度有 16 位(CD 品质)和 24 位(录音室品质)。16 位时,每个样本可取 2^16(65 536)个可能值之一,可以精细区分声音的强弱。
Greater bit depth reduces quantisation error—the rounding inaccuracy when assigning a continuous amplitude to a discrete digital value. This translates to a higher signal‑to‑noise ratio and cleaner audio. For exam purposes, remember that increasing either the sampling rate or the bit depth directly increases the size of the audio file.
更大的位深度可减少量化误差——即将连续振幅赋予离散数字值时产生的舍入误差。这对应更高的信噪比和更干净的音频。考试时请记住,提高采样率或位深度都会直接增大音频文件的大小。
4. Calculating File Size for Uncompressed Audio | 未压缩音频的文件大小计算
Exam questions regularly ask you to calculate the storage required for an audio clip. The basic formula for uncompressed mono audio is:
考试题经常要求你计算一段音频所需的存储空间。未压缩单声道音频的基本公式如下:
File size (bits) = Sampling rate (Hz) × Bit depth × Duration (seconds)
If the audio has multiple channels (e.g. stereo uses 2 channels), multiply the result by the number of channels. To convert from bits to bytes, divide by 8; to kilobytes divide by 8000, and so on. Always check whether the question expects an answer in bits, bytes, kibibytes or megabytes.
如果音频有多个声道(例如立体声使用 2 个声道),需将结果乘以声道数。从位转换为字节除以 8,转换为千字节除以 8000,以此类推。务必看清题目要求答案是位、字节、KiB 还是 MB。
Example: Calculate the file size of a 3‑minute stereo audio track recorded at 44.1 kHz with 16‑bit resolution. Give your answer in megabytes (MB).
Solution: Duration = 3 × 60 = 180 s. File size (bits) = 44 100 × 16 × 180 × 2 = 254 016 000 bits. In bytes: 254 016 000 ÷ 8 = 31 752 000 B. In MB: 31 752 000 ÷ 1 000 000 ≈ 31.75 MB (using decimal units; exam conventions may vary).
示例: 计算一段 3 分钟立体声录音的文件大小,参数为 44.1 kHz、16 位分辨率。答案以兆字节 (MB) 给出。
解答: 时长 = 3 × 60 = 180 秒。文件大小(位)= 44 100 × 16 × 180 × 2 = 254 016 000 位。以字节计:254 016 000 ÷ 8 = 31 752 000 字节。以 MB 计:31 752 000 ÷ 1 000 000 ≈ 31.75 MB(采用十进制单位;考试习惯可能不同)。
5. The Nyquist Theorem in Depth | 深入理解奈奎斯特定理
The Nyquist theorem is fundamental to understanding why we choose certain sampling rates. It states that to capture all frequency components of a signal without distortion, the sampling rate must be at least twice the maximum frequency present in the signal, i.e. fs ≥ 2 × fmax.
奈奎斯特定理是理解我们为何选择特定采样率的基础。它指出,为了不失真地捕捉信号的所有频率成分,采样率必须至少是信号中最高频率的两倍,即 fs ≥ 2 × fmax。
If the sampling rate is too low, a phenomenon called aliasing occurs. Aliasing creates false, lower‑frequency components in the digitised signal that were not present in the original sound. This is why audio interfaces apply low‑pass filters before sampling, to remove frequencies above half the sampling rate (the Nyquist limit).
如果采样率过低,就会发生混叠现象。混叠会在数字化的信号中产生原声不存在的虚假低频成分。因此,音频接口在采样前会使用低通滤波器,滤除高于采样率一半(奈奎斯特极限)的频率。
6. Audio Compression: Lossy vs Lossless | 音频压缩:有损与无损
Uncompressed audio files can be very large, so compression is widely used. Compression can be lossless (e.g. FLAC) or lossy (e.g. MP3, AAC). Lossless compression reduces file size without any loss of information by identifying and eliminating statistical redundancy. The original waveform can be perfectly reconstructed.
未压缩音频文件可能非常庞大,因此压缩技术被广泛采用。压缩可分为无损(如 FLAC)和有损(如 MP3、AAC)。无损压缩通过识别并消除统计冗余来减小文件体积而不丢失任何信息,原始波形可以被完美重建。
Lossy compression, on the other hand, permanently discards data that is considered perceptually unimportant. Techniques such as perceptual coding remove audio components that the human ear is less sensitive to, for example very high frequencies or sounds masked by louder ones. This achieves much smaller file sizes at the cost of some fidelity.
另一方面,有损压缩会永久丢弃被认为感知上不重要的数据。像感知编码这类技术会移除人耳不太敏感的频率成分,例如极高的频率或被更响声音掩蔽的部分。这样做以牺牲一定保真度为代价大幅缩减文件体积。
For exams, be ready to compare both approaches: lossless preserves original quality but achieves modest compression ratios; lossy provides dramatic size reduction but introduces artefacts. Common formats to mention are FLAC (lossless) and MP3 (lossy).
在考试中,要准备好比较两种方法:无损保留原始品质但压缩率有限;有损可大幅缩减体积却会引入失真伪影。常见格式如 FLAC(无损)和 MP3(有损)值得提及。
7. MIDI: Representing Music as Instructions | MIDI:以指令表示音乐
While sampled audio stores the actual waveform, MIDI (Musical Instrument Digital Interface) stores instructions on how to recreate music. A MIDI file does not contain sound samples; instead it holds event messages such as note on, note off, pitch, velocity and instrument selection. This makes MIDI files extremely compact compared to audio recordings.
采样音频存储的是实际波形,而 MIDI(乐器数字接口)存储的是如何重现音乐的指令。MIDI 文件不含声音样本,而是包含诸如音符开、音符关、音高、力度和乐器选择等事件消息。这使得 MIDI 文件远比录音文件小巧。
MIDI is ideal for music production and electronic instruments, but it cannot easily reproduce natural speech or complex environmental sounds. Nevertheless, it is important to understand the difference between sampled audio and synthetic audio representation, as OCR questions may ask you to discuss their respective advantages.
MIDI 非常适合音乐制作和电子乐器,但难以自然地重现人类语音或复杂的环境声音。尽管如此,理解采样音频与合成音频表示的区别十分重要,OCR 题目可能会要求讨论它们各自的优势。
8. Speech Recognition Systems | 语音识别系统
Speech recognition (or automatic speech recognition, ASR) converts spoken language into text. This is a classic example of how computers ‘listen’. The process involves capturing audio through a microphone, digitising it, cleaning the signal, and then matching acoustic patterns against trained models, often using machine learning techniques such as Hidden Markov Models or deep neural networks.
语音识别(或称自动语音识别,ASR)将口语转化为文字。这是计算机如何“听”的典型例子。该过程涉及通过麦克风捕捉音频、将其数字化、清洗信号,然后将声学模式与训练好的模型匹配,通常使用隐马尔可夫模型或深度神经网络等机器学习技术。
Key challenges include handling different accents, background noise and homophones. Modern virtual assistants (e.g. Siri, Alexa) rely heavily on cloud‑based ASR. In your exam, you may be asked to describe the steps or to evaluate the impact of speech recognition on user interfaces.
主要挑战包括处理不同口音、背景噪音和同音词。现代虚拟助手(如 Siri、Alexa)严重依赖云端的语音识别。在考试中,你可能需要描述其步骤或评估语音识别对用户界面的影响。
9. Speech Synthesis and Text‑to‑Speech | 语音合成与文本转语音
Speech synthesis is the complementary technology that lets computers ‘speak’. Text‑to‑speech (TTS) engines analyse written text, convert it into phonetic transcriptions, and generate artificial speech waveforms. Early systems concatenated pre‑recorded fragments of human speech, while modern synthesisers use parametric or AI‑generated voices that sound increasingly natural.
语音合成是使计算机能够“说话”的互补技术。文本转语音 (TTS) 引擎分析书面文本,将其转换为音素序列,并生成人工语音波形。早期系统拼接预先录制的人声片段,而现代的合成器则使用参数化或 AI 生成的声音,听上去愈发自然。
Applications include screen readers for the visually impaired, GPS navigation, and automated customer service. For OCR, understanding that speech synthesis involves processing and producing audio data can help you link it to the broader theme of sound technologies.
应用包括视障人士的屏幕阅读器、GPS 导航和自动客服。对 OCR 考试而言,理解语音合成涉及音频数据的处理与产生,有助于将其与更广泛的声音技术主题联系起来。
10. Compression Techniques for Audio Storage | 音频存储的压缩技术
Although lossy and lossless categories have been introduced, OCR also expects you to understand specific compression algorithms. Run‑length encoding (RLE) can be applied to sound if there are sequences of identical sample values, but it is more effective on images. More relevant is the concept of dictionary‑based compression, used in lossless audio codecs like FLAC.
虽然已经介绍了有损与无损分类,OCR 还希望你能理解特定的压缩算法。游程编码 (RLE) 可用于存在连续相同采样值的声音,但其在图像上更有效。与音频压缩更相关的是基于字典的压缩概念,FLAC 等无损音频编解码器便采用了这种技术。
For lossy audio, perceptual coding works by removing sounds that are masked. A frequency analysis (often using Fast Fourier Transform) identifies components that are inaudible to human ears; these are then encoded with fewer bits or discarded entirely. The combination of these techniques produces the compact MP3 files we use daily.
对有损音频而言,感知编码通过移除被掩蔽的声音来工作。频率分析(常采用快速傅里叶变换)识别出人耳听不到的成分,然后用更少的比特编码或完全丢弃。这些技术的结合造就了我们日常使用的紧凑 MP3 文件。
11. Exam Tips and Common Pitfalls | 考试技巧与常见易错点
When tackling questions on sound, always pay close attention to units. If a question gives duration in minutes and sampling rate in kHz, convert to seconds and Hz before calculating. A common mistake is forgetting to multiply by the number of channels for stereo audio—an easy mark to lose.
回答与声音有关的问题时,务必仔细注意单位。如果题目给出的是分钟和 kHz 采样率,计算前要先换算为秒和 Hz。一个常见错误是忘记为立体声音频乘上声道数——这一分极易丢。
Be precise with terminology. Do not confuse sampling rate with bit depth, or lossy with lossless. In longer response questions, structure your answer: define the key concept, give an example, and then explain the trade‑offs. Practise file size calculations until you can do them confidently without a calculator, as some exam papers provide simple numbers.
术语要精准。不要混淆采样率与位深度,或有损与无损。在较长的简答题中,应组织好答案结构:定义关键概念,举例,然后解释权衡。反复练习文件大小计算,直至能在没有计算器的情况下自信作答,因为部分试卷给出的数字很友好。
Finally, always relate your answers to the context of the question. If the question is about a voice assistant, link the underlying technology to speech recognition, sampling and compression. Demonstrating this holistic understanding will earn you top marks.
最后,始终将答案与题目背景联系起来。如果题目围绕语音助手,就要将底层技术与语音识别、采样和压缩关联起来。展现出这种全面理解将帮你斩获高分。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply