Extending phoneme set to 256

This commit is contained in:
Michael Hansen
2023-05-07 10:58:37 -05:00
parent 7d9a59ab91
commit d62340b68e
3 changed files with 93 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ from typing import Dict, Iterable, List, Mapping, Optional
from espeak_phonemizer import Phonemizer
MAX_PHONEMES = 256
DEFAULT_PHONEME_ID_MAP: Dict[str, List[int]] = {
"_": [0],
"^": [1],
@@ -135,6 +136,25 @@ DEFAULT_PHONEME_ID_MAP: Dict[str, List[int]] = {
"χ": [127],
"": [128],
"": [129],
"0": [130], # tones
"1": [131],
"2": [132],
"3": [133],
"4": [134],
"5": [135],
"6": [136],
"7": [137],
"8": [138],
"9": [139],
"\u0327": [140], # combining cedilla
"\u0303": [141], # combining tilde
"\u032a": [142], # combining bridge below
"\u032f": [143], # combining inverted breve below
"\u0329": [144], # combining vertical line below
"ʰ": [145],
"ˤ": [146],
"ε": [147],
"": [148],
}