Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read numbers, currencies, date and time (marytts 5.2) #872

Open
randilp opened this issue Jun 13, 2018 · 3 comments
Open

Cannot read numbers, currencies, date and time (marytts 5.2) #872

randilp opened this issue Jun 13, 2018 · 3 comments

Comments

@randilp
Copy link

randilp commented Jun 13, 2018

Hi,

We have developed a Text to Speech system for Sinhala language using marytts. We have used marytts version 5.2. However, we could not train that system to read numbers, currencies, etc. Then we have identified that there is a preprocess. java file and we can use that to solve above problem.

However, we could not compile that successful. Error says:

cannot find symbol variable si
Location: class java.util.Locale

in that preprocess.java file, it tries to import java.util.locale class file but cannot find locale.SINHALA.
Then gives the above error.

Could you please help me to solve this problem

Best Regards,
Randil

@psibre
Copy link
Member

psibre commented Jun 13, 2018

in that preprocess.java file, it tries to import java.util.locale class file but cannot find locale.SINHALA.

I'm not sure which preprocess file you mean -- do you have a link? In any case, I'm pretty sure there is no Locale.SINHALA constant, so that obviously explains your error. Please read the documentation: https://docs.oracle.com/javase/tutorial/i18n/locale/create.html

@randilp
Copy link
Author

randilp commented Jun 13, 2018

Thank you very much.

Actually we have extracted that preprocess.java file from marytts. That is inside marytts-languages/marytts-lang-de/src/..../java/marytts/..../de/

For german, it imports locale class and then call german locale using locale.GERMAN file.
Similar to that we tried to do it for Sinhala. But could not compile.

@psibre psibre removed the invalid label Jun 13, 2018
@psibre
Copy link
Member

psibre commented Jun 13, 2018

Locale.GERMAN is a valid constant in Java, but for anything more exotic, you need to create your own locale instance.

For some numeric material, you should be able to use the RBNF from ICU4J, but other text normalization will require at least some manual handling.

Incidentally, be sure to check out the Sinhala resources at googlei18n/language-resources if you haven't already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants