Skip to content

Commit

Permalink
fixed the torch audio detaching issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pengwei715 committed Jun 25, 2024
1 parent e9dae1a commit 28e0403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diart/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def read(self):
if self.is_closed:
break
# shape (samples, channels) to (1, samples)
chunk = np.mean(item[0].numpy(), axis=1, keepdims=True).T
chunk = np.mean(item[0].detach().numpy(), axis=1, keepdims=True).T
self.stream.on_next(chunk)
except BaseException as e:
self.stream.on_error(e)
Expand Down

0 comments on commit 28e0403

Please sign in to comment.