Closed ambiSk closed 2 years ago
Hi, You can have exactly what you want. Have a look:
from phonemizer import phonemize
from phonemizer.separator import Separator
phonemize(
text = 'हमने उसका जन्मदिन मनाया',
language = 'hi',
backend = 'espeak',
separator=Separator(phone='-', word=' -'),
)
You'll get h-ʌ-m-n-eː- -ʊ-s-k-aː- -ɟ-ʌ-n-m-ə-d-ɪ-n- -m-ə-n-aː-j-aː- -
.
Thanks
My Code looks like this
And the output is kind of like this:
I came across a class known to be Separator, but I don't know how to initialise that in this method to get token separated output.
Example: if token separated token is
-
, then the output for the above sentence I'm expecting needs to be like this:We can ignore the space separated characters(
- -
)