misaki_zh library
Chinese-specific APIs for the Misaki Dart port.
The legacy and 1.1 renderers are platform-neutral pure Dart, but this
core package does not bundle cn2an, Jieba, or pypinyin data. Supply an
explicit ChineseLegacyBackend or ChineseFrontend11Backend
implementation for the selected contract. The sibling
misakid_chinese package provides supported explicit-resource pure-Dart
backends for both contracts.
ChineseTextNormalizer accepts either the bundled pinned character map or
another explicit ChineseCharacterConverter.
Classes
- AsyncG2pEngine
- A reusable engine whose backend requires asynchronous work.
- BackendInfo
- Stable identity information reported by an injected backend.
- ChineseCharacterConverter
- Narrow boundary for the pinned traditional-to-simplified conversion stage.
- ChineseFrontend11
-
Pure implementation of pinned
ZHFrontendversion 1.1. - ChineseFrontend11Backend
- External capabilities required by the pinned Chinese frontend 1.1 path.
- ChineseFrontend11G2pEngine
-
Pinned outer
ZHG2P(version: "1.1")mixed-script contract. - ChineseLegacyBackend
- External capabilities required by the pinned legacy Chinese pipeline.
- ChineseLegacyG2pEngine
- Pinned legacy/default Chinese G2P pipeline.
- ChineseSandhiWord
- One immutable word and part-of-speech pair entering tone sandhi.
- ChineseTextNormalizer
- Ordered pure-text pipeline copied from the pinned Chinese NSW normalizer.
- ChineseToneSandhi
- Ordered Mandarin tone-sandhi and pre-merge stage from pinned Misaki.
- ChineseToneSandhiBackend
- Injected lexical capabilities needed by the pure tone-sandhi rules.
- EnglishTokenMetadata
- Metadata produced by the English pipeline.
- G2pEngine
- A synchronous, reusable grapheme-to-phoneme engine.
- G2pResult
- Exact output from one grapheme-to-phoneme conversion.
- JapaneseTokenMetadata
- Metadata produced by the pyopenjtalk-style Japanese pipeline.
- KokoroEnglishG2pFrontend
- Kokoro 0.9.4's token-aware English G2P frontend.
- KokoroG2pChunk
- One text-and-phoneme chunk ready for Kokoro model input preparation.
- KokoroNonEnglishG2pFrontend
- Kokoro 0.9.4's pre-G2P chunking contract for non-English languages.
- MisakiBackend
- Common contract for explicitly supplied language backends.
- MisakiToken
- Immutable token shared by all language engines.
- PinnedChineseCharacterConverter
- Built-in pure-Dart converter generated from pinned PaddleSpeech/Misaki data.
- TokenMetadata
- Language-specific, typed token details.
- UnknownMarkerG2pEngine
- A synchronous G2P engine whose unresolved-token marker is inspectable.
- VietnameseTokenMetadata
- Metadata produced by the Vietnamese pipeline.
Enums
- ChinesePhonemeMode
- Selects one of pinned Misaki's distinct Chinese rendering contracts.
Constants
- defaultUnknownMarker → const String
- Default replacement for text that a selected engine cannot phonemize.
- misakiUpstreamCommit → const String
- The authoritative upstream revision for fixtures and copied data.
- misakiUpstreamRepository → const String
- The upstream project whose observable behavior this package ports.
- misakiUpstreamVersion → const String
- The Python package version at misakiUpstreamCommit.
Functions
-
chinesePhonemeInventory(
ChinesePhonemeMode mode) → Set< String> -
Returns the frozen source-derived render-scalar inventory for
mode.
Typedefs
- ChineseEnglishG2p = String Function(String text)
- Optional synchronous English callback used at the outer mixed-script boundary.
Exceptions / Errors
- BackendFailureException
- A configured backend failed while processing input.
- A required explicitly configured backend is not available.
- InvalidConfigurationException
- The selected options do not form a supported configuration.
- MalformedDataException
- Generated or copied runtime data failed validation.
- MisakiException
- Base class for failures exposed by Misaki Dart APIs.