mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Add the reviewer_will_replay_recording hook (#1877)
This commit is contained in:
parent
a5ad95ca41
commit
638286a3fc
2 changed files with 9 additions and 0 deletions
|
@ -1095,6 +1095,9 @@ time = %(time)d;
|
||||||
record_audio(self.mw, self.mw, False, after_record)
|
record_audio(self.mw, self.mw, False, after_record)
|
||||||
|
|
||||||
def onReplayRecorded(self) -> None:
|
def onReplayRecorded(self) -> None:
|
||||||
|
self._recordedAudio = gui_hooks.reviewer_will_replay_recording(
|
||||||
|
self._recordedAudio
|
||||||
|
)
|
||||||
if not self._recordedAudio:
|
if not self._recordedAudio:
|
||||||
tooltip(tr.studying_you_havent_recorded_your_voice_yet())
|
tooltip(tr.studying_you_havent_recorded_your_voice_yet())
|
||||||
return
|
return
|
||||||
|
|
|
@ -164,6 +164,12 @@ hooks = [
|
||||||
option is unchecked; This is so as to allow playing custom
|
option is unchecked; This is so as to allow playing custom
|
||||||
sounds regardless of that option.""",
|
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
|
# Debug
|
||||||
###################
|
###################
|
||||||
Hook(
|
Hook(
|
||||||
|
|
Loading…
Reference in a new issue