Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hehl2
Torchaudio
Commits
79eecb0f
"...text-generation-inference.git" did not exist on "17345402114e3d4a1f1c0a7fd650c734f7a992f9"
Unverified
Commit
79eecb0f
authored
May 04, 2020
by
moto
Committed by
GitHub
May 04, 2020
Browse files
Fix phaser for GPU (#607)
parent
4a24ed72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
torchaudio/functional.py
torchaudio/functional.py
+2
-2
No files found.
torchaudio/functional.py
View file @
79eecb0f
...
...
@@ -1347,10 +1347,10 @@ def phaser(
waveform
=
waveform
.
view
(
-
1
,
actual_shape
[
-
1
])
delay_buf_len
=
int
((
delay_ms
*
.
001
*
sample_rate
)
+
.
5
)
delay_buf
=
torch
.
zeros
(
waveform
.
shape
[
0
],
delay_buf_len
)
delay_buf
=
torch
.
zeros
(
waveform
.
shape
[
0
],
delay_buf_len
,
dtype
=
dtype
,
device
=
device
)
mod_buf_len
=
int
(
sample_rate
/
mod_speed
+
.
5
)
mod_buf
=
torch
.
zeros
(
mod_buf_len
)
mod_buf
=
torch
.
zeros
(
mod_buf_len
,
dtype
=
dtype
,
device
=
device
)
if
sinusoidal
:
wave_type
=
'SINE'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment