Add the reviewer_will_replay_recording hook (#1877)

This commit is contained in:
Abdo 2022-05-18 06:44:56 +03:00 committed by GitHub
parent 46c371e71a
commit 5f06829be4
2 changed files with 9 additions and 0 deletions

View file

@ -1095,6 +1095,9 @@ time = %(time)d;
record_audio(self.mw, self.mw, False, after_record)
def onReplayRecorded(self) -> None:
self._recordedAudio = gui_hooks.reviewer_will_replay_recording(
self._recordedAudio
)
if not self._recordedAudio:
tooltip(tr.studying_you_havent_recorded_your_voice_yet())
return

View file

@ -164,6 +164,12 @@ hooks = [
option is unchecked; This is so as to allow playing custom
sounds regardless of that option.""",
),
Hook(
name="reviewer_will_replay_recording",
args=["path: str"],
return_type="str",
doc="""Used to inspect and modify a recording recorded by "Record Own Voice" before replaying.""",
),
# Debug
###################
Hook(