Skip to content

Commit

Permalink
remove clipping code
Browse files Browse the repository at this point in the history
  • Loading branch information
zironycho committed Aug 28, 2020
1 parent eda52e5 commit b93f72a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def any_to_mp3():
@app.route("/merge", methods=['POST'])
def merge():
rmse_dano = 0.0777645544406
clip_len_in_ms = 0.06
# clip_len_in_ms = 0.06
ext = request.args.get('out', 'wav')
# use_normalizer = bool(strtobool(request.args.get('norm', '1')))
use_normalizer = False
Expand All @@ -161,7 +161,7 @@ def merge():
audio_data = BytesIO(audio_file.read())

audio_raw, rate = librosa.load(audio_data, sr=None)
audio_raw = audio_raw[int(clip_len_in_ms * rate):-int(clip_len_in_ms * rate)]
# audio_raw = audio_raw[int(clip_len_in_ms * rate):-int(clip_len_in_ms * rate)]
if use_normalizer:
curr_rmse = np.sqrt(np.mean(audio_raw ** 2))
audio = audio_raw / curr_rmse * rmse_dano
Expand Down

0 comments on commit b93f72a

Please sign in to comment.