def updateAllCanvases(self): self.soundCopy.copy(self.recordedAudio) SoundProcessing.crop(self.soundCopy) self.plotFormants(self.soundCopy) self.updateLoudnessMeter(self.soundCopy) if self.isRecording: self.root.after(30, self.updateAllCanvases)
def updateAllCanvases(self): self.soundCopy.copy(self.recordedAudio) SoundProcessing.crop(self.soundCopy) self.plotFormants(self.soundCopy) self.updateLoudnessMeter(self.soundCopy) if self.isRecording: self.root.after(30,self.updateAllCanvases)
def multiThreadUpdateCanvas(self, threadName, notStopped): sleep(1.2) self.setUpScore() self.isLoading = False #self.vowelPlotCanvas.itemconfig('axis', state='hidden') self.vowelPlotCanvas.itemconfig('score', state='normal') try: self.vowelPlotCanvas.itemconfig('recording', fill='red') self.vowelPlotCanvas.itemconfig('recordingText', text='Recording') while self.notStopped: self.count2 += 1 self.soundCopy.copy(self.recordedAudio) SoundProcessing.crop(self.soundCopy) self.plotFormants(self.soundCopy) if self.count2 % 10 == 0: self.updateLoudnessMeter(self.soundCopy) except Exception: import traceback print traceback.format_exc()
def multiThreadUpdateCanvas(self, threadName, notStopped): self.clear() sleep(1.2) self.isLoading = False text = 15 * " " + "Stop" + 15 * " " self.recordButton.config(text=text, bg='#CE2029', state='normal') self.formantPlotCanvas.itemconfig('Recording', fill='red') self.formantPlotCanvas.itemconfig('recordingText', text='Recording') try: while self.notStopped: self.count2 += 1 self.soundCopy.copy(self.recordedAudio) SoundProcessing.crop(self.soundCopy) self.plotFormants(self.soundCopy) if self.count2 % 10 == 0: self.updateLoudnessMeter(self.soundCopy) except Exception: import traceback print traceback.format_exc()