You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I want to use mfa pretrained English_mfa acoustic model and dictionary for alignment. I also want to use the same dictionary for G2P (from text to phoneme). What is the corresponding G2P model for me to transform a text into phoneme? I want to use it for tts inference.
Thanks a lot!
The text was updated successfully, but these errors were encountered:
@vivian556123 If you want to generate using python instead of running in batches, you can
from montreal_forced_aligner.g2p.generator import PyniniGenerator
from montreal_forced_aligner.models import G2PModel, ModelManager
language = "english_us_mfa"
# If you haven't downloaded the model
# manager = ModelManager()
# manager.download_model("g2p", language)
model_path = G2PModel.get_pretrained_path(language)
g2p = PyniniGenerator(g2p_model_path=model_path, num_pronunciations=1)
g2p.setup()
Then call g2p.rewriter
>>> g2p.rewriter('my time')
['m aj tʰ aj m', 'm ɑ tʰ aj m', 'm ə tʰ aj m', 'mʲ i tʰ aj m']
However, i think there is no point using the MFA G2P, as the results are not sorted in order of likelihood. In fact, it seems that just mapping every word to the most common pronunciation is more accurate and faster. I would recommend using a different G2P library, as long as the phonemes are compatible (e.g. ARPA). For example https://pypi.org/project/g2p-en/
Hi, I want to use mfa pretrained English_mfa acoustic model and dictionary for alignment. I also want to use the same dictionary for G2P (from text to phoneme). What is the corresponding G2P model for me to transform a text into phoneme? I want to use it for tts inference.
Thanks a lot!
The text was updated successfully, but these errors were encountered: