コード例 #1
0
        public static void Speak(PromptBuilder p)
        {
            SpeechSynthesizer synthesizer = CreateSynthesizerOutputToAudio();

            Prompt         spokenPrompt = synthesizer.SpeakAsync(p);
            SynthesisState state        = new SynthesisState(synthesizer, spokenPrompt);

            ShowSpeechCancelDialog(state);
        }
コード例 #2
0
        private static void ShowSpeechCancelDialog(SynthesisState state)
        {
            SpeechSynthesizer synthesizer  = state.Synthesizer;
            Prompt            spokenPrompt = state.PromptBeingSynthesized;

            SpeechPlayingDialogBox speechPlayingDialog = new SpeechPlayingDialogBox(state);

            speechPlayingDialog.Closed += (sender, e) => SpeechPlayingDialog_Closed(synthesizer, spokenPrompt);
            speechPlayingDialog.ShowDialog();
        }