ed(2));
            }

            // Calculate whole completeness score
            let compScore = 100;
            if (!unscriptedScenario) {
                compScore = Number(((validWordCount / handledLastWords.length) * 100).toFixed(2));
                compScore = compScore > 100 ? 100 : compScore;
            }

            let pronunciationScore = 0;
            if (!unscriptedScenario) {
                // Scripted scenario
                if (enableProsodyAssessmentCheckbox.checked && !Number.isN