Skip to content

Commit

Permalink
apply_mono_filter_to_each_channel
Browse files Browse the repository at this point in the history
  • Loading branch information
jordimas committed Jan 12, 2025
1 parent 14163e5 commit aa8484f
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions open_dubbing/pydub_effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,6 @@
xrange = range


@register_pydub_effect
def apply_mono_filter_to_each_channel(seg, filter_fn):
n_channels = seg.channels

channel_segs = seg.split_to_mono()
channel_segs = [filter_fn(channel_seg) for channel_seg in channel_segs]

out_data = seg.get_array_of_samples()
for channel_i, channel_seg in enumerate(channel_segs):
for sample_i, sample in enumerate(channel_seg.get_array_of_samples()):
index = (sample_i * n_channels) + channel_i
out_data[index] = sample

return seg._spawn(out_data)


@register_pydub_effect
def normalize(seg, headroom=0.1):
"""
Expand Down

0 comments on commit aa8484f

Please sign in to comment.