Skip to content

Commit

Permalink
added dithering to input signal
Browse files Browse the repository at this point in the history
  • Loading branch information
janpbuethe committed Sep 15, 2024
1 parent 0f49d5d commit fa589bc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dnn/torch/osce/data/simple_bwe_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ def __getitem__(self, index):
x_16 = self.signal_16k[signal_start16 : signal_stop16].astype(np.float32) / 2**15
history_16 = self.signal_16k[signal_start16 - 320 : signal_start16].astype(np.float32) / 2**15

# dithering
x_16 += (np.random.rand(len(x_16)) - 0.5) / 2**15
history_16 += (np.random.rand(len(history_16)) - 0.5) / 2**15

x_48 = self.signal_48k[3 * signal_start16 - self.upsampling_delay48
: 3 * signal_stop16 - self.upsampling_delay48].astype(np.float32) / 2**15

Expand Down

0 comments on commit fa589bc

Please sign in to comment.