This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pathlib import Path | |
| from misaki import en | |
| import numpy as np | |
| import onnxruntime | |
| def tokenize(phonemes): | |
| """ | |
| Converts a list of phonemes (strings) into a list of their corresponding | |
| integer IDs based on the global VOCAB dictionary. | |
| Filters out any phonemes not found in the vocabulary. |