Skip to content

ZHG2P() takes no arguments #157

@ilanzuo

Description

@ilanzuo

What happened?

Have no idea what had happened ?

code :

import soundfile as sf
from kokoro_onnx import Kokoro
from misaki import zh

Misaki G2P with espeak-ng fallback

g2p = zh.ZHG2P(version="1.1")

text = "千里之行,始于足下。"
voice = "zf_001"
kokoro = Kokoro("kokoro-v1.1-zh.onnx", "voices-v1.1-zh.bin", vocab_config="config.json")
phonemes, _ = g2p(text)
samples, sample_rate = kokoro.create(phonemes, voice=voice, speed=1.0, is_phonemes=True)
sf.write("audio.wav", samples, sample_rate)
print("Created audio.wav")

Steps to reproduce

iSSUE :
(ven) lanzuo@lanzuodeMac-mini kokoro % python chinese.py
Traceback (most recent call last):
File "/Users/script/Model/kokoro/chinese.py", line 6, in
g2p = zh.ZHG2P(version="1.1")
TypeError: ZHG2P() takes no arguments

What OS are you seeing the problem on?

MacOS

Package version

version="1.1"

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions