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
OpenDAS
Torchaudio
Commits
c670898c
Unverified
Commit
c670898c
authored
Nov 04, 2021
by
Caroline Chen
Committed by
GitHub
Nov 04, 2021
Browse files
Doc fixes (#1982)
parent
b3c2cfce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
test/torchaudio_unittest/functional/functional_impl.py
test/torchaudio_unittest/functional/functional_impl.py
+1
-1
torchaudio/pipelines/_tts/interface.py
torchaudio/pipelines/_tts/interface.py
+3
-3
No files found.
test/torchaudio_unittest/functional/functional_impl.py
View file @
c670898c
...
@@ -209,7 +209,7 @@ class Functional(TestBaseMixin):
...
@@ -209,7 +209,7 @@ class Functional(TestBaseMixin):
)
)
@
parameterized
.
expand
([(
0.
,
),
(
1.
,
),
(
2.
,
),
(
3.
,
)])
@
parameterized
.
expand
([(
0.
,
),
(
1.
,
),
(
2.
,
),
(
3.
,
)])
def
test_spectogram_grad_at_zero
(
self
,
power
):
def
test_spect
r
ogram_grad_at_zero
(
self
,
power
):
"""The gradient of power spectrogram should not be nan but zero near x=0
"""The gradient of power spectrogram should not be nan but zero near x=0
https://github.com/pytorch/audio/issues/993
https://github.com/pytorch/audio/issues/993
...
...
torchaudio/pipelines/_tts/interface.py
View file @
c670898c
...
@@ -106,7 +106,7 @@ class Tacotron2TTSBundle(ABC):
...
@@ -106,7 +106,7 @@ class Tacotron2TTSBundle(ABC):
>>> # Convert spectrogram to waveform
>>> # Convert spectrogram to waveform
>>> waveforms, lengths = vocoder(specgram, lengths)
>>> waveforms, lengths = vocoder(specgram, lengths)
>>>
>>>
>>> torchaudio.save('hello-tts.wav', waveforms
[0]
, vocoder.sample_rate)
>>> torchaudio.save('hello-tts.wav', waveforms, vocoder.sample_rate)
Example - Phoneme-based TTS pipeline with Tacotron2 and WaveRNN
Example - Phoneme-based TTS pipeline with Tacotron2 and WaveRNN
>>>
>>>
...
@@ -120,7 +120,7 @@ class Tacotron2TTSBundle(ABC):
...
@@ -120,7 +120,7 @@ class Tacotron2TTSBundle(ABC):
>>> import torchaudio
>>> import torchaudio
>>>
>>>
>>> text = "Hello, TTS!"
>>> text = "Hello, TTS!"
>>> bundle = torchaudio.pipelines.TACOTRON2_WAVERNN_PHONE
ME
_LJSPEECH
>>> bundle = torchaudio.pipelines.TACOTRON2_WAVERNN_PHONE_LJSPEECH
>>>
>>>
>>> # Build processor, Tacotron2 and WaveRNN model
>>> # Build processor, Tacotron2 and WaveRNN model
>>> processor = bundle.get_text_processor()
>>> processor = bundle.get_text_processor()
...
@@ -142,7 +142,7 @@ class Tacotron2TTSBundle(ABC):
...
@@ -142,7 +142,7 @@ class Tacotron2TTSBundle(ABC):
>>> # Convert spectrogram to waveform
>>> # Convert spectrogram to waveform
>>> waveforms, lengths = vocoder(specgram, lengths)
>>> waveforms, lengths = vocoder(specgram, lengths)
>>>
>>>
>>> torchaudio.save('hello-tts.wav', waveforms
[0]
, vocoder.sample_rate)
>>> torchaudio.save('hello-tts.wav', waveforms, vocoder.sample_rate)
"""
"""
# Using the inner class so that these interfaces are not directly exposed on
# Using the inner class so that these interfaces are not directly exposed on
...
...
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