my project is text to speech project, here is my code,
string amma = myacess.Text;
// string[] words = Regex.Split(amma,"*");
char[] delimeter = new char[] { '*' };
string[] words = amma.Split(delimeter, StringSplitOptions.RemoveEmptyEntries);
for( int i = 0; i < words.Length; i++ ) {
string audio = words[i];
if( audio == "a" ) {
SoundPlayer sndplayr = new SoundPlayer( WindowsFormsApplication1.Properties.Resources.aa );
sndplayr.Play();
}
if( audio == "u" ) {
SoundPlayer sndplayr = new SoundPlayer( WindowsFormsApplication1.Properties.Resources.i );
sndplayr.Play();
}
}
but enter text "au" it will play only "u" sound. but I put break point and press F11 then only it's play a sound and u sound. What is the reason behind. please can you help me?