public void TestMethod1() { var filelist = new List <string> { @"C:\Users\nmccarthy\Desktop\wavyvid1.wav" }; var a = new SpeechClient(SpeechServiceType.aws); a.Transcribe(filelist); a.SwitchService(SpeechServiceType.azure); a.Transcribe(filelist); a.SwitchService(SpeechServiceType.azureAdv); a.Transcribe(filelist); a.SwitchService(SpeechServiceType.google); a.Transcribe(filelist); a.SwitchService(SpeechServiceType.ibm); a.Transcribe(filelist); Assert.IsTrue(File.Exists(@"C:\Users\nmccarthy\Desktop\AIProject\aiApiCode\AiPoweredTools\AiToolsTesting\bin\x64\Debug\Transcriptions\aws_wavyvid1.txt")); Assert.IsTrue(File.Exists(@"C:\Users\nmccarthy\Desktop\AIProject\aiApiCode\AiPoweredTools\AiToolsTesting\bin\x64\Debug\Transcriptions\azure_wavyvid1.txt")); Assert.IsTrue(File.Exists(@"C:\Users\nmccarthy\Desktop\AIProject\aiApiCode\AiPoweredTools\AiToolsTesting\bin\x64\Debug\Transcriptions\azureAdv_wavyvid1.txt")); Assert.IsTrue(File.Exists(@"C:\Users\nmccarthy\Desktop\AIProject\aiApiCode\AiPoweredTools\AiToolsTesting\bin\x64\Debug\Transcriptions\google_wavyvid1.txt")); Assert.IsTrue(File.Exists(@"C:\Users\nmccarthy\Desktop\AIProject\aiApiCode\AiPoweredTools\AiToolsTesting\bin\x64\Debug\Transcriptions\ibm_wavyvid1.txt")); }
public void ChangeFileDestinationDefault() { //arrange var x = new SpeechClient(SpeechServiceType.ibm); var filelist = new List <string> { @"C:\Users\nmccarthy\Desktop\whatstheweatherlike.wav" }; //act x.FileDestination = @"C:\Users\nmccarthy\Desktop\"; x.SwitchService(SpeechServiceType.google); x.Transcribe(filelist); //assert Assert.IsTrue(File.Exists(@"C:\Users\nmccarthy\Desktop\google_whatstheweatherlike.txt")); }
public void SwitchService() { //arrange var x = new SpeechClient(SpeechServiceType.aws); var y = new SpeechClient(SpeechServiceType.azure); var a = AiPoweredTools.Factory.CreateService(SpeechServiceType.google); var b = AiPoweredTools.Factory.CreateService(SpeechServiceType.ibm); //act x.SwitchService(SpeechServiceType.google); y.SwitchService(SpeechServiceType.ibm); //assert Assert.IsTrue(x.Strategy.ToString() == a.ToString()); Assert.IsTrue(y.Strategy.ToString() == b.ToString()); }