I am having a problem , I want to open main window and then i want the window to speak "welcome to email system " . I dont know what is wrong , it speaks this first and then the window appears , i want the window to appear and then say the message
my code
public partial class MainWindow : MetroWindow
{
private SpeechRecognitionEngine sre;
private SpeechSynthesizer synth;
public MainWindow()
{
InitializeComponent();
synth = new SpeechSynthesizer();
sre = new SpeechRecognitionEngine();
speak();
}
public void speak()
{
synth.SetOutputToDefaultAudioDevice();
synth.Speak("Welcome to email System");
What I have tried:
made object in the method of the same class and called the main window, didnt work