mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
patch from saturnien, make mp3 encoding optional
This commit is contained in:
parent
119fa31eb9
commit
a72e56bc45
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ import time
|
|||
from anki.sound import Recorder, play, generateNoiseProfile
|
||||
from ankiqt.ui.utils import saveGeom, restoreGeom
|
||||
|
||||
def getAudio(parent, string=""):
|
||||
def getAudio(parent, string="", encode=True):
|
||||
"Record and return filename"
|
||||
# record first
|
||||
r = Recorder()
|
||||
|
@ -34,7 +34,7 @@ def getAudio(parent, string=""):
|
|||
time.sleep(0.1)
|
||||
r.stop()
|
||||
# process
|
||||
r.postprocess()
|
||||
r.postprocess(encode)
|
||||
return r.file()
|
||||
|
||||
def recordNoiseProfile(parent):
|
||||
|
|
Loading…
Reference in a new issue