Taking the example from MDN and tweaking it a bit...
const phraseData = [
{ phrase: "azure", boost: 5.0 },
{ phrase: "khaki", boost: 3.0 },
{ phrase: "tan", boost: 2.0 },
{ phrase: "azure", boost: 2.0 },
{ phrase: "khaki" }
];
const phraseObjects = phraseData.map(
(p) => new SpeechRecognitionPhrase(p.phrase, p.boost),
);