phraseDiv.innerHTML += JSON.stringify(result, null, 2);
        }
    </script>

    <!-- Top-level scenario functions -->
    <script>
        async function doPronunciationAssessmentOnceAsync() {
            resetUiForScenarioStart();
            resetVariables();

            var audioConfig = getAudioConfig();
            var speechConfig = getSpeechConfig(SpeechSDK.SpeechConfig);
            var pronunciationAssessmentConfig = await getPronunciationAssessmentConfig();
            if (!audioConfig || !s