1

I write a Dialog script for the roboter Pepper with the Choreography IDE. The default language is German. But some words are English and I need Pepper to pronounce them correctly. How can I switch the language for a specific word? In the example below it is the word Apple.

topic: ~Fiction_Facts()
language: ged

u:(e:onStart) Das ist ein Apple.
Eino Gourdin
  • 4,169
  • 3
  • 39
  • 67
buhtz
  • 10,774
  • 18
  • 76
  • 149

2 Answers2

3

I doubt it will work but you can try to change the language at run-time. Edited after feedback from JLS

u:(e:onStart) Das ist ein  ^call(ALTextToSpeech.changeLanguage('English')) Apple. 
    ^call(ALTextToSpeech.changeLanguage('German')) 

Your second option is to perform the pronounciation phonetically, but this is hard and you many never get the result you want. I have never been able to find the correct table of symbols so you will just have to experiment.

\\toi=lhp\\‘zi.R+o&U \\toi=orth\\

http://doc.aldebaran.com/2-5/naoqi/audio/altexttospeech-tuto.html?highlight=lhp#inserting-phonetic-text

The phonetic alphabet may be similar to the one used by AWS Polly: https://docs.aws.amazon.com/polly/latest/dg/phonemetables.html

Anders_K
  • 982
  • 9
  • 28
  • 1
    you may have more chances of success with changing only ALTextToSpeech.setLanguage so dialog is not lost between two languages. And don't forget to set it back after your word! – JLS Mar 12 '18 at 08:11
0

Changing the language for one word won't be efficient, as it takes several seconds to change from one language to another. Alternatively, you can either try to write the word differently to transcribe the target language in source language (something like Das ist ein Apol) to get the robot to pronounce it right.

Or, if the previous does not work, more cumbersomely you can record the word in English as a sound file, and play it in the robot's answer.

Eino Gourdin
  • 4,169
  • 3
  • 39
  • 67