JapaneseG2P class
Japanese grapheme-to-phoneme converter for Kokoro TTS.
Uses MeCab for morphological analysis and converts readings to Kokoro-compatible phonemes.
final g2p = JapaneseG2P.init('/path/to/ipadic');
final phonemes = g2p.convert('こんにちは世界');
print(phonemes); // koɴɲiʨiβa sekai
g2p.dispose();
Constructors
- JapaneseG2P.init(String dictPath)
-
Initialize with MeCab IpaDic dictionary path.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
convert(
String text) → String - Convert Japanese text to Kokoro phonemes.
-
dispose(
) → void - Release resources.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited