Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TTS] Update cmudict #4510

Merged
merged 3 commits into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/tts/conf/aligner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ lowfreq: 0
highfreq: 8000
window: hann

phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.01"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.07"
heteronyms_path: "scripts/tts_dataset_files/heteronyms-030921"
whitelist_path: "nemo_text_processing/text_normalization/en/data/whitelist/lj_speech.tsv"

Expand Down
2 changes: 1 addition & 1 deletion examples/tts/conf/fastpitch_align_44100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ lowfreq: 0
highfreq: null
window: hann

phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.01"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.07"
heteronyms_path: "scripts/tts_dataset_files/heteronyms-030921"
whitelist_path: "nemo_text_processing/text_normalization/en/data/whitelist/lj_speech.tsv"

Expand Down
2 changes: 1 addition & 1 deletion examples/tts/conf/fastpitch_align_v1.05.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ lowfreq: 0
highfreq: 8000
window: hann

phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.01"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.07"
heteronyms_path: "scripts/tts_dataset_files/heteronyms-030921"
whitelist_path: "nemo_text_processing/text_normalization/en/data/whitelist/lj_speech.tsv"

Expand Down
2 changes: 1 addition & 1 deletion examples/tts/conf/mixer-tts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ lowfreq: 0
highfreq: 8000
window: hann

phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.01"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.07"
heteronyms_path: "scripts/tts_dataset_files/heteronyms-030921"
whitelist_path: "nemo_text_processing/text_normalization/en/data/whitelist/lj_speech.tsv"

Expand Down
2 changes: 1 addition & 1 deletion examples/tts/conf/tacotron2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ validation_datasets: ???
sup_data_path: null
sup_data_types: null

phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.01"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.07"
heteronyms_path: "scripts/tts_dataset_files/heteronyms-030921"
whitelist_path: "nemo_text_processing/text_normalization/en/data/whitelist/lj_speech.tsv"

Expand Down
2 changes: 1 addition & 1 deletion nemo/collections/tts/models/fastpitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
@dataclass
class G2PConfig:
_target_: str = "nemo.collections.tts.torch.g2ps.EnglishG2p"
phoneme_dict: str = "scripts/tts_dataset_files/cmudict-0.7b_nv22.01"
phoneme_dict: str = "scripts/tts_dataset_files/cmudict-0.7b_nv22.07"
heteronyms: str = "scripts/tts_dataset_files/heteronyms-030921"
phoneme_probability: float = 0.5

Expand Down
2 changes: 1 addition & 1 deletion nemo/collections/tts/torch/g2ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def _parse_as_cmu_dict(phoneme_dict_path=None, encoding='latin-1'):
f"English g2p_dict will be used from nltk.corpus.cmudict.dict(), because phoneme_dict_path=None. "
"Note that nltk.corpus.cmudict.dict() has old version (0.6) of CMUDict. "
"You can use the latest official version of CMUDict (0.7b) with additional changes from NVIDIA directly from NeMo "
"using the path scripts/tts_dataset_files/cmudict-0.7b_nv22.01."
"using the path scripts/tts_dataset_files/cmudict-0.7b_nv22.07."
)

return nltk.corpus.cmudict.dict()
Expand Down
2 changes: 1 addition & 1 deletion nemo/collections/tts/torch/tts_dataset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ tts_dataset:
pad_with_space: True
g2p:
_target_: nemo.collections.tts.torch.g2ps.EnglishG2p
phoneme_dict: "scripts/tts_dataset_files/cmudict-0.7b_nv22.01"
phoneme_dict: "scripts/tts_dataset_files/cmudict-0.7b_nv22.07"
heteronyms: "scripts/tts_dataset_files/heteronyms-030921"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ manifest_filepath: "train_manifest.json"
sup_data_path: "sup_data"
sup_data_types: [ "align_prior_matrix", "pitch" ]
whitelist_path: "nemo_text_processing/text_normalization/en/data/whitelist/lj_speech.tsv"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.01"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.07"
heteronyms_path: "scripts/tts_dataset_files/heteronyms-030921"

dataset:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ manifest_filepath: "train_manifest.json"
sup_data_path: "sup_data"
sup_data_types: [ "align_prior_matrix", "pitch" ]
whitelist_path: "nemo_text_processing/text_normalization/en/data/whitelist/lj_speech.tsv"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.01"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.07"
heteronyms_path: "scripts/tts_dataset_files/heteronyms-030921"

dataset:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133889,6 +133889,7 @@ CSP S IY1 EH1 S P IY1
CTR S IH1 T IY1 AA1 R
CUDA K UW1 D AH0
CUDNN K UW1 D IY1 EH2 N EH2 N
CUSTOMIZABLE K AH2 S T AH0 M AY1 Z AH0 B AH0 L
CYBERCRIME S AY1 B ER0 K R AY1 M
DATACENTER D EY1 T AH0 S EH2 N T ER0
DDOS D IY2 D AO1 S
Expand Down Expand Up @@ -133957,8 +133958,8 @@ NGC EH1 N JH IY1 S IY1
NGX EH1 N JH IY1 EH1 K S
NHS EH1 N EY1 CH EH1 S
NIH EH1 N AY1 EY1 CH
NVIDIA EH0 N V IY1 D IY0 AH0
NVIDIA'S EH0 N V IY1 D IY0 AH0 Z
NVIDIA EH0 N V IH1 D IY0 AH0
NVIDIA'S EH0 N V IH1 D IY0 AH0 Z
NVLINK EH1 N V IY1 L IH1 NG K
NVME EH1 N V IY1 EH1 M IY1
NVSWITCH EH1 N V IH1 S W IH1 CH
Expand Down
8 changes: 4 additions & 4 deletions tutorials/tts/FastPitch_Finetuning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
"source": [
"# additional files\n",
"!mkdir -p tts_dataset_files && cd tts_dataset_files \\\n",
"&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/$BRANCH/scripts/tts_dataset_files/cmudict-0.7b_nv22.01 \\\n",
"&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/$BRANCH/scripts/tts_dataset_files/cmudict-0.7b_nv22.07 \\\n",
"&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/$BRANCH/scripts/tts_dataset_files/heteronyms-030921 \\\n",
"&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/$BRANCH/nemo_text_processing/text_normalization/en/data/whitelist/lj_speech.tsv \\\n",
"&& cd .."
Expand Down Expand Up @@ -286,7 +286,7 @@
" train_dataset=./6097_manifest_train_dur_5_mins_local.json \\\n",
" validation_datasets=./6097_manifest_dev_ns_all_local.json \\\n",
" sup_data_path=./fastpitch_sup_data \\\n",
" phoneme_dict_path=tts_dataset_files/cmudict-0.7b_nv22.01 \\\n",
" phoneme_dict_path=tts_dataset_files/cmudict-0.7b_nv22.07 \\\n",
" heteronyms_path=tts_dataset_files/heteronyms-030921 \\\n",
" whitelist_path=tts_dataset_files/lj_speech.tsv \\\n",
" exp_manager.exp_dir=./ljspeech_to_6097_no_mixing_5_mins \\\n",
Expand Down Expand Up @@ -318,7 +318,7 @@
" sup_data_path=./fastpitch_sup_data`\n",
" * We tell the script what manifest files to train and eval on, as well as where supplementary data is located (or will be calculated and saved during training if not provided).\n",
" \n",
"* `phoneme_dict_path=tts_dataset_files/cmudict-0.7b_nv22.01 \n",
"* `phoneme_dict_path=tts_dataset_files/cmudict-0.7b_nv22.07 \n",
"heteronyms_path=tts_dataset_files/heteronyms-030921\n",
"whitelist_path=tts_dataset_files/lj_speech.tsv \n",
"`\n",
Expand Down Expand Up @@ -718,4 +718,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
8 changes: 4 additions & 4 deletions tutorials/tts/FastPitch_MixerTTS_Training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
"\n",
"# additional files\n",
"!mkdir -p tts_dataset_files && cd tts_dataset_files \\\n",
"&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/$BRANCH/scripts/tts_dataset_files/cmudict-0.7b_nv22.01 \\\n",
"&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/$BRANCH/scripts/tts_dataset_files/cmudict-0.7b_nv22.07 \\\n",
"&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/$BRANCH/scripts/tts_dataset_files/heteronyms-030921 \\\n",
"&& wget https://raw.githubusercontent.com/NVIDIA/NeMo/$BRANCH/nemo_text_processing/text_normalization/en/data/whitelist/lj_speech.tsv \\\n",
"&& cd .."
Expand Down Expand Up @@ -428,7 +428,7 @@
"\n",
"# Grapheme-to-phoneme module\n",
"g2p = EnglishG2p(\n",
" phoneme_dict=\"tts_dataset_files/cmudict-0.7b_nv22.01\",\n",
" phoneme_dict=\"tts_dataset_files/cmudict-0.7b_nv22.07\",\n",
" heteronyms=\"tts_dataset_files/heteronyms-030921\"\n",
")\n",
"\n",
Expand Down Expand Up @@ -554,7 +554,7 @@
"validation_datasets=tests/data/asr/an4_val.json \\\n",
"sup_data_types=\"['align_prior_matrix', 'pitch']\" \\\n",
"sup_data_path={mixer_tts_sup_data_path} \\\n",
"phoneme_dict_path=tts_dataset_files/cmudict-0.7b_nv22.01 \\\n",
"phoneme_dict_path=tts_dataset_files/cmudict-0.7b_nv22.07 \\\n",
"heteronyms_path=tts_dataset_files/heteronyms-030921 \\\n",
"whitelist_path=tts_dataset_files/lj_speech.tsv \\\n",
"pitch_mean={pitch_mean} \\\n",
Expand Down Expand Up @@ -606,4 +606,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
4 changes: 2 additions & 2 deletions tutorials/tts/Tacotron2_Training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
"# We will also need a few extra files for handling text.\n",
"!(mkdir -p scripts/tts_dataset_files \\\n",
" && cd scripts/tts_dataset_files \\\n",
" && wget https://raw.githubusercontent.com/NVIDIA/NeMo/$BRANCH/scripts/tts_dataset_files/cmudict-0.7b_nv22.01 \\\n",
" && wget https://raw.githubusercontent.com/NVIDIA/NeMo/$BRANCH/scripts/tts_dataset_files/cmudict-0.7b_nv22.07 \\\n",
" && wget wget https://raw.githubusercontent.com/NVIDIA/NeMo/$BRANCH/scripts/tts_dataset_files/heteronyms-030921 \\\n",
" && cd ..)\n",
" \n",
Expand Down Expand Up @@ -231,7 +231,7 @@
"sup_data_path: null\n",
"sup_data_types: null\n",
"\n",
"phoneme_dict_path: \"scripts/tts_dataset_files/cmudict-0.7b_nv22.01\"\n",
"phoneme_dict_path: \"scripts/tts_dataset_files/cmudict-0.7b_nv22.07\"\n",
"heteronyms_path: \"scripts/tts_dataset_files/heteronyms-030921\"\n",
"whitelist_path: \"nemo_text_processing/text_normalization/en/data/whitelist/lj_speech.tsv\"\n",
"```\n",
Expand Down