示例#1
0
 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)
示例#2
0
文件: FormantPlot.py 项目: MPAid/Main
 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)
示例#3
0
    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()
示例#4
0
    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()