public CreationExecuter(ExerciceVM currentActivity) { this.Player = new WAVPlayerRecorder(); this.CurrentActivity = currentActivity; this.scripting = new PraatScripting(currentActivity.Name); this.connector = PraatConnector.GetConnector(); TempExWavPath = CurrentActivity.Example_wav_path; this.tempRecordingsLocation = TEMP_PATH; if (!Directory.Exists(TEMP_PATH)) { Directory.CreateDirectory(TEMP_PATH); } string currentExerciceFilePath = (TEMP_PATH + "TempPraatResults_" + currentActivity.Date + ".txt"); string praatScriptTargetPath = (TEMP_PATH + "TempScript_" + currentActivity.Date + ".praat"); //string currentExerciceFilePath2 = (this.tempRecordingsLocation + "_" + CurrentActivity.Date + ".txt"); Task.Run(() => this.CurrentActivity.Exercice = CalculateIntensityAndFrequency(this.CurrentActivity.Example_wav_path, currentExerciceFilePath, praatScriptTargetPath)); }
public PraatHelper(string activityName) { connector = PraatConnector.GetConnector(); scripter = new PraatScripting(activityName); }