buhtz
buhtz

Reputation: 12162

Pepper: Switch language only for one single word in a Dialog script

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.

Upvotes: 1

Views: 438

Answers (2)

Eino Gourdin
Eino Gourdin

Reputation: 4507

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.

Upvotes: 0

Anders_K
Anders_K

Reputation: 992

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

Upvotes: 3

Related Questions