phoonnx 0.0.2a1__tar.gz → 0.0.2a2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/PKG-INFO +2 -1
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/config.py +3 -1
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phonemizers/ar.py +1 -1
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phonemizers/gl.py +56 -3
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/version.py +1 -1
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx.egg-info/PKG-INFO +2 -1
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx.egg-info/requires.txt +8 -1
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/lightning.py +3 -3
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/README.md +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/__init__.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/locale/ca/phonetic_spellings.txt +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/locale/en/phonetic_spellings.txt +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/locale/gl/phonetic_spellings.txt +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/locale/pt/phonetic_spellings.txt +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phoneme_ids.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phonemizers/__init__.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phonemizers/base.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phonemizers/en.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phonemizers/fa.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phonemizers/he.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phonemizers/ja.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phonemizers/ko.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phonemizers/mul.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phonemizers/vi.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/phonemizers/zh.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/__init__.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/arpa2ipa.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/cotovia/cotovia_aarch64 +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/cotovia/cotovia_x86_64 +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/hangul2ipa.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/ko_tables/aspiration.csv +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/ko_tables/assimilation.csv +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/ko_tables/double_coda.csv +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/ko_tables/hanja.tsv +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/ko_tables/ipa.csv +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/ko_tables/neutralization.csv +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/ko_tables/tensification.csv +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/ko_tables/yale.csv +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/kog2p/__init__.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/kog2p/rulebook.txt +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/__init__.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/buck/__init__.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/buck/phonetise_buckwalter.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/buck/symbols.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/buck/tokenization.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/num2words.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/pyarabic/__init__.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/pyarabic/arabrepr.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/pyarabic/araby.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/pyarabic/named_const.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/pyarabic/normalize.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/pyarabic/number.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/pyarabic/number_const.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/pyarabic/stack.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/pyarabic/trans.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/mantoq/unicode_symbol2label.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/tashkeel/LICENSE +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/tashkeel/SOURCE +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/tashkeel/__init__.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/tashkeel/hint_id_map.json +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/tashkeel/input_id_map.json +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/tashkeel/model.onnx +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/tashkeel/target_id_map.json +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/thirdparty/zh_num.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/util.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx/voice.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx.egg-info/SOURCES.txt +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx.egg-info/dependency_links.txt +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx.egg-info/top_level.txt +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/__main__.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/export_onnx.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/norm_audio/__init__.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/norm_audio/trim.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/norm_audio/vad.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/preprocess.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/__init__.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/attentions.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/commons.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/config.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/dataset.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/losses.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/mel_processing.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/models.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/modules.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/monotonic_align/__init__.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/monotonic_align/setup.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/transforms.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/utils.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/phoonnx_train/vits/wavfile.py +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/setup.cfg +0 -0
- {phoonnx-0.0.2a1 → phoonnx-0.0.2a2}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: phoonnx
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.2a2
|
4
4
|
Home-page: https://github.com/TigreGotico/phoonnx
|
5
5
|
Author: JarbasAi
|
6
6
|
Author-email: jarbasai@mailfence.com
|
@@ -71,6 +71,7 @@ Provides-Extra: got
|
|
71
71
|
Provides-Extra: tpi
|
72
72
|
Provides-Extra: pt
|
73
73
|
Provides-Extra: ckb
|
74
|
+
Provides-Extra: train
|
74
75
|
Provides-Extra: lsm
|
75
76
|
Provides-Extra: fa
|
76
77
|
Provides-Extra: av
|
@@ -6,7 +6,6 @@ from phoonnx.phoneme_ids import (load_phoneme_ids, BlankBetween,
|
|
6
6
|
DEFAULT_BLANK_WORD_TOKEN, DEFAULT_BLANK_TOKEN,
|
7
7
|
DEFAULT_PAD_TOKEN, DEFAULT_BOS_TOKEN, DEFAULT_EOS_TOKEN)
|
8
8
|
|
9
|
-
|
10
9
|
DEFAULT_NOISE_SCALE = 0.667
|
11
10
|
DEFAULT_LENGTH_SCALE = 1.0
|
12
11
|
DEFAULT_NOISE_W_SCALE = 0.8
|
@@ -22,6 +21,8 @@ class Alphabet(str, Enum):
|
|
22
21
|
UNICODE = "unicode"
|
23
22
|
IPA = "ipa"
|
24
23
|
ARPA = "arpa" # en
|
24
|
+
SAMPA = "sampa"
|
25
|
+
XSAMPA = "x-sampa"
|
25
26
|
HANGUL = "hangul" # ko
|
26
27
|
KANA = "kana" # ja
|
27
28
|
HIRA = "hira" # ja
|
@@ -32,6 +33,7 @@ class Alphabet(str, Enum):
|
|
32
33
|
ERAAB = "eraab" # fa
|
33
34
|
COTOVIA = "cotovia" # gl
|
34
35
|
HANZI = "hanzi" # zh
|
36
|
+
MANTOQ = "mantoq" # ar
|
35
37
|
|
36
38
|
|
37
39
|
|
@@ -12,6 +12,57 @@ class CotoviaError(Exception):
|
|
12
12
|
pass
|
13
13
|
|
14
14
|
|
15
|
+
COTOVIA2IPA = {
|
16
|
+
"pau": " ",
|
17
|
+
"a": "a",
|
18
|
+
"E": "ɛ",
|
19
|
+
"e": "e",
|
20
|
+
"i": "i",
|
21
|
+
"j": "j",
|
22
|
+
"O": "ɔ",
|
23
|
+
"o": "o",
|
24
|
+
"u": "u",
|
25
|
+
"w": "w",
|
26
|
+
"p": "p",
|
27
|
+
"b": "b",
|
28
|
+
"B": "β",
|
29
|
+
"t": "t",
|
30
|
+
"d": "d",
|
31
|
+
"D": "ð",
|
32
|
+
"k": "k",
|
33
|
+
"g": "g",
|
34
|
+
"G": "ɣ",
|
35
|
+
"f": "f",
|
36
|
+
"T": "θ",
|
37
|
+
"s": "s",
|
38
|
+
"S": "ʃ",
|
39
|
+
"tS": "tʃ",
|
40
|
+
"m": "m",
|
41
|
+
"n": "n",
|
42
|
+
"J": "ɲ",
|
43
|
+
"N": "ŋ",
|
44
|
+
"l": "l",
|
45
|
+
"Z": "ʎ",
|
46
|
+
"jj": "ʎ",
|
47
|
+
"L": "ʎ",
|
48
|
+
"r": "ɾ",
|
49
|
+
"rr": "r",
|
50
|
+
"X": "x"
|
51
|
+
}
|
52
|
+
|
53
|
+
|
54
|
+
def cotovia2ipa(text: str) -> str:
|
55
|
+
"""
|
56
|
+
Converts a string of Cotovía phonemes to IPA.
|
57
|
+
"""
|
58
|
+
# Sort the dictionary keys by length in descending order to handle multi-character phonemes first
|
59
|
+
sorted_cotovia_keys = sorted(COTOVIA2IPA.keys(), key=len, reverse=True)
|
60
|
+
ipa_str = text
|
61
|
+
for cotovia_char in sorted_cotovia_keys:
|
62
|
+
ipa_str = ipa_str.replace(cotovia_char, COTOVIA2IPA[cotovia_char])
|
63
|
+
return ipa_str
|
64
|
+
|
65
|
+
|
15
66
|
class CotoviaPhonemizer(BasePhonemizer):
|
16
67
|
"""
|
17
68
|
A phonemizer class that uses the Cotovia TTS binary to convert text into phonemes.
|
@@ -19,7 +70,7 @@ class CotoviaPhonemizer(BasePhonemizer):
|
|
19
70
|
regular expression transformations to clean and normalize the phonetic representation.
|
20
71
|
"""
|
21
72
|
|
22
|
-
def __init__(self, cotovia_bin_path: Optional[str] = None):
|
73
|
+
def __init__(self, cotovia_bin_path: Optional[str] = None, alphabet: Alphabet = Alphabet.IPA):
|
23
74
|
"""
|
24
75
|
Initializes the CotoviaPhonemizer.
|
25
76
|
|
@@ -31,7 +82,7 @@ class CotoviaPhonemizer(BasePhonemizer):
|
|
31
82
|
if not os.path.exists(self.cotovia_bin):
|
32
83
|
raise FileNotFoundError(f"Cotovia binary not found at {self.cotovia_bin}. "
|
33
84
|
"Please ensure it's installed or provide the correct path.")
|
34
|
-
super().__init__(
|
85
|
+
super().__init__(alphabet)
|
35
86
|
|
36
87
|
@classmethod
|
37
88
|
def get_lang(cls, target_lang: str) -> str:
|
@@ -127,6 +178,8 @@ class CotoviaPhonemizer(BasePhonemizer):
|
|
127
178
|
# substitute ' ( text )' to ', text,'
|
128
179
|
str_ext = re.sub(r"(\w+)\s*\(\s*([^\(\)]*?)\s*\)", r"\1, \\2,", str_ext)
|
129
180
|
|
181
|
+
if self.alphabet == Alphabet.IPA:
|
182
|
+
return cotovia2ipa(str_ext)
|
130
183
|
return str_ext
|
131
184
|
|
132
185
|
|
@@ -138,5 +191,5 @@ if __name__ == "__main__":
|
|
138
191
|
lang = "gl"
|
139
192
|
text_gl = "Este é un sistema de conversión de texto a voz en lingua galega baseado en redes neuronais artificiais. Ten en conta que as funcionalidades incluídas nesta páxina ofrécense unicamente con fins de demostración. Se tes algún comentario, suxestión ou detectas algún problema durante a demostración, ponte en contacto connosco."
|
140
193
|
print(f"\n--- Getting phonemes for '{text_gl}' (Cotovia) ---")
|
141
|
-
phonemes_cotovia = cotovia.
|
194
|
+
phonemes_cotovia = cotovia.phonemize_string(text_gl, lang)
|
142
195
|
print(f" Cotovia Phonemes: {phonemes_cotovia}")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: phoonnx
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.2a2
|
4
4
|
Home-page: https://github.com/TigreGotico/phoonnx
|
5
5
|
Author: JarbasAi
|
6
6
|
Author-email: jarbasai@mailfence.com
|
@@ -71,6 +71,7 @@ Provides-Extra: got
|
|
71
71
|
Provides-Extra: tpi
|
72
72
|
Provides-Extra: pt
|
73
73
|
Provides-Extra: ckb
|
74
|
+
Provides-Extra: train
|
74
75
|
Provides-Extra: lsm
|
75
76
|
Provides-Extra: fa
|
76
77
|
Provides-Extra: av
|
@@ -2,7 +2,7 @@ numpy
|
|
2
2
|
onnxruntime
|
3
3
|
quebra-frases
|
4
4
|
langcodes
|
5
|
-
ovos-number-parser>=0.
|
5
|
+
ovos-number-parser>=0.4.0
|
6
6
|
ovos-date-parser>=0.6.4a1
|
7
7
|
|
8
8
|
[aa]
|
@@ -300,6 +300,13 @@ epitran
|
|
300
300
|
[tr]
|
301
301
|
epitran
|
302
302
|
|
303
|
+
[train]
|
304
|
+
cython<1,>=0.29.0
|
305
|
+
librosa<1,>=0.9.2
|
306
|
+
numpy<2,>=1.19.0
|
307
|
+
pytorch-lightning<2.0
|
308
|
+
torch<2,>=1.11.0
|
309
|
+
|
303
310
|
[uew]
|
304
311
|
epitran
|
305
312
|
|
@@ -299,9 +299,9 @@ class VitsModel(pl.LightningModule):
|
|
299
299
|
test_audio = test_audio * (1.0 / max(0.01, abs(test_audio.max())))
|
300
300
|
|
301
301
|
tag = test_utt.text or str(utt_idx)
|
302
|
-
|
303
|
-
|
304
|
-
|
302
|
+
# self.logger.experiment.add_audio(
|
303
|
+
# tag, test_audio, sample_rate=self.hparams.sample_rate
|
304
|
+
# )
|
305
305
|
|
306
306
|
return val_loss
|
307
307
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|