Пример #1
0
def recording():
    if request.method == 'POST':
        name = request.form['record_state']
        if name == "Start_Recording":
            start_recording()
            return render_template('index.html', button_name="Stop_Recording")
        elif name == "Stop_Recording":
            text = stop_recording()
            return render_template('result.html', audio_text=text)
    return redirect(url_for('index'))
Пример #2
0
def record_off_hook(self):
	if not G.recording:
		return
	G.data = audio.stop_recording()
	G.recording = 0
	G.sizebtn.settext(`len(G.data)` + ' bytes')
	audio.setoutgain(G.nomuting * G.gain)
	G.playbtn.enable((len(G.data) > 0))
	G.savebtn.enable((len(G.data) > 0))
	#G.showbtn.enable((len(G.data) > 0))
	G.window.settimer(0)
	start_vu()
Пример #3
0
def record_off_hook(self):
       if not G.recording:
               return
       G.data = audio.stop_recording()
       G.recording = 0
       G.sizebtn.settext(`len(G.data)` + ' bytes')
       audio.setoutgain(G.nomuting * G.gain)
       G.playbtn.enable((len(G.data) > 0))
       G.savebtn.enable((len(G.data) > 0))
       #G.showbtn.enable((len(G.data) > 0))
       G.window.settimer(0)
       start_vu()
Пример #4
0
	def stop(self):
		if self.sampling:
			chunk = audio.stop_recording()
			self.sampling = 0
		self.enable(0)
Пример #5
0
	def stop(self):
		if self.sampling:
			chunk = audio.stop_recording()
			self.sampling = 0
		self.enable(0)