tem),
                    (item) => item.replace(/^[\s!\"#$%&()*+,-./:;<=>?@[\]^_`{|}~]+|[\s!\"#$%&()*+,-./:;<=>?@[\]^_`{|}~]+$/g, "")
                );
            }
            // Remove empty words
            referenceWords = referenceWords.filter(w => w.trim().length > 0);
            referenceText = referenceWords.join(" ");
            return referenceText;
        }

        async function getPronunciationAssessmentConfig() {
            const referenceText = await referenceTextHandler();
         