convert method
Converts text into exact phoneme output and optional token details.
Implementation
@override
G2pResult convert(String text) {
try {
final phonemes = backend.phonemize(
text,
preservePunctuation: options.preservePunctuation,
preserveStress: options.preserveStress,
);
return G2pResult(phonemes: phonemes, tokens: null);
} on MisakiException {
rethrow;
} on Exception catch (error) {
throw BackendFailureException(
'Hebrew backend ${backend.info} failed to phonemize the input.',
cause: error,
);
}
}