File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed
test/torchaudio_unittest/example/tacotron2 Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 5656(
5757 set -x
5858 conda install -y -c conda-forge ${NUMBA_DEV_CHANNEL} ' librosa>=0.8.0' parameterized ' requests>=2.20'
59- pip install kaldi-io SoundFile coverage pytest pytest-cov scipy transformers expecttest
59+ pip install kaldi-io SoundFile coverage pytest pytest-cov scipy transformers expecttest unidecode inflect
6060)
6161# Install fairseq
6262git clone https://github.com/pytorch/fairseq
Original file line number Diff line number Diff line change 4444(
4545 set -x
4646 conda install -y -c conda-forge ${NUMBA_DEV_CHANNEL} ' librosa>=0.8.0' parameterized ' requests>=2.20'
47- pip install kaldi-io SoundFile coverage pytest pytest-cov scipy transformers expecttest
47+ pip install kaldi-io SoundFile coverage pytest pytest-cov scipy transformers expecttest unidecode inflect
4848)
4949# Install fairseq
5050git clone https://github.com/pytorch/fairseq
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ Optional packages to install if you want to run related tests:
8787- ` transformers `
8888- ` fairseq ` (it has to be newer than ` 0.10.2 ` , so you will need to install from
8989 source. Commit ` e6eddd80 ` is known to work.)
90+ - ` unidecode ` (dependency for testing text preprocessing functions for examples/pipeline_tacotron2)
91+ - ` inflect ` (dependency for testing text preprocessing functions for examples/pipeline_tacotron2)
9092
9193## Development Process
9294
Original file line number Diff line number Diff line change 1- import unittest
2-
31from parameterized import parameterized
42
5- from .text_preprocessing import text_to_sequence
3+ from torchaudio ._internal .module_utils import is_module_available
4+ from torchaudio_unittest .common_utils import TorchaudioTestCase , skipIfNoModule
5+
6+ if is_module_available ("unidecode" ) and is_module_available ("inflect" ):
7+ from pipeline_tacotron2 .text .text_preprocessing import text_to_sequence
68
79
8- class TestTextPreprocessor (unittest .TestCase ):
10+ @skipIfNoModule ("unidecode" )
11+ @skipIfNoModule ("infect" )
12+ class TestTextPreprocessor (TorchaudioTestCase ):
913
1014 @parameterized .expand (
1115 [
You can’t perform that action at this time.
0 commit comments