Speech recognition: pattern matching