Skip to content

Commit 71df49a

Browse files
committed
🔧 Fix pytest.
1 parent a615bf9 commit 71df49a

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

tensorflow_tts/configs/fastspeech.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from tensorflow_tts.processor.ljspeech import LJSPEECH_SYMBOLS as lj_symbols
2020
from tensorflow_tts.processor.kss import KSS_SYMBOLS as kss_symbols
21-
from tensorflow_tts.processor.baker import symbols as bk_symbols
21+
from tensorflow_tts.processor.baker import BAKER_SYMBOLS as bk_symbols
2222

2323

2424
SelfAttentionParams = collections.namedtuple(

tensorflow_tts/configs/tacotron2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from tensorflow_tts.processor.ljspeech import LJSPEECH_SYMBOLS as lj_symbols
1818
from tensorflow_tts.processor.kss import KSS_SYMBOLS as kss_symbols
19-
from tensorflow_tts.processor.baker import symbols as bk_symbols
19+
from tensorflow_tts.processor.baker import BAKER_SYMBOLS as bk_symbols
2020

2121

2222
class Tacotron2Config(object):

tensorflow_tts/processor/baker.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616

1717
import os
1818
import re
19+
from typing import Dict, List, Union, Tuple, Any
1920

2021
import librosa
2122
import numpy as np
2223
import soundfile as sf
23-
from dataclasses import dataclass
24+
from dataclasses import dataclass, field
2425
from pypinyin import Style
2526
from pypinyin.contrib.neutral_tone import NeutralToneWith5Mixin
2627
from pypinyin.converter import DefaultConverter
@@ -102,7 +103,7 @@
102103
BAKER_SYMBOLS = _pad + _pause + _initials + [i + j for i in _finals for j in _tones] + _eos
103104

104105

105-
pinyin_dict = {
106+
PINYIN_DICT = {
106107
"a": ("^", "a"),
107108
"ai": ("^", "ai"),
108109
"an": ("^", "an"),
@@ -539,10 +540,10 @@ class MyConverter(NeutralToneWith5Mixin, DefaultConverter):
539540
@dataclass
540541
class BakerProcessor(BaseProcessor):
541542

543+
pinyin_dict: Dict[str, Tuple[str, str]] = field(default_factory=lambda: PINYIN_DICT)
542544
cleaner_names: str = None
543545
target_rate: int = 24000
544546
speaker_name: str = "baker"
545-
pinyin_dict: dict = pinyin_dict
546547

547548
def create_items(self):
548549
if self.data_dir:

0 commit comments

Comments
 (0)