IBM Text to Speech: How to have correct pronounciation of English words in German text? - ibm-cloud

I am using the IBM Text to Speech to process some German texts. Pronounciation of the text with a German voice is working ok. However, the text contains some English words and phrases. For those, the pronounciation sometimes is incorrect. How can I fix that?
Example:
Er kommt aus Amerika und nennt sich TJ.
TJ should be pronounced like someone from California would do.

I was able to make it work by using Speech Synthesis Markup Language (SSML) on my text. The German text remains the same. For the English expressions I provided some "phonemes". Here is the one for TJ:
<phoneme alphabet="ibm" ph="tIZE">TJ</phoneme>
I had to use German symbols which can be found in the docs.

Related

ICU Message Format and Interaction / Links

In my application I use the ICU message format to localize user-visible strings for different languages. A relevant (contrived) example would be:
(EN) Click on this link to find out more.
(DE) Dieser Link führt zu weiteren Informationen.
The issue I ran into is interactivity and styling for this sentence. I want the bold fragments to be clickable links in the sentence and style them differently.
The go-to solution for such cases would be to separate the bold words and make them a separate ICU message and handle this message separately in the app (to apply interactivity and styling), perhaps like a button. The problem is how this should be implemented in the context of a sentence, since the language prescribes different number and order of sentence-fragments:
(EN) (Click on) (this link) (to find out more)
(DE) (Dieser Link) (führt zu weiteren Informationen)
I could of course feed the string of the link as a parameter into an ICU message containing the surrounding sentence to obtain the sentence as one string, but then I can't apply the link-action or styling in-app, since I end up with one sentence.
What is a solution to this problem? For context: The app is written in flutter targeting mobile.

Foreign languages words in a text

I've a french text with some words in english and I want to find those words and highlight all of them at once. Is there any program that can help me do that? Is it possible to do this with any other foreign language?
I'm using microsoft Word.
Word can do this IF the English words are formatted with the English language (and the rest in the French language). In that case, Word's FIND functionality advanced options are able to filter so that the language formatting is searched (instead of text).

Print Chinese / Japanese character in Zebra Printer with ZPL

I have loaded the Mono Chinese/ Japanese font onto my ZM400 printer. So far I have no success printing both Chinese & English together on the same field.
Here is some example code:
^XA^CW1,B:ANMDS.TTF
^SEB:GB.DAT^CI14
^FO100,100^A1,50,50^FD中文English Here^FS
^XZ
Since I change the international code to 14 (with ^CI14), it only prints the Chinese text without the English text.
I have also try using the ^FL command, but can't seen to get it to work.
Does anyone have a working example of printing Chinese / Japanese text along with English text on the same FD (data field)?
You should probably use ^CI28 (UTF-8), and make sure that your labels are encoded in UTF-8.
As far as I know, ^CI14 only supports Asian encodings.
If anyone is looking at how to do this, I imagine what I did for Japanese will work for Chinese.
Firstly, I didn't want to purchase the Asian Font Pack because I think it's a bit of a ripoff, so I found an appropriate open source Japanese Unitype Font. I then uploaded this to the printer using Zebra Tools... make sure you upload it as a file, NOT using the font upload.
Then I managed to get it printing by escaping the characters.
So my final ZPL is
^XA
^LL150
^CI28^A#N,60,60,E:OSAKA.TTF
^FO0,0
^FH
^FD_5F_E3_81_93_E3_82_8C_E3_81_AF_E4_BD_95_E3_81_A8_E8_A8_80_E3_81_A3_E3_81_A6_E3_81_84_E3_81_BE_E3_81_99^FS
^XZ
Essentially you have to escape the bytes of each value (original Japanese これは何と言っています)
You also have to put ^FH in front of ^FD so it knows you're escaping characters.
Hopefully this helps the poster and anyone else who is looking to overcome problems with ZPL and Unicode fonts / characters.
I have figured out why. The Chinese text needs to be in gibberish format.
What I meant by gibberish is that. When you use Chinese in ZPL code, it needs to be in the windows codepage format text. This windows codepage format Text that is Chinese will be displayed as gibberish in English environment.
For example. In ZPL Code, your code might look like this:
^H ~!!####$ (this gibberish is actual the ASCII representation of Chinese text in windows code page format)
However, you can't type in unicode Chinese because ZPL would not print it.
^H 中文 (this is Chinese text in unicode format)

How to convert punjabi unicode to English Text?

I have records saved in SQL SERVER database in form of punjabi unicode. Now i want to convert these punjabi unicode to English Text. Is there any utility which can help me? Please reply if anyone have solution paid/free. Thanks in advance.
The question is nonsensical -- in the sense that it makes no sense.
Unicode is not a language. It merely provides a mapping from characters (more precisely, glyphs) to a binary code, in such a way that text in a font using Punjabi characters will stay that way when another font is applied. There is no "English" Unicode, and no "Punjabi" Unicode either.
You can only 'translate' from Punjabi to English using translating software. (Given the current state of automatic translation software, you are better off with a human who is fluent in both languages.)
If you wants to change Punjabi Unicode converted into English Text as example
ਨਿੱਕੀ ਕਹਾਣੀ (unicode)
in`kI khwxI (Converted into Gurmukhi Lipi, shows as English ! When you change its font into GurmukhiLipi it shows in punjabi)
You can check my website, previously in UNICODE and now in GURBANI LIPI (I have installed a plugin to convert English Letters as Punjabi)

Sample text for common scripts

The Windows font chooser dialog displays different text according to the selected 'Script' (corresponding to legacy Windows code pages, I think). I want to preview fonts that support scripts not listed there, however, and I was wondering if there is a resource of short (~8-12 characters) strings useful for this purpose.
Here's what I've got so far, based on the preview text from the Windows font chooser:
Latin: AaBbYyZz
Greek: AaBbΑαΒβ
Cyrillic: AaBbБбФф
Hebrew: AaBbנסשת
Arabic: AaBbابجدهوز
Thai: AaBbอักษรไทย
Korean: 가나다AaBbYyZz
Japanese: Aaあぁアァ亜宇
Chinese: 中文字型範例
Devanagari: माता
Gurmukhi: ਮਾਤਾ
Gujarati: માતા
Tamil: அம்மா
Telugu: అమ్మ
Kannada: ಅಮ್ಮ
The Chinese text is from the Traditional Chinese preview text in the font chooser dialog - I'd like text that's good for simplified and traditional fonts, so I'm not sure about this one.
The six South Asian scripts at the end of the list all use the word 'mother', which seems a bit strange, but I'll use the same pattern for Malayalam:
Malayalam: അമ്മ
In Bengali, however, 'mother' is apparently only two characters long (মা), so I'd prefer to find something else for that language.
I'm missing sample text for the following languages/scripts:
Armenian: ?
Bengali: ?
Oriya: ?
Lao: ?
Tibetan: ?
Georgian: ?