Skip to content

Please add usage examples for all supported languages #96

@yurivict

Description

@yurivict

I tried this usage example for the Korean language:

from misaki import ko

g2p = ko.G2p()

text = '즐거운 오후 보내시고 나중에 다시 뵙겠습니다.'

phonemes, tokens = g2p(text)

print(phonemes)

but it fails:

$ python3.11 files/usage-ko.py 
Traceback (most recent call last):
  File "/usr/ports/misc/py-misaki/files/usage-ko.py", line 10, in <module>
    g2p = ko.G2p()
          ^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/misaki/g2pkc/g2pk.py", line 26, in __init__
    self.mecab = self.get_mecab()
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/misaki/g2pkc/g2pk.py", line 39, in get_mecab
    import mecab
ModuleNotFoundError: No module named 'mecab'

The mecab dependency is not declared for the ko language so why is it needed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions