It depends on the spice flavor, but the modern method is generally to make a flavored oil of some sort and mix it with maltodextrin, which turns it into a powder. That powder is then mixed with other dried spices and flavoring agents, and the nuts, chips, or whatever are coated with the seasoning mix. So for something like the almonds you mentioned they probably use extracts of dill, chili, some sort of flavor enhancer like MSG or naturally derived MSG (yeast extract, autolyzed proteins, etc) along with sugar and salt and all of that.
Latest Answers