Is it possible and if so how to respond within a skill with different languages? For example I'm developing a skill for the German skill store which reads various texts from the internet. Those can be any in language and I can determine the language when I'm about to emit the response.
From what I can see the SSML subset Alexa implements does not specify the language in which the response is given. But Alexa's own Kindle skill is able to read me eBooks in either German or English (perhaps Amazon's own skills are special).
As said in other answers the right way is to use the <lang> tag in SSML. However since the english voice do not speak German it is quite weird. The right solution is to change the voice using <voice> tag.
Here is an example in German
<speak>
<voice name="Hans"><lang xml:lang="de-DE">Ich bin ein Berliner</lang></voice>.
I am a Berliner.
</speak>
It is described in this doc https://developer.amazon.com/fr/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html#examplefrench-content-in-an-english-skill
It looks like this is not possible at the moment: https://forums.developer.amazon.com/questions/55086/specify-output-language-per-intent.html
You can use the <lang> tag in SSML for this.
Here is an example in German.
<speak>
<lang xml:lang="de-DE">Mein Luftkissenfahrzeug ist voller Aale</lang>.
Hello in the default language.
</speak>
Here is a list of supported Amazon Polly languages for Alexa.
Related
While using google translate api for english to hindi translation, we are trying to fetch translated roman hindi for an english search query, searching for suitable method.
Currently, the transliteration from English en to Hindi hi, which means that the result will the translated text with only Latin characters, is not supported. As per the comments, from English shoes the expected output would be joote. However, the output is जूते.
There is an already open Feature request within Google's Issue tracker, here, addressing the Transliteration for the Cloud Translation API. Thus, you can click on the +1 button and leave a comment so the Googlers know this issue is also relevant to you. Lastly, I should point out that this platform is used to track bugs and feature requests made by the costumers.
I am creating in which a user can say an address (for further processing). An address can be anything from "New York" to "123 First Avenue Washington" to "Seattle Harbor". Basically like something you can enter at Google Maps - it will recognize more or less everything :)
So now of course comes the problem on how to create a custom slot for this? LITERAL is deprecated PLUS I am working on a German language skill.
Should I actually try to fill the 50,000 lines I got available for a custom skill with as many enumerations of addresses as I can come up with? I'm afraid that even if I go down that road, Alexa will still try to map any input that's not in that list to one that is - and thereby rendering my skill a bit mood :(
Thanks for any advise!
As you suggest, using a custom slot with 50K sample addresses wouldn't really work. Something as complicated as an address really needs a built-in slot type, and there is one for US skills:
https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference#postaladdress
But you noted that you are targeting a German language skill and as far as I know there isn't a German language or address version of the above built-in slot yet.
The fact that they have done it for US suggests that they will add it for Germany at some point, but counting on that is risky, of course, so you are in a difficult position. In the mean-time I would suggest you go to the feature request space and add a request for a German version of the above:
I am currently working on something where I am trying to translate a paragraph which includes more than one language.
Now I have realised with the google translate API if we have lets say:
hello bye hola
it will detect the language as English and if its:
hello hola adios then it will detect Spanish.
So basically whichever language has the highest word count in the sentence/paragraph, it will detect that language. Now the funny thing is that on google translate they actually have this feature.
Is there any way that to fix this issue so that it will only detect the foreign language and not English?
No, there's not a way to do that with the Google Translate API because there's just no mechanism for that exposed in their public API.
If you use an alternate language detection library, you can define a threshold under which to remove the content of the less-represented language. This would allow you to remove the English content if it makes up less than, say, 30% of the text in your overall sample.
For example, see the RemoveMinorityScriptsTextFilterTest class in the optimaize/language-detector project.
I'm creating a web application that uses I18n. As I don't want to translate very common basic strings like "forgot password?" on my own I'm asking you if there are already any resource files or word lists containing these strings. One option is to download an existing framework and extract somehow these strings but this might be a hassle?
Especially I'm looking for translation regarding user authentication and translations from English to Italian, French and German. The file format doesn't matter.
Professional translators use a tool, TMX is the generic term i think, Translation Memory Exchange, that does what you are talking about by building up standard phrase lists in other languages so when they translate they can bring these phrases in to speed up their job and reduce the repetitive tedium. So these lists exist.
There is a free plugin for MS Word that does this and may come with lists (sorry cannot remember the name although Rosetta rings a bell).
There is an FOSS TMX tool called Okapi at Sourceforge. It may come with the dictionaries but if not it is a point where you can investigate.
You could also approach a site called Proz which is a site for translators and might be able to point you in the right direction
Take care over MT like Google API as it can give some weird results but you could use it to build you list and then double check. Remember that when you check a language that you need to do it with a native speaker who can pick up on the nuances and colloquialisms.
You can use google translator api. and your custom resource bundle
How to retrieve a content from FreeBase.com in Italian language?
Now, I can only see content from eng.wikipedia.org.
A lot of the information in Freebase is language independent, but if you want Italian language strings, you can get them by specify that it your queries (the default is English if no language is specified). There's an example app here
For things which are sourced from Wikipedia, the English language Wikipedia forms the basis, so if something only exists in the Italian Wikipedia, it won't be included. For things which are in both, you can get links to both the English article and the Italian article (and you can't get the Italian name directly from Wikipedia or look things up by it).
I don't know how you are making the call, but add this parameter to it:
lang=/lang/it