Pushed definition of the parser into its own function, to make it easier to import extractFormants as a module