I'm working on speech processing project where I'm getting user voice from the mic as a input to the raspberry pi and convert to other language and again that converted text is speak by raspberry pi.

Everything works fine when speak language is in english but when it is Hindi/Marathi then it speaks this

"\u092e\u0930\u093e\u0920\u0940 \u0915\u0940\u092c\u094b\u0930\u094d\u0921"

rather that this

"मराठी कीबोर्ड"

So what can I do, so it should speaks only what I want, not some encoded stream

Thanking in advanced


I believe those (u092e, etc) are Hindi Unicode characters. Whatever software you're using to convert those characters into speech apparently doesn't handle them. You need to check its documentation relating to non-English Unicode to see if it can be enabled, or switch to another package that supports Hindi text-to-speech.


With the additional information that the package used is espeak, it looks like it does have a Hindi language option. Unfortunately the documentation describes this option as 'initial naive implementations which have had little or no feedback and improvement from native speakers', so your results may be less than spectacular.

From the espeak documentation on language files:

A number of Voice files are provided in the espeak-data/voices directory. You can select one of these with the -v parameter to the speak command, eg:

espeak -vaf

to speak using the Afrikaans voice.

In your case the appropriate option is hi for Hindi, per the ISO 639-1 standard. You'll need to run espeak using that parameter:

espeak -vhi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.