MycroftAI / mycroft-core

Mycroft Core, the Mycroft Artificial Intelligence platform.
https://mycroft.ai
Apache License 2.0
6.52k stars 1.27k forks source link

mycroft-core pairing : use the de facto international standard for spelling (NATO phonetic alphabet ) #1286

Closed yleny-dev closed 6 years ago

yleny-dev commented 6 years ago

Hello,

For the pairing step, mycroft-core (desktop and mycroft mark 1 and picroft) speaks and give numbers and letters for the pairing code. But when it spells letters it does not use the de facto international standard as you can see here (mycroft cli log): 20xx-1x-1x 2x:2x:50,9xx - SpeechClient - INFO - Speak: I'm connected to the internet and need to be activated. Register me at home dot mycroft dot A.I with the code. Four. Four. 'W' as in Whiskey. Seven. 'K' as in Kilogram. 'P' as in Paul

The de facto international standard for spelling is the NATO phonetic alphabet ( https://en.wikipedia.org/wiki/NATO_phonetic_alphabet ). The 26 code words in the International phonetic alphabet are assigned to the 26 letters of the English alphabet in alphabetical order as follows: Alpha, Bravo, Charlie, Delta, Echo, Foxtrot, Golf, Hotel, India, Juliett, Kilo, Lima, Mike, November, Oscar, Papa, Quebec, Romeo, Sierra, Tango, Uniform, Victor, Whiskey, X-ray, Yankee, Zulu.

Can you modify the Mycroft pairing source code to use the NATO phonetic alphabet for spelling ?

Thank you.

penrods commented 6 years ago

When we built the phonetic alphabet used by Mycroft we looked at several options (see https://en.wikipedia.org/wiki/Spelling_alphabet). What we are using is a hybrid of the NATO alphabet along with some variations from other alphabets to deal with words that simple "sound better" coming out of the default Mimic text-to-speech technology. The variations from NATO were intentional based on user-testing to minimize confusion.

Although the variants might make a military person notice, I don't believe there is any confusion caused by these variations and the spelling works well for general consumers.

yleny-dev commented 6 years ago

Hello,

I don't believe there is any confusion caused by these variations and the spelling works well for general consumers.

Maybe for English-speaker but not for French-speaker. I opened this ticket because when I tried to pair a device (my mark1 or my picroft), mycroft said "'P' as in Paul". With the Mimic TTS and english voice, the sentence is totally incomprehensible even when listening several times for a French-speaker.

Then I think that the best solutions to test would be: First, add a way to select the language in Mycroft Mark 1 (https://github.com/MycroftAI/mycroft-core/issues/1270 ) and Picroft (read a ini file where there is the language selected by the user) and mycroft desktop. When mycroft know that the user language is other than english, then it use the TTS with specific voice and parameters for this language. When I use the TTS espeak to read a french text with the english voice, the syllables of the words are very difficult to understand

If this solution does not work, then I think it will be necessary to have one phonetic alphabet for spelling by language.

penrods commented 6 years ago

The phonetic alphabet is part of the skill-pairing. Skills are localizable, but I see that the implementation in there is not done in a localization-friendly method yet. We just added a few translation mechanisms which will simplify this -- specifically the MycroftSkill.translate_list(listname). Then each language can implement as appropriate. I'll add an issue on that repo.

Tweaking this for a specific TTS engine is probably not ideal (e.g. the French espeak), but I still think optimizing the English implementation for the default Mycroft Mimic engine make sense.

As for switching languages, we are just building out the localization tools -- we don't advertise full language support everywhere yet! We will continue to add to these capabilities and eliminate things like this hard-coded string of English over the next few months.

P.S. See https://mycroft.ai/documentation/language-support/ and https://mycroft.ai/documentation/language-support/french/

penrods commented 6 years ago

Since there is a issue for localizing the Phonetic alphabet on the pairing skill now (https://github.com/MycroftAI/skill-pairing/issues/17), I'm going to close this issue.