1 Introduction 1
1.1 About this book 2
1.2 Purpose of this book 2
1.3 Some reasons to use this book 3
1.4 What's in the book(and what's not) 5
1.5 Computational set-up needed for this book 8
1.6 Computational skills that are necessary in order to use the book 9
1.7 Free software suggestions 10
1.8 Book structure 10
2 Sounds and numbers 13
2.1 Preparatory assignments 14
2.2 Solutions 21
2.3 Sampling 24
2.4 Quantization 24
2.5 The sampling theorem 27
2.6 Generating a signal 29
2.7 Numeric data types 31
2.8 The program 34
2.9 Structure of a loop 35
2.10 Structure of an array 37
2.11 Calculating the cosine values 38
2.12 Structure of the program 39
2.13 Writing the signal to a file 40
Chapter summary 43
Further Exercises 43
Further reading 46
3 Digital filters and resonators 47
3.1 Operations on sequences of numbers 48
3.2 A program for calculating RMS amplitude 48
3.3 Filtering 50
3.4 A program for calculating running means of 4 52
3.5 Smoothing over a longer time-window 54
3.6 Avoiding the need for long window 54
3.7 IIR filters in C 61
3.8 Structure of the Klatt formant synthesizer 62
Chapter summary 68
Exercises 68
Further reading 69
4 Frequency analysis and linear predictive coding 71
4.1 Spectral analysis 72
4.2 Spectral analysis in C 72
4.3 Cepstral analysis 79
4.4 Computation of the cepstrum in C 80
4.5 Pitch tracking using cepstral analysis 83
4.6 Voicing detection 86
4.7 f0 estimation by the autocorrelation method 90
4.8 Linear predictive coding 95
4.9 C programs for LPC analysis and resynthesis 100
4.10 Trying it out 106
4.11 Applications of LPC 106
Chapter Summary 109
Further exercises 109
Further reading 110
5 Finite-state machines 111
5.1 Some simple examples 112
5.2 A more serious example 113
5.3 Deterministic and non-deterministic automata 116
5.4 Implementation in Prolog 118
5.5 Prolog's processing strategy and the treatment of variables 129
5.6 Generating strings 132
5.7 Three possibly useful applications of that idea 134
5.8 Another approach to describing finite-state machines 135
5.9 Self-loops 137
5.10 Finite-state transducers(FSTs) 139
5.11 Using finite-state transducers to relate speech to phonemes 144
5.12 Finite-state phonology 149
5.13 Finite-state syntactic processing 153
Chapter summary 156
Further exercises 156
Further reading 156
6 Introduction to speech recognition techniques 157
6.1 Architectures for speech recognition 158
6.2 The pattern-recognition approach 166
6.3 Dynamic time warping 168
6.4 Applications 177
6.5 Sources of variability in speech 181
Chapter summary 182
Further reading 183
7 Probabilistic finite-state models 185
7.1 Introduction 186
7.2 Indeterminacy:n-gram models for part-of-speech tagging 187
7.3 Some probability theory for language modelling 190
7.4 Markov models 192
7.5 Trigram models 198
7.6 Incompleteness of the training corpus 202
7.7 Part-of-speech model calculations 209
7.8 Using HMMs for speech recognition 210
7.9 Chomsky's objections to Markov models and some rejoinders 213
Chapter summary 219
Further reading 219
8 Parsing 221
8.1 Introduction 222
8.2 A demo 222
8.3 'Intuitive'parsing 223
8.4 Recursive descent parsing 225
8.5 The simplest parsing program 232
8.6 Difference lists 233
8.7 Generating a parse tree 236
8.8 Syllabification 238
8.9 Other parsing algorithms 242
8.10 Chart parsing 242
8.11 Depth-first vs.breadth-first search 245
8.12 Deterministic parsing,Marcus parsing and minimal commitment parsing 246
8.13 Parallel parsing 249
Chapter summary 249
Further reading 250
9 Using probabilistic grammars 251
9.1 Motivations 252
9.2 Probabilistic context-free grammars 256
9.3 Estimation of rule probabilities 258
9.4 A practical example 261
9.5 A limitation of probabilistic context-free grammars 267
9.6 Tree adjoining grammars 268
9.7 Data-oriented parsing 271
Chapter Summary 272
Conclusion and suggestions for further reading 272
Appendix:The American Standard Code for Information Interchange(ASCII) 275
Glossary 277
References 293
Index 299