Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
speechbrain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joseph Omar
speechbrain
Commits
ff141ef6
Unverified
Commit
ff141ef6
authored
1 year ago
by
Peter Plantinga
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix saving bug #1164 when enhancing files (#2384)
parent
ee144449
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
speechbrain/inference/enhancement.py
+10
-2
10 additions, 2 deletions
speechbrain/inference/enhancement.py
with
10 additions
and
2 deletions
speechbrain/inference/enhancement.py
+
10
−
2
View file @
ff141ef6
...
...
@@ -105,7 +105,11 @@ class SpectralMaskEnhancement(Pretrained):
enhanced
=
self
.
enhance_batch
(
batch
)
if
output_filename
is
not
None
:
torchaudio
.
save
(
output_filename
,
enhanced
,
channels_first
=
False
)
torchaudio
.
save
(
uri
=
output_filename
,
src
=
enhanced
,
sample_rate
=
self
.
hparams
.
compute_stft
.
sample_rate
,
)
return
enhanced
.
squeeze
(
0
)
...
...
@@ -169,7 +173,11 @@ class WaveformEnhancement(Pretrained):
enhanced
=
self
.
enhance_batch
(
batch
)
if
output_filename
is
not
None
:
torchaudio
.
save
(
output_filename
,
enhanced
,
channels_first
=
False
)
torchaudio
.
save
(
uri
=
output_filename
,
src
=
enhanced
,
sample_rate
=
self
.
audio_normalizer
.
sample_rate
,
)
return
enhanced
.
squeeze
(
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment