ionStopped = onSessionStopped;
        }

        function calculateOverallPronunciationScore() {
            if (difflib === undefined) {
                phraseDiv.innerHTML += `ERROR: difflib-browser.js is needed for pronunciation assessment calculation; see https://github.com/qiao/difflib.js`;
            }
            let referenceText = referenceTextField.value;
            const enableMiscue = enableMiscueCheckbox.checked;
            let unscriptedScenario = referenceText.length > 0 ? false : true;
 