text: restructure the text-to-phoneme pipeline API