How 7awi built Arabic Alexa Skill - Layalina Horoscopes

How 7awi built Arabic Alexa Skill - Layalina Horoscopes

Overview?

By the end of 2021, Amazon officially introduced Alexa to the Middle East starting with Saudi Arabia and the UAE. This virtual assistant can now speak in Arabic and understand the local dialects.

Layalina Horoscopes?is a service provided by Layalina.com (One of 7awi.com brands). For more than 10 years its being updated on a daily basis. The daily horoscope covers all the Astrological signs in general predictions, in addition to predictions in love, work, and health.

The Alexa and 7awi team worked together to launch the horoscopes skill on Alexa. Check this?link?to discover more about the horoscopes skill launched on Alexa

Specifications/Requirements

We have included 6 key features in this skill, here is a brief on each:

  1. Horoscope prediction by horoscope name:?the user has the ability to provide Alexa with his horoscope or any horoscope, the skill will pass the horoscope name to API to retrieve the general horoscope on that day. Alexa will respond with results in Modern Standard Arabic (MSA).
  2. Themes prediction (love, work, and health) by horoscope name:?to get the theme prediction;?it's the same as above but the difference is Alexa will pass the horoscope ID and theme ID.
  3. Get, set and change the default horoscope: users can set their default horoscope to be saved and used for the next time. Data will be saved on DynamoDB with the user ID and horoscope ID.?
  4. Default horoscope prediction: the user asks Alexa about his/her horoscope. Layalina skill will check if the user has set his default horoscope, if not then it asks the user about his default horoscope and then provides him with the horoscope prediction.
  5. Default horoscope - theme prediction:?the user asks Alexa about his/her horoscope. Layalina skill will check if the user has set his default horoscope, if not then it asks the user about his default horoscope and default theme and then provides him with the horoscope theme prediction.
  6. Automatic Suggestion Function: this is an important feature included in the skill, which involves Alexa providing hints and suggestions to the user for other features of the skill that he/she is not aware of which will play a significant role in increasing the usage and improving user engagement.

How the Horoscope Skill Works

Layalina horoscopes built on Amazon Alexa using Alexa Voice Service process the?utterances, identify the user’s?intent?and validate the value of the?slots?(if they exist) then send the inputs to the Backend?(Skills Application Logics)?to handle the intent. Backend built using Node.js on the Lambda server for handling the intents.

Backend Services:

1.?DynamoDb:?As a database to store user IDs with horoscope ID

2.?CloudWatch:?Used for logs

3.?S3 storage:?Used for static files, such as logos and images

4.?Layalina Api:?Used to get predictions

5.?Third-party service:?Used for diacritics

Then build a speech response in addition to a visual response (if the device supports it).

No alt text provided for this image

Intents: An intent represents an action that fulfills a user's spoken request. Intents can optionally have arguments called slots. Intents are specified in a JSON structure called the intent schema. Intents can optionally have arguments called?slots.

Sample utterances: A set of likely spoken phrases mapped to the intents. They include as many representative phrases as possible.

Slots (optional): Intents arguments?

Custom slot types: A representative list of possible values for a slot. Use custom slot types for lists of items that aren't covered by one of Amazon's built-in slot types.

Dialog model (optional):?A structure that identifies the steps for a multi-turn conversation between your skill and the user to collect all the information needed to fulfill each intent. The dialog model simplifies your code to ask the user for information.

Intents Used in Skills:

1.?Horoscope by Name Intent: Has required?Horoscope?slot and more than 175 sample utterances, like:

  • ??? ?? ??? {Horoscope}?
  • ?????? {Horoscope} ?????
  • ?????? ??? {Horoscope}?

2.?Horoscope Name by Theme Intent: Has required?Horoscope?slot and?Theme?slot. It has more than 220 sample utterances, like:

  • ?? ??? {Horoscope} ?? {Theme} ?????
  • ?????? {Theme} ???? {Horoscope}
  • ??? ?????? {Theme} ???? {Horoscope}

3.?My Horoscope Intent: Has more than 54 sample utterances, like:

  • ?? ???? ?????
  • ???? ?????
  • my horoscope

4.?My Horoscope by Theme Intent: Has required?Theme?slot and more than 39 sample utterances, like:

  • ?? ???? ?? {Theme}
  • ????? ???? ???? ?? {Theme} ?????
  • ???? ?? {Theme}

5.?My Default Horoscope Intent: Has more than 32 sample utterances, like:

  • ????? ?????????
  • ??? ???? ?????????
  • ???? ??????

6.?Set Default Horoscope Intent:?Has required?Horoscope?slot and more than 33 sample utterances, like:

  • ????? ??? ???????
  • ???? ?????? ?? {Horoscope}
  • ??? {Horoscope} ?? ???? ??????

7.?Change Default Horoscope Intent:?Has required?Horoscope?slot and more than 37 sample utterances, like:

  • ???? ???? ???????
  • ???? ???? ??????? ??? {Horoscope}
  • ???? ????? ??????

Built-in Intents Skill:?The standard intents are used for common, general actions; such as stopping, canceling, and asking for help. To learn more about built-in intents check this?link.

  1. AMAZON.HelpIntent
  2. AMAZON.CancelIntent
  3. AMAZON.StopIntent
  4. AMAZON.NavigateHomeIntent
  5. AMAZON.FallbackIntent

Slots Used in Skills

  1. {Horoscope}:?Indicates horoscope variable. The Slot type is:?HoroscopeType
  2. {Theme}:?Indicates Theme variable. The slot type is:?ThemeType

Slot Type:

  • HoroscopeType:?

No alt text provided for this image

  • Theme Type

No alt text provided for this image

Horoscope Skill Application Logics Flowchart

No alt text provided for this image

References:

  1. https://global.techradar.com/en-ae/news/alexa-can-now-speak-arabic-launches-officially-in-saudi-arabia-and-uae-with-echo-devices
  2. https://developer.amazon.com/en-US/docs/alexa/custom-skills/standard-built-in-intents.html#available-standard-built-in-intents
  3. https://developer.amazon.com/en-US/docs/alexa/custom-skills/create-the-interaction-model-for-your-skill.html

要查看或添加评论,请登录

社区洞察