Beispiel #1
0
        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));
        }
Beispiel #2
0
 public PraatHelper(string activityName)
 {
     connector = PraatConnector.GetConnector();
     scripter  = new PraatScripting(activityName);
 }