diff --git a/qt/aqt/reviewer.py b/qt/aqt/reviewer.py index 52f0f7290..65260c92c 100644 --- a/qt/aqt/reviewer.py +++ b/qt/aqt/reviewer.py @@ -835,7 +835,6 @@ time = %(time)d; def onRecordVoice(self) -> None: def after_record(path: str): self._recordedAudio = path - print(path) self.onReplayRecorded() record_audio(self.mw, self.mw.taskman, False, after_record) diff --git a/qt/aqt/sound.py b/qt/aqt/sound.py index 4c9299d80..658103bd1 100644 --- a/qt/aqt/sound.py +++ b/qt/aqt/sound.py @@ -514,7 +514,7 @@ class RecordDialog(QDialog): self.setWindowTitle("Anki") icon = QLabel() icon.setPixmap(QPixmap(":/icons/media-record.png")) - self.label = QLabel("") + self.label = QLabel("...") hbox = QHBoxLayout() hbox.addWidget(icon) hbox.addWidget(self.label) @@ -556,14 +556,16 @@ class RecordDialog(QDialog): self._timer = t = QTimer(self._parent) t.timeout.connect(self._on_timer) t.setSingleShot(False) - t.start(300) + t.start(100) def _on_timer(self): duration = self._recorder.duration() # disable mute after recording starts to avoid clicks/pops - if duration > 0 and self._recorder.isMuted(): + if duration < 300: + return + if self._recorder.isMuted(): self._recorder.setMuted(False) - self.label.setText(tr(TR.MEDIA_RECORDINGTIME) % (duration/1000.0)) + self.label.setText(tr(TR.MEDIA_RECORDINGTIME, secs="%0.1f" % (duration/1000.0))) def accept(self): try: