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] fixed wrong pronunciations for r1.11. #4677

Merged
merged 5 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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.07"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.08"
heteronyms_path: "scripts/tts_dataset_files/heteronyms-052722"
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.07"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.08"
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_ipa.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/ipa_cmudict-0.7b_nv22.06.txt"
phoneme_dict_path: "scripts/tts_dataset_files/ipa_cmudict-0.7b_nv22.08.txt"
heteronyms_path: "scripts/tts_dataset_files/heteronyms-052722"
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.07"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.08"
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.07"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.08"
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/rad-tts_dec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ highfreq: 8000
window: "hann"


phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.07"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.08"
heteronyms_path: "scripts/tts_dataset_files/heteronyms-052722"

model:
Expand Down
2 changes: 1 addition & 1 deletion examples/tts/conf/rad-tts_feature_pred.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.07"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.08"
heteronyms_path: "scripts/tts_dataset_files/heteronyms-052722"

model:
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.07"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.08"
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.07"
phoneme_dict: str = "scripts/tts_dataset_files/cmudict-0.7b_nv22.08"
heteronyms: str = "scripts/tts_dataset_files/heteronyms-030921"
phoneme_probability: float = 0.5

Expand Down
4 changes: 2 additions & 2 deletions 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.07."
"using the path scripts/tts_dataset_files/cmudict-0.7b_nv22.08."
)

return nltk.corpus.cmudict.dict()
Expand Down Expand Up @@ -262,7 +262,7 @@ def __init__(

Args:
phoneme_dict (str, Path, Dict): Path to file in CMUdict format or dictionary of CMUdict-like entries.
Must be given for IPA G2P. (Consider using scripts/tts_dataset_files/ipa_cmudict-0.7b_nv22.06.txt.)
Must be given for IPA G2P. (Consider using scripts/tts_dataset_files/ipa_cmudict-0.7b_nv22.08.txt.)
word_tokenize_func: Function for tokenizing text to words.
It has to return List[Tuple[Union[str, List[str]], bool]] where every tuple denotes word
representation and flag whether to leave unchanged or not.
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.07"
phoneme_dict: "scripts/tts_dataset_files/cmudict-0.7b_nv22.08"
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.07"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.08"
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.07"
phoneme_dict_path: "scripts/tts_dataset_files/cmudict-0.7b_nv22.08"
heteronyms_path: "scripts/tts_dataset_files/heteronyms-030921"

dataset:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57166,7 +57166,7 @@ HURRAY HH AH0 R EY1
HURRELL HH AO1 R AH0 L
HURRI HH ER1 IY0
HURRICANE HH ER1 AH0 K EY2 N
HURRICANE(1) HH AH1 R AH0 K EY2 N Z
HURRICANE(1) HH AH1 R AH0 K EY2 N
HURRICANE'S HH ER1 AH0 K EY2 N Z
HURRICANES HH ER1 AH0 K EY2 N Z
HURRIED HH ER1 IY0 D
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57581,7 +57581,7 @@ HURRAY həˈɹeɪ
HURRELL ˈhɔɹəɫ
HURRI ˈhɝi
HURRICANE ˈhɝəˌkeɪn
HURRICANE ˈhəɹəˌkeɪnz
HURRICANE ˈhəɹəˌkeɪn
HURRICANE'S ˈhɝəˌkeɪnz
HURRICANES ˈhɝəˌkeɪnz
HURRIED ˈhɝid
Expand Down