Skip to content

Commit

Permalink
reduce the gain of the brown noise generated file
Browse files Browse the repository at this point in the history
  • Loading branch information
mbi committed Nov 9, 2017
1 parent f8912e7 commit e601481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion captcha/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def captcha_audio(request, key):
if settings.CAPTCHA_SOX_PATH:
arbnoisepath = str(os.path.join(tempfile.gettempdir(), '%s_arbitrary.wav') % key)
mergedpath = str(os.path.join(tempfile.gettempdir(), '%s_merged.wav') % key)
subprocess.call([settings.CAPTCHA_SOX_PATH, '-r', '8000', '-n', arbnoisepath, 'synth', '0.005', 'brownnoise'])
subprocess.call([settings.CAPTCHA_SOX_PATH, '-r', '8000', '-n', arbnoisepath, 'synth', '2', 'brownnoise', 'gain', '-15'])
subprocess.call([settings.CAPTCHA_SOX_PATH, '-m', arbnoisepath, path, '-t', 'wavpcm', '-b', '16', mergedpath])
os.remove(arbnoisepath)
os.remove(path)
Expand Down

0 comments on commit e601481

Please sign in to comment.