private void TestAudio_Click(object sender, EventArgs e) { saveFileDialog1.ShowDialog(); string FilePath = saveFileDialog1.FileName; signal = AudioOperations.OpenAudioFile(FilePath); Sequence TestSequence = AudioOperations.ExtractFeatures(signal); Sequence VoiceSequence; FileStream FS = new FileStream("test2.txt", FileMode.Open, FileAccess.Read); StreamReader SR = new StreamReader(FS); int NoOfVoices = (int)FS.ReadByte(); ReadVoices = new RWFile(NoOfVoices); DTW.VoiceDifferences = new double[NoOfVoices]; for (int i = 0; i < NoOfVoices; i++) { VoiceSequence = new Sequence(); VoiceSequence = ReadVoices.ReadFromFile(FS, SR, i); K = Math.Abs(TestSequence.NoOfFrames - VoiceSequence.NoOfFrames); DTW.VoiceDifferences[i] = DTW.Compare(TestSequence, VoiceSequence, 2); } FS.Close(); SR.Close(); string SpeakerName = DTW.GetSpeakerName(ReadVoices.UserNames, NoOfVoices); MessageBox.Show("Identified Speaker is " + SpeakerName); // MessageBox.Show(SpeakerName); this.Hide(); StartUpForm.Show(); }