Gracias por tu visita. Esta página solo está disponible en inglés.
Alexa Blogs Alexa Developer Blogs /blogs/alexa/feed/entries/atom 2019-06-25T00:23:50+00:00 Apache Roller /blogs/alexa/post/35b20e50-cf01-4c6d-acc6-aad6f0733bf2/alexa-auto-tu-automotive-best-auto-mobility-product-service-award-winner Alexa Auto: TU-Automotive Best Auto Mobility Product/Service Award Winner Arianne Walker 2019-06-21T16:36:28+00:00 2019-06-21T16:36:28+00:00 <p><a href="" target="_self"><img alt="Alexa Auto and Home" src="" style="display:block; height:240px; margin-left:auto; margin-right:auto; width:954px" /></a>Amazon Alexa’s in-vehicle voice-first experience won TU-Automotive’s Best Auto Mobility Product/Service award for 2019.</p> <p><img alt="Alexa Auto to Home" src="" style="display:block; height:240px; margin-left:auto; margin-right:auto; width:954px" /></p> <p>Amazon Alexa’s in-vehicle voice-first experience won TU-Automotive’s Best Auto Mobility Product/Service award for 2019. We are humbled by the recognition, which serves as a testament to how the auto industry is embracing Alexa, and responding to customer demand for a voice-first experience in the vehicle.&nbsp;</p> <p><img alt="TU Automotive Award Winner" src="" style="float:right; height:198px; margin:5px; width:396px" />TU-Automotive had close to 200 entries for the awards, about 20 of which were for the Best Auto Mobility Product/Service category. The rigorous judging process included an evaluation of the product/service against a number of criteria for each category, including consumer perception and who is currently using the product/service.&nbsp;</p> <p>“Customers clearly love using Alexa in the home and by introducing it to the automotive space, Amazon is ultimately creating a seamless user experience,” said Kelly Grant, Portfolio Director, TU-Automotive.&nbsp;&nbsp;</p> <p>Chris Wenneman, Director, Alexa Automotive, accepted the award on June 4, 2019 at the TU-Automotive Awards Ceremony.&nbsp;&nbsp; &nbsp;</p> <p>As recognized by TU-Automotive, there is a variety of ways to bring Alexa with you when you are on the go.&nbsp;Many automakers are bringing Alexa into their newer <a href="" target="_blank">vehicles</a> to improve and augment the voice-first experience for drivers. If you’re not in the market for a brand-new car, you can choose from a number of aftermarket <a href="" target="_blank">devices</a> with Alexa built-in.&nbsp;Bringing Alexa into the vehicle means staying productive, connected, and entertained while keeping your hands on the wheel and eyes on the road.<img alt="TU Automotive Award Photo" src="" style="display:block; height:293px; margin:5px auto; width:293px" /></p> <p>&nbsp;</p> <p>&nbsp;</p> /blogs/alexa/post/6c0c28e7-50e5-4868-afef-71bbe74423aa/alexa-skills-kit-sound-library1 Access More than 2,500 New Sound Clips on the Alexa Skills Kit Sound Library to Build Delightful Skill Experience June Lee 2019-06-21T15:12:19+00:00 2019-06-21T16:35:06+00:00 <p><img alt="" src="" />Starting today, you can access more than 2,500 new sound clips on the <a href=";sc_category=Owned&amp;sc_channel=BG&amp;sc_campaign=launch&amp;sc_content_category=richresponse&amp;sc_country=WW">Alexa Skills Kit (ASK) Sound Library</a> to build rich and engaging skill experiences that delight your customers.</p> <p><img alt="" src="" /></p> <p>Today, we are excited to announce that you can access more than 2,500 new sound clips on the <a href=";sc_category=Owned&amp;sc_channel=BG&amp;sc_campaign=launch&amp;sc_content_category=richresponse&amp;sc_country=WW">Alexa Skills Kit (ASK) Sound Library</a> to build rich and engaging skill experiences that delight your customers. We have diverse sounds from more than 50 sound categories including animals, boats, doors, and sports. Additionally, you can use the new search bar and the smart filters to discover sound clips more quickly. The new sound clips and the search functionalities are available for developers in all locales starting today.</p> <h2>Delight Customers by Including Variety of Sounds in Your Skills</h2> <p>We first introduced the <a href=";sc_category=Owned&amp;sc_channel=BG&amp;sc_campaign=launch&amp;sc_content_category=richresponse&amp;sc_country=WW">ASK Sound Library</a> in March 2018, and made close to 400 sound clips from 14 categories available. Since launch, developers have incorporated the sound clips into skills, which was played for millions of times worldwide per month, creating delightful experience for customers. Based on the high demand, we decided to expand the ASK Sound Library selection to help you make your skill experience richer. As an example, you can easily create a rich and realistic background set up for your skills leveraging various ambience sounds imitating different spaces.</p> <p>Here are a couple of examples of how you can use the sound clips. You can simply use any sound clip in your skill response by using &lt;audio&gt; SSML tag.</p> <pre> <code>&lt;speak&gt; This is Alexa's regular speech, followed by the sound effect &quot;futuristic_01)&quot;. &lt;audio src=&quot;soundbank://soundlibrary/aircrafts/futuristic/futuristic_01&quot;/&gt; &lt;/speak&gt; OR &lt;speak&gt; This is Alexa's regular speech, followed by the sound effect &quot;steam_05&quot;. &lt;audio src=&quot;soundbank://soundlibrary/air/steam/steam_05&quot;/&gt; &lt;/speak&gt;</code></pre> <h2>Find the Right Sound for Your Skill in Seconds Using the Smart Filters and the Search Functions</h2> <p>You can now discover the right sounds for your skills in seconds using the smart filters and the search bar. The ASK Sound Library also allows you to play the sound clips so you can preview them before deciding to use them in your skill response.</p> <p><img alt="" src="" /></p> <h2>Get Started</h2> <p>We hope that you find the new sound clips in the <a href=";sc_category=Owned&amp;sc_channel=BG&amp;sc_campaign=launch&amp;sc_content_category=richresponse&amp;sc_country=WW">ASK Sound Library</a> useful to create richer, more engaging skill experience for your customers. Please share your feedback or request new sound clips through <a href="">Alexa Skills - Developer Voice And Vote</a>.</p> /blogs/alexa/post/5b9d0483-69c1-4069-aad2-1684a4c15ab1/writing-great-prompts-for-built-in-slots Writing Great Prompts for Built-in Slots in Alexa Skills Anna Van Brookhoven 2019-06-20T14:00:00+00:00 2019-06-20T14:00:00+00:00 <p><img alt="blog_situational-design_.png" src="" /></p> <p>Write great prompts for Alexa by crafting precise responses and using built-in slot types.</p> <p><img alt="blog_situational-design_.png" src="" /></p> <p>Interactions with Alexa rely on <em>prompts,</em> which coach the customer on what to say next. Prompts are the primary force guiding customers through a successful interaction, and so the words matter—a lot. As Amazon Alexa VUI Designer Alison Atwell says, “<a href="" target="_blank">Words can signal subtle meaning to users.</a>” But even if you understand the importance of writing for Alexa, it can seem like mysterious process. The good news is, there are concrete ways to harness the power of those subtle signals, just by taking a close look at the slot types in your code.<br /> <br /> As most skill builders know, the Alexa Skills Kit provides a number of useful <a href="" target="_blank">built-in slots</a>, which contain well-designed, robust sets of valid slot values. What skill builders may not know is that there’s a tight relationship between what’s in the code and Alexa’s dialog. When your skill contains a prompt that isn't precise, customers can interpret the question in ways you didn't intend or predict. As a result, they can answer in ways that aren't included in your slot values. An imprecise prompt can shuffle customers off the happy path and into the weeds.<br /> <br /> With some simple tweaks, you can fine-tune your dialog to reflect your code’s slot types. You’ll create precise language with the right subtle signals to set up your skill customers for success — and divert them from error states.<br /> <br /> To illustrate how slots and prompts go in tandem, let’s look at some often-used built-in slots.</p> <h2>Where: Eliciting a Specific Location</h2> <p>Lots of skills need to elicit a location from customers, whether it’s a trip-planning skill, or a skill to help customers find things in their area, like doctors or movie theaters. But “where” is a broad concept, and customers can interpret it in multiple ways. Here’s an example:</p> <p style="margin-left:40px"><em>Customer: “Alexa, ask Take Me Away to plan a trip.”<br /> <br /> Alexa: “Let’s go! Take Me Away will help you plan your dream trip. <u>Where</u> do you want to go?”<br /> <br /> Customer A: “Let’s go to Seattle!” (a city)<br /> <br /> Customer B: “I want to visit Kansas!” (a state)<br /> <br /> Customer C: “Take me to India!” (a country)<br /> <br /> Customer D: “Anywhere but here.” (We may not be able to help Customer D.)</em></p> <p>Let’s assume the Take Me Away skill employs the AMAZON.US_CITY built-in slot in its code. In the scenario above, only Customer A has provided a valid slot value to move forward in the interaction; the other customers will likely hear an error message.<br /> <br /> Now, let’s make a small improvement to the prompt. Instead of “Where do you want to go?,” we’ll change it to “What city do you want to visit?”</p> <p style="margin-left:40px"><em>Customer A: “Let’s go to Seattle!” (a city)<br /> <br /> Customer B: “I want to visit Topeka!” (a city in Kansas)<br /> <br /> Customer C: “Take me to Mumbai!” (a city in India)<br /> <br /> Customer D: “Um, can you recommend a city?” (Ideally, Take Me Away could handle requests for a recommendation.)</em></p> <p>Now, because the prompt was specific and expectations were clear, all of these customers understood what information they needed to provide. Each customer moves forward in the interaction instead of hearing an error message or getting re-prompted. Small changes can make a big difference.<br /> <br /> Here are some suggested prompts for location slot types:</p> <ul> <li>AMAZON.US_CITY: What city?</li> <li>AMAZON.US_STATE: What state?</li> <li>AMAZON.Country: What country?</li> <li>AMAZON.Airport: Which airport?</li> </ul> <p>What if you code your skill to employ multiple built-in slots? Your prompt can indicate that, too:</p> <ul> <li>AMAZON.US_CITY and AMAZON.US_STATE: Which city or state sounds good?</li> <li>AMAZON.US_CITY and AMAZON.Airport: What’s your departure city or airport?</li> </ul> <h2>When: Eliciting a Specific Time</h2> <p>Many skills require customers to specify time-based information, like a date or time of day — commonly found in travel skills, or skills where customers purchase tickets. Similar to “where,” when your skill tries to elicit a time, the word “when” can be vague.</p> <p style="margin-left:40px"><em>Customer: “Alexa, tell Tickets Please I want to see Star Wars.”<br /> <br /> Alexa: “Alright! <u>When</u> do you want to see it?”<br /> <br /> Customer A: “At 7 pm!” (a time of day)<br /> <br /> Customer B: “Um, Tuesday, I guess.” (a day of the week)<br /> <br /> Customer C: “How about July 6?” (a date)<br /> <br /> Customer D: “As soon as possible!” (To help Customer D, the skill would need access to the soonest movie times, which is a subject for another post.)</em></p> <p>Let’s suppose that the Tickets Please skill is employing the AMAZON.Time built-in slot. In that case, only Customer A has provided a valid slot value. And again, a simple edit can keep all of these customers on the happy path.<br /> <br /> Some suggested prompts for time-related slot types:</p> <ul> <li>AMAZON.DayOfWeek: Which day of the week?</li> <li>AMAZON.Month: What month?</li> <li>AMAZON.Date: What date?</li> <li>AMAZON.Time: What time?</li> </ul> <p>It is possible to code your skill to accept or require multiple types of slots — for example, if the skill needed to collect both a date and a time. Developers can use <a href="" target="_blank">dialog management</a> to handle conditional data collection. In this case, a broadly worded prompt may work, because your dialog management set-up can elicit additional pieces of data if the customer doesn’t initially provide them.</p> <h2>How Long: Eliciting a Specific Duration</h2> <p>A more complex case occurs when a skill needs the customer to specify an end date or a duration. For example, in a skill where a customer is purchasing a subscription, the customer may need to specify how long they want to subscribe to the product or service.</p> <p style="margin-left:40px"><em>Customer: “Alexa, tell Magazine Rack I want to get a subscription to Coders Weekly.”</em></p> <p>In this case, there are two built-in slots that could be used: AMAZON.Duration, and AMAZON.Date. The slot your code employs depends on what data your back-end system needs to collect — which in turn affects your prompt.<br /> <br /> If your back-end system is trying to collect an <em>end date </em>for the subscription, you’ll likely use AMAZON.Date. In this case, you’d want your prompt to explicitly ask for it: “What date do you want your subscription to end?”<br /> <br /> If your back-end system aims to collect a duration for the subscription (and then calculates the end date from there),you’ll likely use AMAZON.Duration. In this case, your prompt might say “How long do you want to subscribe?” so that users can give answers like “six months,” or “one year.”<br /> <br /> The way that slot type and prompt rely on each other is a perfect example of how design and development share common goals! Everyone wants the customer to succeed, and double-checking your prompts for alignment has a huge impact on a skill’s success.</p> <h2>Related Content</h2> <ul> <li><a href="" target="_self">Alexa Design Guide</a></li> <li><a href="" target="_self">How to Write Great Dialogs for Alexa Skills</a></li> <li><a href="" target="_self">Best Practices for the Welcome Experience and Prompting in Alexa Skills</a></li> <li><a href="" target="_self">Things Every Alexa Skill Should Do: Simplify Choices</a></li> </ul> /blogs/alexa/post/67953f88-d837-48ea-a8b0-ce9316fc4e5b/alexatraining-reminder-api Alexaスキル開発トレーニングシリーズ:リマインダーAPIの利用方法 Tsuneki Umeda 2019-06-20T08:20:16+00:00 2019-06-20T08:20:16+00:00 <p>今回は、本格的なスキル開発に向けて、<a href="" target="_blank">AlexaリマインダーAPI</a>を使用したスキルの開発方法を紹介します。リマインダーAPIを効果的に使用すれば、スキルのリテンション率アップにもつながります。</p> <p><img class="fr-dii fr-fic" src="" /></p> <p>今回は、本格的なスキル開発に向けて、<a href="" target="_blank">AlexaリマインダーAPI</a>を使用したスキルの開発方法を紹介します。リマインダーAPIを効果的に使用すれば、スキルのリテンション率アップにもつながります。</p> <p>&nbsp;</p> <p>リマインダーAPIの実装には、公式リポジトリのサンプルコードが参考になります。今回は、機能を追加しやすいように該当部分のコードを解説いたします。</p> <p>今回使用するサンプルコードはこちらです。</p> <p><a href=""></a></p> <p>&nbsp;</p> <p>サンプルコードでは、リマインダー作成処理を行う handler は大きく分けて以下の5つの処理から構成されています。</p> <p>① アクセストークンの取得</p> <p>② インテントの確認</p> <p>③ アクセス権限を確認し、権限が許諾されていない場合はホームカードを送信</p> <p>④ リマインダーの作成</p> <p>⑤ レスポンスの作成</p> <p>&nbsp;</p> <p><strong>① <a href="" target="_blank">71行目</a> ~</strong></p> <p>リマインダーを作成するためのhandler内でアクセストークンを取得</p> <pre> <code class="language-javascript">const CreateReminderHandler = { &nbsp; canHandle(handlerInput) { &nbsp; &nbsp; const request = handlerInput.requestEnvelope.request; &nbsp; &nbsp; return request.type === 'IntentRequest' &amp;&amp; === 'CreateReminderIntent'; &nbsp; }, &nbsp; async handle(handlerInput) { &nbsp; &nbsp; const requestEnvelope = handlerInput.requestEnvelope; &nbsp; &nbsp; const responseBuilder = handlerInput.responseBuilder; //リクエストに含まれるアクセストークンを取得 &nbsp; &nbsp; const consentToken = requestEnvelope.context.System.apiAccessToken;</code></pre> <p>&nbsp;</p> <p><strong>② <a href="" target="_blank">82行目</a> ~</strong></p> <p>リマインダーを作成する場合、作成するたびにユーザーから同意を得る必要があり、そのための処理をConfirmationStatus の値を利用して実装しています。開発者コンソールで CreateReminderIntent の「インテントの確認」を有効にします。</p> <p><img alt="" src="" style="height:322px; width:1972px" /></p> <ul> </ul> <p>インテントの確認状況ごとに適切に処理を追加します。</p> <pre> <code class="language-javascript">&nbsp; &nbsp; // confirmationStatusの値を確認 &nbsp; &nbsp; switch (requestEnvelope.request.intent.confirmationStatus) {     // ユーザーがインテントを確認した場合は処理を続行 &nbsp; &nbsp; &nbsp; case 'CONFIRMED': &nbsp; &nbsp; &nbsp; &nbsp; console.log('Alexa confirmed intent, so clear to create reminder'); &nbsp; &nbsp; &nbsp; &nbsp; break;     // ユーザーがインテントを拒否した場合はリマインダー作成処理を中止 &nbsp; &nbsp; &nbsp; case 'DENIED': &nbsp; &nbsp; &nbsp; &nbsp; console.log('Alexa disconfirmed the intent; not creating reminder'); &nbsp; &nbsp; &nbsp; &nbsp; return responseBuilder &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .speak(`${messages.NO_REMINDER} ${messages.WHAT_DO_YOU_WANT}`) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .reprompt(messages.WHAT_DO_YOU_WANT) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .getResponse();     // confirmationStatusが&quot;NONE&quot;の場合はユーザーに確認を促す &nbsp; &nbsp; &nbsp; case 'NONE': &nbsp; &nbsp; &nbsp; default: &nbsp; &nbsp; &nbsp; &nbsp; console.log('delegate back to Alexa to get confirmation'); &nbsp; &nbsp; &nbsp; &nbsp; return responseBuilder &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addDelegateDirective() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .getResponse(); &nbsp; &nbsp; } </code></pre> <p>参考 :</p> <ul> <li><a href="" target="_blank">Alexaリマインダー--使用のガイドライン</a></li> <li><a href="" target="_blank">インテントの確認を有効にする</a></li> <li><a href="" target="_blank">Intentオブジェクト</a></li> </ul> <p>&nbsp;</p> <p><strong>③ <a href="">102行目</a>~</strong></p> <p>ユーザーがスキルにリマインダーのアクセス権限を付与していない場合、スキルからユーザーにアクセス権限の付与方法を詳しく説明し、スキルのアクセス権限ページへのリンクを提供するホームカードを送信する必要があります。</p> <pre> <code class="language-javascript">&nbsp; &nbsp; if (!consentToken) { &nbsp; &nbsp; &nbsp; return responseBuilder &nbsp; &nbsp; &nbsp; &nbsp; .speak(messages.NOTIFY_MISSING_PERMISSIONS) &nbsp; &nbsp; &nbsp; &nbsp; .withAskForPermissionsConsentCard(PERMISSIONS) &nbsp; &nbsp; &nbsp; &nbsp; .getResponse(); &nbsp; &nbsp; }</code></pre> <p>参考:</p> <p><a href="">スキルでリマインダーをコーディングする際のベストプラクティス</a></p> <p>&nbsp;</p> <p><strong>④</strong><a href="" target="_blank"><strong>108行目</strong><strong>~</strong></a></p> <p>リマインダーの作成</p> <pre> <code class="language-javascript">&nbsp; &nbsp; try { &nbsp; //&nbsp;getReminderManagementServiceClient()をコールするには249行目の.withApiClient(new Alexa.DefaultApiClient())が必要です。 &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; const client = handlerInput.serviceClientFactory               .getReminderManagementServiceClient(); &nbsp; &nbsp; &nbsp; const reminderRequest = { // トリガー情報を設定します。 &nbsp; &nbsp; &nbsp; &nbsp; trigger: { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type: 'SCHEDULED_RELATIVE', &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; offsetInSeconds: '30', &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; //リマインダーの読み上げ情報などを設定します &nbsp; &nbsp; &nbsp; &nbsp; alertInfo: { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; spokenInfo: { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content: [{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; locale: 'en-US', &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text: 'time to get up and dance', &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }], &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; },      // Alexaモバイルアプリへのリマインダーのプッシュ通知を設定します &nbsp; &nbsp; &nbsp; &nbsp; pushNotification: { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status: 'ENABLED', &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; };     //上記の設定情報を元にリマインダーを作成します &nbsp; &nbsp; &nbsp; const reminderResponse = await client.createReminder(reminderRequest); &nbsp; &nbsp; &nbsp; console.log(JSON.stringify(reminderResponse)); &nbsp; &nbsp; } catch (error) { &nbsp; &nbsp; &nbsp; if ( !== 'ServiceError') { &nbsp; &nbsp; &nbsp; &nbsp; console.log(`error: ${error.stack}`); &nbsp; &nbsp; &nbsp; &nbsp; const response = responseBuilder.speak(messages.ERROR).getResponse(); &nbsp; &nbsp; &nbsp; &nbsp; return response; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; throw error; &nbsp; &nbsp; } </code></pre> <p>参考:</p> <p><a href="" target="_blank">トリガー時刻の計算</a></p> <p><a href="" target="_blank">リマインダーオブジェクト</a></p> <p>&nbsp;</p> <p><strong>⑤ <a href="" target="_blank"><strong>139行目</strong><strong>~</strong></a>&nbsp;</strong></p> <p>.speak()にリマインダー作成時の発話を設定し、レスポンスを作成します。</p> <pre> &nbsp;<code> &nbsp; return responseBuilder &nbsp; &nbsp; &nbsp; .speak(messages.REMINDER_CREATED) &nbsp; &nbsp; &nbsp; .getResponse(); &nbsp; }, };</code></pre> <p>&nbsp;</p> <p><strong>まとめ</strong></p> <p>ここまでで、リマインダー機能の実装方法を紹介しました。 リマインダーAPIは、絶対時刻または相対時刻のtrigger.typeを使用できます。 スキルの用途に合わせて適切なリマインダーを設定するようにしてください。 公開する時には、実際にユーザーテストを繰り返して、インテントの確認・ユーザー権限の許諾を促す処理が行われるか確認することをお勧めします。</p> <p><a href="">■ トレーニングコース目次 ■</a></p> <hr /> <p><a href="" target="_blank">Alexa Skills Kit (ASK) (日本語)&nbsp;</a>スペースでは、スキル開発に関する質問や、他のメンバーの質問に対する回答を投稿することができます。お気軽に投稿ください。</p> /blogs/alexa/post/25dfbf79-3d53-4ac1-9833-8a290d900575/new-spanish-language-training-course-nuevo-curso-de-desarrollo-de-skills-alexa-construye-una-skill-alexa-atractiva-con-feliz-cumplea%C3%B1os New Spanish-Language Training Course | Nuevo Curso de Desarrollo de Skills Alexa: Construye una Skill Alexa atractiva con &quot;Feliz Cumplea&ntilde;os&quot; German Viscuso 2019-06-19T14:00:00+00:00 2019-06-19T14:00:00+00:00 <p>Estamos encantados de presentarte nuestro nuevo curso autodidacta de desarrollo de skills: <a href="">&quot;Feliz Cumplea&ntilde;os: Construye una Skill de Alexa Atractiva&quot;</a>. Este curso gratuito ofrece una gu&iacute;a paso a paso de construcci&oacute;n de una skill Alexa de calidad desde el principio hasta el final &iexcl;No te lo pierdas!</p> <p><strong><em>Editor’s Note:</em></strong><em> We <a href="">recently launched</a> a new training course in English called <a href="">Cake Walk: Build an Engaging Alexa Skill</a>. This course is also a self-paced, skill-building course that offers guidance on how to build a high-quality skill from start to finish. Reference this <a href="">training course</a> if you're building skills for English locales.</em></p> <p>Estamos encantados de presentarte nuestro nuevo curso autodidacta de desarrollo de skills: <a href=" ">&quot;Feliz Cumplea&ntilde;os: Construye una Skill de Alexa Atractiva&quot;</a>. Este curso gratuito ofrece una gu&iacute;a paso a paso de construcci&oacute;n de una skill Alexa de calidad desde el principio hasta el final. Los nuevos desarrolladores de skills aprender&aacute;n a crear su primera skill en pocos minutos. Los m&aacute;s experimentados aprender&aacute;n como agregar caracter&iacute;sticas m&aacute;s avanzadas como memoria/persistencia para proveer una experiencia de voz m&aacute;s conversacional y personalizada. Cuando completes el curso tendr&aacute;s un conocimiento fundacional del desarrollo de skills y de las herramientas relacionadas para ayudarte a construir skills Alexa de calidad que tus clientes apreciar&aacute;n.</p> <h2>Aprende a Implementar una Experiencia de Voz</h2> <p>Aunque es f&aacute;cil crear r&aacute;pidamente una skill Alexa, hay muchos aspectos a considerar para construir una experiencia de voz atractiva. Tener una gran idea es importante pero tambi&eacute;n lo es la implementaci&oacute;n. Una gran idea para una skill pero mal implementada har&aacute; muy dif&iacute;cil obtener y retener a los usuarios. Antes de que comiences a convertir tu idea en una skill Alexa te recomendamos que te tomes tu tiempo para dise&ntilde;ar una experiencia de voz, aprender a construir una interfaz de usuario de voz y comprender el conjunto de herramientas disponibles para desarrollar skills. Hemos dise&ntilde;ado el curso de Feliz Cumplea&ntilde;os para ense&ntilde;arte estos conceptos y as&iacute; aprendas a dise&ntilde;ar e implementar una skill atractiva.<br /> <br /> Feliz Cumplea&ntilde;os es una skill simple que te permite contar los d&iacute;as que faltan para tu cumplea&ntilde;os. Tambi&eacute;n te dar&aacute; un mensaje de Feliz Cumplea&ntilde;os ene se d&iacute;a especial. A lo largo del curso aprender&aacute;s a construir tu propia versi&oacute;n de la skill comenzando desde lo m&aacute;s b&aacute;sico para luego ir agregando caracter&iacute;sticas m&aacute;s avanzadas como manejo de dial&oacute;gos, persistencia y recordatorios.</p> <h2>M&oacute;dulos del Curso</h2> <p>El curso ofrece 8 m&oacute;dulos de programaci&oacute;n de skills:</p> <ul> <li><a href="">Creando Skills Alexa de Cero (20:24)</a> donde aprender&aacute;s la teor&iacute;a de desarrollo de skills y crear&aacute;s tu primera skill de tipo Hello World en unos pocos minutos</li> <li><a href="">i18n de skills (26:20)</a> donde aprender&aacute;s a soportar m&uacute;ltiples idiomas en tu skill</li> <li><a href="">Di&aacute;logos (29:00)</a> donde ver&aacute;s como hacer para que la skill pregunt&eacute; de forma autom&aacute;tica cuando falte informaci&oacute;n</li> <li><a href="">Memoria y Persistencia (26:54)</a> donde te ense&ntilde;aremos como hacer para que tu skill recuerde la informaci&oacute;n aun al terminarse la sesi&oacute;n</li> <li><a href="">Acceso a APIs de ASK (23:58)</a> donde te mostraremos como recuperar la zona horaria y el nombre del usuario</li> <li><a href="">API de Recordatorios (46:34)</a> donde ver&aacute;s como enviar un recordatorio desde tu skill en la fecha de cumplea&ntilde;os</li> <li><a href="">Acceso a APIs Externas (31:52)</a> donde aprender&aacute;s como conectarte a una API externa para recuperar informaci&oacute;n y utilizarla en tu skill</li> <li><a href="">Introduccion a APL (57:14)</a> donde ver&aacute;s como hacer la skill visualmente atractiva en dispositivos con pantalla</li> </ul> <p>Si este es tu primer contacto con la creaci&oacute;n de skills te recomendamos comenzar por el <a href="">primer m&oacute;dulo</a>. Si ya conoces lo b&aacute;sico y quieres soportar m&uacute;ltiples idiomas en tu skill puedes ir directamente al <a href="">m&oacute;dulo 2</a>. En general puedes hacer los m&oacute;dulos que m&aacute;s te interesen pero ten en cuenta que los videos parten de el estado de skill como se ha dejado en el m&oacute;dulo previo.</p> <h2>Lo que Aprender&aacute;s</h2> <p>Al completar este curso comprender&aacute;s los componentes de dise&ntilde;o de voz, desarrollo de skills y manejo de herramientas para que puedas crear skills Alexa atractivas. Aprender&aacute;s a utilizar la <a href="">Consola de Desarrollo de Alexa</a> para crear y testear tu skill. Tambi&eacute;n aprender&aacute;s como utilizar <a href="">Alexa-Hosted skills</a> para unificar el trabajo con front-end y el back-end en <a href=""></a>. El curso presenta los conceptos fundamentales de desarrollo de skills utilizando el <a href="">Alexa Skills Kit Software Development Kit for Node.js</a>. Tambi&eacute;n aprender&aacute;s a utilizar caracter&iacute;sticas importantes del Alexa Skill Kit (ASK) como:</p> <ul> <li><a href="">Intents, utterances, y slots</a> para construir una interfaz de usuario de voz</li> <li><a href="">Auto delegation</a> para que la skill pregunt&eacute; de forma autom&aacute;tica cuando falte informaci&oacute;n</li> <li><a href="">ASK Software Development Kit for Node.js</a> para procesar las peticiones que se envien al back-end de tu skill</li> <li><a href="">Attributos Persistentes</a> con <a href="">Amazon S3</a> para que tu skill recuerde la informaci&oacute;n aun al terminarse la sesi&oacute;n</li> <li><a href="">Alexa Settings API</a> para recuperar la zona horaria y el nombre del usuario</li> <li><a href="">Reminders API</a> para enviar un recordatorio en la fecha de cumplea&ntilde;os</li> <li><a href="">Alexa Presentation Language (APL)</a> para hacer la skill visualmente atractiva en dispositivos con pantalla</li> </ul> <h2>M&aacute;s Material de Entrenamiento para Mejorar tus Skills Alexa</h2> <p>Una vez que hayas completado este curso te recomendamos que contin&uacute;es tu aprendizaje con los siguientes recursos:</p> <ul> <li><a href="">Designing for Conversation Course</a>: Aprende a dise&ntilde;ar experiencias conversacionales m&aacute;s din&aacute;micas (en ingl&eacute;s)</li> <li><a href="">Alexa Design Guide</a>: Aprende los principios de dise&ntilde;o de voz situacional para que crees skills voice-first que sean naturales y enfocadas en el usuario (en ingl&eacute;s)</li> <li><a href=";sort=time">How to Shift from Screen-First to Voice-First Design</a>: Aprende los cuatro patrones de dise&ntilde;o que hacen que una experiencia voice-first sea atractiva (en ingl&eacute;s)</li> </ul> <h2>Comienza Ya a Construir la Skill &quot;Feliz Cumplea&ntilde;os&quot;</h2> <p>Este curso es gratuito y est&aacute; dise&ntilde;ado para que lo hagas a tu propio ritmo por lo que cualquier persona puede utilizarlo para construir su primera skill de Alexa. <a href=" ">Haz click aqu&iacute;</a> para comenzar. Y danos tu opini&oacute;n! Puedes contactarme via Twitter <a href="">@GermanViscuso</a> y enviarme tus comentarios.</p> /blogs/alexa/post/60dc242d-ce9e-4d66-bde6-2a69599858a3/common-error-messages-for-custom-alexa-skills-and-how-to-troubleshoot-them-jp スキルの応答でエラーが発生したときの解決策 Jason Kwan 2019-06-19T05:00:45+00:00 2019-06-19T05:00:45+00:00 <p>ここではスキル開発でよく遭遇するエラーメッセージと、それらの原因と解決方法をご紹介します。</p> <p>ここではスキル開発でよく遭遇するエラーメッセージと、それらの原因と解決方法をご紹介します。</p> <p>&nbsp;</p> <h2>1. Alexa: 「スキルからの応答に問題があります」</h2> <p>対話モデルとバックエンドサービスの作成が完了後、シミュレータや実機でスキルをテストする際に下記のエラーメッセージに遭遇することがあります。</p> <ul> <li>ユーザー:「アレクサ、&lt;呼び出し名&gt;を起動して」</li> <li>Alexa: 「スキルからの応答に問題があります」</li> </ul> <p>このエラーは、スキルからのJSONレスポンスが不正な形で送信され、セッションが強制終了したことが原因です。また、スキルを起動するときのLaunchRequest以外のインテントをテストするときにも発生する場合があります。</p> <h3>&nbsp;</h3> <h3>解決方法:</h3> <p>JSONのレスポンスをデバッグするには、必ずJSONのレスポンスをログに出力して、サンプルのJSONレスポンスと比較してみてください。スキルのエンドポイントがAWS Lambdaの場合、テストイベントを使えばエンドポイント側で発生しているエラーを確認しながらデバッグが可能です。<br /> &nbsp;</p> <h2>2. Alexa: 「リクエストされたスキルから有効な応答がありませんでした」</h2> <ul> <li>ユーザー:「アレクサ、&lt;呼び出し名&gt;を起動して」</li> <li>Alexa: 「リクエストされたスキルから有効な応答がありませんでした」</li> </ul> <p>この問題は、AWS Lambdaを使用しているときに、Alexa Skills Kitのトリガーが追加されていない場合や、AWS Lambda以外のエンドポイントでSSLの設定に誤りがあるときに発生します。</p> <h3>&nbsp;</h3> <h3>解決方法:</h3> <p>AWS Lambdaを使用している場合はLambda側の設定でAlexa Skills Kitのトリガーが追加されていることをご確認ください。また、独自のエンドポイントを使用している場合、こちらの<a href="">ドキュメント</a>のウェブサービスの要件を満たしていることをご確認ください。<br /> &nbsp;</p> <h2>3. Alexa: 「すみません、ちょっと難しいです」</h2> <p>スキルをシミュレータでテストするときは問題なく起動できても、実機でテストするときにこのエラーが発生するケースがあります。よくある原因としては、実機でログインしているアカウントが開発者とは別のアカウントであるため、スキルが見つからず起動できないといったケースがあります。また、スキルの呼び出し名を変更した後、新しい呼び出し名が反映されていないケースもあります。</p> <h3>&nbsp;</h3> <h3>解決方法:</h3> <p>アカウントが必ず同じリージョンで作成されていることをご確認ください。開発者アカウントは、Alexaアプリへログインするアカウントと同じメールアドレス・パスワードである必要があります。詳しくは <a href="">「Alexa 開発者アカウント作成時のハマりどころ」</a>を参照してください。<br /> また、呼び出し名の変更が反映されない場合は、スキルを一度無効にして、再び有効にしてください。開発者コンソールのシミュレータ上でテストしている場合、ステージを「開発中」から「非公開」にして、再び「開発中」にしてください。実機でテストしている場合は、Alexaアプリの履歴で認識された文字列が実際の呼び出し名と一致しているかをご確認ください。<br /> &nbsp;</p> <h2>4. Alexa: <音声のみの応答です>またはイヤコン(Alexaの効果音)</h2> <p>スキルを開発者コンソールのシミュレータでテストするときに、下記のケースが発生するときがあります。</p> <ul> <li>ユーザー:「アレクサ、&lt;発話&gt;」</li> <li>Alexa: 「&lt;エラー音&gt;」</li> </ul> <p><img alt="" src="" style="height:76px; width:226px" /><br /> この応答はユーザーの発話がスキルの対話モデルに正しくマッピングできないときに発生します。Alexaはユーザーの発話を対話モデルにマッピングしようとしますが、対話モデルに存在しない発話はマッピングできない場合があります。その結果、Alexaからの回答の信頼度が低いサインとして、音声のみの応答が送信されます。</p> <h3>&nbsp;</h3> <h3>解決方法:</h3> <p><a href="">発話プロファイラー</a>を使用して、正しくマッピングされていない発話をご確認ください。このツールによって、どの発話がより正確に認識されるか確認することができ、インテントに正しく入らない発話も明確になります。<br /> &nbsp;</p> <h2>5. Alexa: &lt;応答なし&gt;</h2> <p>スキルをシミュレータでテストするときに、応答がない、または発話がずっと読み込み中の状態から進まないケースがあります。ブラウザやパソコンの設定によりテストシミュレータが正しく動作していない可能性があるため、動作環境を確認してください。<br /> また、開発者のアカウントのリージョンと開発しているスキルのリージョンが異なる場合、実機でスキルを起動しても応答が返ってこないケースもあります。例えば、en-USのスキルをen-UKのデバイスでテストしている場合、言語設定が異なるためスキルが起動できません。</p> <h3>&nbsp;</h3> <h3>解決方法:</h3> <ul> <li>ブラウザ設定 <ul> <li>Chrome/Firefoxでテストする</li> <li>拡張機能やプラグインを無効にする</li> <li>プライベートウィンドウでテストする</li> <li>ブラウザのキャッシュをクリアする</li> </ul> </li> <li>環境設定 <ul> <li>アンチウイルスソフトやファイアウォールを無効にする</li> <li>ネットワークの設定やポリシーを確認する</li> </ul> </li> <li><a href="">アカウントの国・リージョン設定を確認する</a></li> <li>Alexaデバイスの言語設定を確認する</li> <li>スマートフォンからAlexaを起動する場合、スマートフォン本体の言語設定がスキルの言語と一致していることを確認する</li> </ul> <p>&nbsp;</p> <h2>関連トピック</h2> <ul> <li><a href="">カスタムスキルのテストとデバッグ</a></li> <li><a href="">発話をテストして対話モデルを改善する</a></li> <li><a href="">Alexa道場:デバッグ方法を覚えよう</a></li> <li><a href="">発話プロファイラー</a></li> </ul> /blogs/alexa/post/93069e48-9baa-4dab-b51f-f761d5e7b1e7/getting-started-with-the-cake-walk-course-adding-memory-to-the-cake-walk-skill-to-remember-the-customer-s-birthday Getting Started with the Cake Walk Course: Adding Memory to the Cake Walk Skill to Remember the Customer’s Birthday Jennifer King 2019-06-17T14:00:00+00:00 2019-06-17T14:00:00+00:00 <p><img alt="" src="" style="height:480px; width:1908px" /></p> <p>In part 3 of my blog series about our new training course called Cake Walk, I cover how we added memory to Cake Walk to create a more engaging voice experience.</p> <p><img alt="" src="" style="height:480px; width:1908px" /></p> <p><em><strong>Editor’s Note:</strong> We </em><a href=""><em>recently launched</em></a><em> a new training course called </em><a href=""><em>Cake Walk: Build an Engaging Alexa Skill</em></a><em>. The course is a self-paced, skill-building course that offers guidance on how to build a high-quality skill from start to finish. In this 4-part blog series, we’re going to dive deep into the coding modules within the course. You can read part 1 on designing the voice user interface for Cake Walk </em><a href=""><em>here</em></a><em>. Part 2 covers </em><a href="">how to use slot delegation</a><em> to collect slots turn by turn. </em></p> <p>In my <a href="">previous post on designing the Cake Walk skill</a>, I did a deep dive on <a href="">situational design</a>. Instead of a flow chart, my colleague and I focused on the conversation and used situational design. This helped us focus the experience and enabled us to build a useful, simple, and sticky skill. We determined that we would need a way to remember our customer’s birthday. Shared context and <a href="">memory</a> are paramount to natural, conversational interactions. The shared context changes over time based on past interactions. Once two people get to know one another, they don’t need to keep reintroducing themselves as if they never met before. When designing your skill, you should make sure to give your skill some memory. Your customers will appreciate that the skill doesn’t ask for the same information over and over. The reduced friction may lead to a better customer experience and customer retention. In part 3 of our Cake Walk series, I cover <a href="">how we added memory</a> to Cake Walk to create a more engaging voice experience.</p> <h2>Birthday Unknown vs. Known</h2> <p>Let’s quickly review our design. We have two situations based on the customer’s birthday: unknown and known. If the birthday is unknown, we must ask for it. If the birthday is known, we use it to calculate the number of days until their next one, unless it’s their birthday. In that case, we wish them a happy birthday.</p> <p><img alt="" src="" /></p> <h2>Where to Store the Birthday Data</h2> <p>Alexa skills are stateless and don’t automatically remember information between requests. We have to file the birthday away somewhere. If we don’t, sadly we’ll immediate forget it after we send back a response. The next time our customer uses our skill, the birthday is yet again unknown. To our customer’s chagrin, we’ll have ask for it again. This is less than ideal. We could use <a href="">session attributes</a>, which are passed back and forth between our skill and the Alexa service via the request and the response. Doing so will allow us to remember their birthday a little longer. Sadly, however, this solution is not perfect. Session attributes are forgotten as soon as the session ends as the skill quits. This means we need something a little more permanent. Two great places where you can store information are <a href="">Amazon S3</a> and <a href="">DynamoDB</a>. If you’re using your own AWS account to host your skill, you’ll most likely want to use DynamoDB, which is a key-value and document database. If you’re using Alexa-hosted skills, which is what I used to build the Cake Walk skill, you only have Amazon S3 at your disposal. Wherever you choose to save their birthday, the code to read, write, and delete it stays the same. The only difference is how you set things up.</p> <p>Let’s take a look at how to set up Amazon S3 and DynamoDB with the <a href="">Alexa Skills Kit (ASK) Software Development Kit (SDK) for Node.js</a></p> <h3>Setting Up the Persistence Adapter</h3> <p>Before we are able to save, we need to configure a persistence adapter. A persistence adapter is an object that is configured to the storage service we want to connect to and operate on its data using persistent attributes. We can use the persistence adapter to access our storage service, which wires it into the SDK so we can use the same code to read, write and delete data from whatever service we are connected to. Once we configure our persistence adapter, we will register it with the SDK and our <strong>skillBuilder</strong> using the <strong>withPersistenceAdapter</strong> function.</p> <h4>Amazon S3</h4> <p>When using Alexa-hosted skills, the service sets up your skill’s AWS Lambda function. It does not include the S3 persistence adapter, so you’ll have to update your <strong>package.json</strong> file. You’ll need to add <strong>“ask-sdk-s3-persistence-adapter”: “^2.0.0”</strong> the <strong>dependencies</strong>. Upon doing so, your <strong>package.json</strong> file will look like:</p> <p><strong>package.json</strong></p> <pre> <code>{ &quot;name&quot;: &quot;cake-walk&quot;, &quot;version&quot;: &quot;0.9.0&quot;, &quot;description&quot;: &quot;alexa utility for quickly building skills&quot;, &quot;main&quot;: &quot;index.js&quot;, &quot;scripts&quot;: { &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot; }, &quot;author&quot;: &quot;Amazon Alexa&quot;, &quot;license&quot;: &quot;ISC&quot;, &quot;dependencies&quot;: { &quot;ask-sdk-core&quot;: &quot;^2.0.7&quot;, &quot;ask-sdk-model&quot;: &quot;^1.4.1&quot;, &quot;aws-sdk&quot;: &quot;^2.326.0&quot;, &quot;ask-sdk-s3-persistence-adapter&quot;: &quot;^2.0.0&quot; } }</code></pre> <p>Once you’ve updated the <strong>package.json</strong>, you’ll need to click on the <strong>deploy</strong> button to have the Alexa service install the <strong>ask-sdk-s3-persistence-adapter</strong>. To use the adapter in your code, you’ll need to load the module into your <strong>index.js</strong> file. To do so you, use the <strong>require</strong> keyword:</p> <pre> <code>const persistenceAdapter = require('ask-sdk-s3-persistence-adapter');</code></pre> <p>You can put this anywhere in your file as long as it appears before you use it. It’s a standard practice to load your modules at the top of your files, so I recommend that you put it there.</p> <p>Next, we need to use the module to create an S3 persistence adapter. The constructor takes in an object. <strong>bucketName</strong> is the name of the bucket that we want our <strong>s3PersistenceAdapter</strong> to connect to. Since we used Alexa-hosted, a bucket was created for us. We can access the name of that bucket with the <strong>S3_PERSISTENCE_BUCKET</strong> environment variable. You can access environment variables from <strong>process.env</strong>. To access the name of our bucket you would use, <strong>process.env.S3_PERSISTENCE_BUCKET</strong>. Below we are using the S3 persistence adapter and passing it the bucket name we want to connect to.</p> <pre> <code>const s3PersistenceAdapter = new persistenceAdapter.S3PersistenceAdapter({ bucketName: process.env.S3_PERSISTENCE_BUCKET });</code></pre> <p>Lastly, we register our adapter using <strong>withPersistenceAdapter</strong>:</p> <pre> <code>.withPersistenceAdapter( s3PersistenceAdapter )</code></pre> <p>Let’s zoom out and take a look at our <strong>SkillBuilder</strong>:</p> <p><strong>index.js</strong></p> <pre> <code>// top of the file const persistenceAdapter = require('ask-sdk-s3-persistence-adapter'); // ... // continued at the bottom of the file const s3PersistenceAdapter = new persistenceAdapter.S3PersistenceAdapter({ bucketName:process.env.S3_PERSISTENCE_BUCKET }); exports.handler = Alexa.SkillBuilders.custom() .withPersistenceAdapter(s3PersistenceAdapter) .addRequestHandlers( HasBirthdayLaunchRequestHandler, LaunchRequestHandler, CaptureBirthdayIntentHandler, HelpIntentHandler, CancelAndStopIntentHandler, SessionEndedRequestHandler, IntentReflectorHandler ) // make sure IntentReflectorHandler is last so it doesn't override your custom intent handlers .addErrorHandlers(ErrorHandler) .lambda();</code></pre> <p>Now that we understand how to set up the S3 persistence adapter with Alexa-hosted skills, let’s take a look at how we’d set up the DynamoDB adapter.</p> <h4>Amazon DynamoDB</h4> <p>The configuration process for DynamoDB is similar and takes 4 steps.</p> <p>1. Update the <strong>package.json</strong> with a new module dependency</p> <pre> <code> &quot;ask-sdk-s3-persistence-adapter&quot;: &quot;^2.0.0&quot;</code></pre> <p>2. Import the module into your <strong>index.js</strong> file</p> <pre> <code>const ddbAdapter = require('ask-sdk-dynamodb-persistence-adapter');</code></pre> <p>3. Create a DynamoDB persistence adapter</p> <pre> <code> const ddbTableName = 'cake-walk'; const ddbPersistenceAdapter = new dbdAdapter.DynamoDbPersistenceAdapter({ tableName: tableName, createTable: true, });</code></pre> <p>4. Register it with your <strong>SkillBuilder</strong></p> <pre> <code>.withPersistenceAdapter(ddbPersistenceAdapter)</code></pre> <p>Let’s zoom in to see what the <strong>package.json</strong> and <strong>index.js</strong> file will look like:</p> <p><strong>package.json</strong></p> <pre> <code>{ &quot;name&quot;: &quot;cake-walk&quot;, &quot;version&quot;: &quot;0.9.0&quot;, &quot;description&quot;: &quot;alexa utility for quickly building skills&quot;, &quot;main&quot;: &quot;index.js&quot;, &quot;scripts&quot;: { &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot; }, &quot;author&quot;: &quot;Amazon Alexa&quot;, &quot;license&quot;: &quot;ISC&quot;, &quot;dependencies&quot;: { &quot;ask-sdk-core&quot;: &quot;^2.0.7&quot;, &quot;ask-sdk-model&quot;: &quot;^1.4.1&quot;, &quot;aws-sdk&quot;: &quot;^2.326.0&quot;, &quot;ask-sdk-dynamodb-persistence-adapter&quot;: &quot;^2.0.0&quot; } }</code></pre> <p><strong>index.js</strong></p> <pre> <code>// top of the file const ddbAdapter = require('ask-sdk-dynamodb-persistence-adapter'); const ddbTableName = 'cake-walk'; // ... // continued at the bottom of the file const ddbPersistenceAdapter = new ddbAdapter.DynamoDbPersistenceAdapter({ tableName: tableName, createTable: true, }); exports.handler = Alexa.SkillBuilders.custom() .withPersistenceAdapter(ddbPersistenceAdapter) .addRequestHandlers( HasBirthdayLaunchRequestHandler, LaunchRequestHandler, CaptureBirthdayIntentHandler, HelpIntentHandler, CancelAndStopIntentHandler, SessionEndedRequestHandler, IntentReflectorHandler ) // make sure IntentReflectorHandler is last so it doesn't override your custom intent handlers .addErrorHandlers(ErrorHandler) .lambda(); </code></pre> <p>Now that we understand how to configure the S3 and DynamoDB persistence adapters, we can move onto using Persistent Attributes to read and write the birthday.</p> <h2>Using Persistent Attributes to Store Data</h2> <p>Let’s start with writing data. We’ll use the <strong>AttributesManager</strong> to interact with our persistent attributes.</p> <pre> <code>const attributesManager = handlerInput.attributesManager;</code></pre> <p>We’ll then use the <strong>setPersistentAttributes</strong> to set the attributes that we want to save. In this case, we’ll be saving the <strong>month</strong>, <strong>day</strong>, and <strong>year</strong> slot values.</p> <p>Let’s create the object to store our attributes. We’ll call it <strong>birthdayAttributes</strong>. We’ll map our slot values that we collected into a dictionary:</p> <pre> <code>const birthdayAttributes = { &quot;year&quot;: year, &quot;month&quot;: month, &quot;day&quot;: day };</code></pre> <p>If the customer said their birthday was “November seventh nineteen eighty three,” then the data would look like:</p> <pre> <code>{ &quot;year&quot;: &quot;1983&quot;, &quot;month&quot;: &quot;11&quot;, &quot;day&quot;: &quot;7&quot; }</code></pre> <p>To save the data to our storage service we pass <strong>birthdayAttributes</strong> to <strong>setPersistentAttributes</strong> and then call <strong>savePersistentAttributes</strong>.</p> <pre> <code>attributesManager.setPersistentAttributes(birthdayAttributes); attributesManager.savePersistentAttributes(); </code></pre> <p>Now that we understand how to save the birthday, let’s take a look at how we recall their birthday.</p> <h3>Using Persistent Attributes to Read Data</h3> <p>Reading information is even easier. We’ll use the <strong>AttributesManager</strong>, but this time we only need to call one function: <strong>getPersistentAttributes</strong>. The function is asynchronous, so you’ll want to use the <strong>async/await</strong> keywords.</p> <pre> <code>async handle(handlerInput) { const attributesManager = handlerInput.attributesManager; const persistentAttributes = await attributesManager.getPersistentAttributes() || {}; console.log(&quot;year&quot;, persistentAttributes.year); console.log(&quot;month&quot;, persistentAttributes.month); console.log(&quot;day&quot;,; //... }</code></pre> <p>If it’s the first time the customer has opened the skill, there won’t be a record of it in the storage service. This will cause our code to throw an error if we try to access an attribute of a null value so we set persistentAttributes to an “OR” expression:</p> <pre> <code>const persistentAttributes = await attributesManager.getPersistentAttributes() || {}; </code></pre> <p>This means that <strong>persistentAttributes</strong> will never be null. It will either be a birthday record or and empty object. The empty object will indicate that the birthday is unknown and our skill won’t crash if we call <strong>persistentAttributes.year</strong>. Instead it will return undefined.</p> <p>Now that we’re able to read and write the birthday to our storage service, our customers will be thankful that we don’t have to ask for it every time they start the skill.</p> <p>To this point, we’ve been very focused on the design of our voice user interface, but now we need take a moment and think about our back end. Our skill’s behavior changes based upon the situation. The SDK uses handlers to service the requests that come to our skill. When someone launches the skill we get a <strong>LaunchRequest</strong>. If the birthday is <strong>unknown,</strong> we need to ask for it. If the birthday is <strong>known</strong> we have to calculate the number of days until their next birthday. This means we’re going to need two handlers that can handle a launch request: one for unknown, one for known.</p> <p>We already have a <strong>LaunchRequest</strong> handler, so we’ll need to create one more that handles the case when the birthday is known. We’ll call it <strong>HasBirthdayLaunchRequestHandler</strong>. Our handler’s <strong>canHandle</strong> function needs to read the birthday from our storage service and return true if it exists. The <strong>handle</strong> function needs to read from our storage service and return true if it exists. Both functions need access to the same data. While we can have both functions read the data, there’s a slight delay in doing so which will affect performance. It can also potentially cost us a lot of money to read information over and over.</p> <p>What we need is a way to load the data once per session and make that data available to all of the handlers in our skill. We can use the <strong>AttributesManager</strong> to accomplish that. So how do we load the data only once? We could try to lazy load it. That would require us to:</p> <ol> <li>Check to see if we’ve already loaded and use it if it has been loaded</li> <li>Go fetch it if it’s not loaded</li> </ol> <p>This would be great, but then we have duplicate a bunch of code whenever we want to access the birthday. If only there was something that ran before our handlers that could handle fetching the birthday only once per session. Turns out there is! We can use a request interceptor.</p> <h3>How to Read Once per Session</h3> <p>There are two types of <strong>interceptors</strong>.</p> <ol> <li><strong>Request</strong> - Intercept the request for processing prior to handler execution</li> <li><strong>Response</strong> - Intercept the response after handler execution before sending it to the Alexa service</li> </ol> <p>Like handlers you can define more than one. Let’s take a look at how we would define an interceptor to read our birthday from our storage service once per session.</p> <p>First we need to create an interceptor and then register it. There are two registration functions: One to register <strong>request</strong> interceptors and another to register <strong>response</strong> interceptors. Interceptors must define a function called <strong>process</strong>. The code in this function will be executed.</p> <pre> <code>const someInterceptor = { process(handlerInput) { // code ... } }</code></pre> <p>To register our <strong>request</strong> interceptor, we need to pass it to <strong>addRequestInterceptors</strong>. Since our interceptor loads our customer’s birthday we named it, <strong>LoadBirthdayInterceptor</strong>.</p> <p>If we have a birthday record in the session store, we’ll get it and use the <strong>AttributesManager</strong> to store them into the session attributes.</p> <pre> <code>const sessionAttributes = await attributesManager.getPersistentAttributes() || {};</code></pre> <p>We want to make sure that we have properly received the <strong>month</strong>, <strong>day</strong>, and <strong>year</strong> values from our session store. We use the ternary operator, ‘?’ to define an in-line if-else statement. For each attribute, we check to see if we have a non-null value if not we default to 0.</p> <pre> <code>const year = sessionAttributes.hasOwnProperty('year') ? sessionAttributes.year : 0; const month = sessionAttributes.hasOwnProperty('month') ? sessionAttributes.month : 0; const day = sessionAttributes.hasOwnProperty('day') ? : 0; We only want to set the sessionAttributes if we have all non-zero values for month, day, and year. if (year &amp;&amp; month &amp;&amp; day) { attributesManager.setSessionAttributes(sessionAttributes); }</code></pre> <p>Zooming out our handler looks like:</p> <pre> <code>const LoadBirthdayInterceptor = { async process(handlerInput) { const attributesManager = handlerInput.attributesManager; const sessionAttributes = await attributesManager.getPersistentAttributes() || {}; const year = sessionAttributes.hasOwnProperty('year') ? sessionAttributes.year : 0; const month = sessionAttributes.hasOwnProperty('month') ? sessionAttributes.month : 0; const day = sessionAttributes.hasOwnProperty('day') ? : 0; if (year &amp;&amp; month &amp;&amp; day) { attributesManager.setSessionAttributes(sessionAttributes); } } } </code></pre> <p>To register the handler we would use <strong>addRequestInterceptors</strong>. Let’s take a look at our <strong>SkillBuilders</strong>:</p> <pre> <code>exports.handler = Alexa.SkillBuilders.custom() .withPersistenceAdapter(ddbPersistenceAdapter) .addRequestHandlers( HasBirthdayLaunchRequestHandler, LaunchRequestHandler, CaptureBirthdayIntentHandler, HelpIntentHandler, CancelAndStopIntentHandler, SessionEndedRequestHandler, IntentReflectorHandler ) // make sure IntentReflectorHandler is last so it doesn't override your custom intent handlers .addRequestInterceptors( LoadBirthdayInterceptor ) .addErrorHandlers(ErrorHandler) .lambda(); </code></pre> <h2>Conclusion</h2> <p>At this point, the Cake Walk skill can remember and recall our customer’s birthday. This goes a long way to making the experience feel more natural and personal. We’ve also fulfilled a major portion of our design. The last step is to check if it’s their birthday. If so, we need to wish them a happy birthday. If not, we need to count down the days.</p> <p>When you design your own skills and you determine that there’s some data that your skill needs to be able to recall, use persistent attributes to save it. Your skill will no longer need to repeatedly ask your customer for the same information over and over. Let’s keep the conversation going. If you have any questions or comments about memory and cake walk reach out to me on Twitter @SleepyDeveloper.</p> <p>Stay tuned for the next post in this series to learn how to use the Alexa Settings API to look up the customer’s time zone. We’ll need it to accurately compute the number of days until their next birthday.</p> <h2>Related Content</h2> <ul> <li><a href="">New Alexa Skills Training Course: Build an Engaging Alexa Skill with Cake Walk</a></li> <li><a href="">Getting Started with the Cake Walk Course: Designing the Voice User Interface (VUI) for Your Alexa Skill</a></li> <li><a href="">Getting Started with the Cake Walk Course: Using Auto-Delegation to Collect Slots Turn by Turn</a></li> <li><a href="">Cake Walk: Build an Engaging Alexa Skill</a></li> <li><a href="" target="_blank">Cake Walk: Source Code</a></li> </ul> /blogs/alexa/post/4ca2108a-4938-45a4-abc0-7565199670fc/amazon-expands-dash-replenishment-service-with-new-devices-in-france-italy-and-spain1 Amazon Expands Dash Replenishment Service with New Devices in France, Italy, and Spain Apollo Chu 2019-06-17T04:00:00+00:00 2019-06-17T06:46:25+00:00 <p>Amazon has expanded&nbsp;the Dash Replenishment Service in France, Italy, and Spain with new connected devices from Philips, Epson, Bosch, Siemens, Neff, Gaggenau, Haier, Candy, Hoover, and Coway.</p> <p>Today, Amazon expands the Dash Replenishment Service in France, Italy, and Spain with new connected devices from Philips, Epson, Bosch, Siemens, Neff, Gaggenau, Haier, Candy, Hoover, and Coway.</p> <p>Dash Replenishment Service helps ensure customers never run out of consumable goods by enabling hardware devices with the technology to order physical goods from Amazon when supplies are running low. Amazon provides an API for device makers to integrate Dash Replenishment into their hardware products. With Dash Replenishment, device makers are able to leverage Amazon's authentication and payment systems, customer service, and fulfillment network—giving their customers access to Amazon's low prices, great selection, and reliable delivery. Globally, Amazon is working with top appliance manufacturers like GE Appliances, LG, Whirlpool, Samsung, HP, Brother, and more, to integrate the Dash Replenishment technology into connected devices.</p> <p>Using Dash Replenishment Service, device makers can increase customer satisfaction and engagement by providing replacement products designed and manufactured specifically for devices enabled with Dash Replenishment. Integrating Dash Replenishment Service into connected devices is simple, requiring minimal changes to product design and no complex technical skills. For example, the sensor in a Dash Replenishment enabled printer can automatically determine the ink usage level and re-order a new ink cartridge the moment it’s running low.</p> <p>Additional details can be found on the Amazon developer website <a href="" target="_blank">here</a>.</p> /blogs/alexa/post/173b7c30-dcd4-483b-a4b1-8c7d798546a7/what-s-new-in-the-alexa-skills-kit-may-2019-release-roundup What's New in the Alexa Skills Kit: May 2019 Release Roundup Leo Ohannesian 2019-06-15T03:05:59+00:00 2019-06-15T03:05:59+00:00 <p><img alt="Intent-history_blog.png" src="" /></p> <p>What's new in the Alexa Skills Kit for May 2019? Read our release roundup blog to find out.</p> <p><em><strong>Editor's Note: </strong>Our monthly release roundup series showcases the latest in Alexa Skills Kit developer tools and features that can make your skills easier to manage, simpler to deploy, and more engaging for your customers. Build with these new capabilities to enable your Alexa skills to drive brand or revenue objectives.</em></p> <p>In this roundup post we share details about the new things released for skill developers last month, including the release of the Spanish voice model for the US&nbsp;and several other features&nbsp;that can help make you be more productive or build more engaging skills. Check out the entire livestream for more information from Alexa evangelists and code samples.</p> <p><iframe allowfullscreen="" frameborder="0" height="315" src="" width="560"></iframe></p> <h2>1. Alexa Skills Kit expands to include Spanish in the US</h2> <p>Now you can create Spanish-speaking skills for US customers with the new Spanish-for-US voice model. Skills that you publish now using the new voice model will be available to customers when Alexa launches with Spanish language support in the US later this year. <a href=";sc_category=Owned&amp;sc_channel=BG&amp;sc_campaign=roundup&amp;sc_content_category=Int&amp;sc_country=WW" target="_blank">Check out the announcement here</a> or <a href=";sc_category=Owned&amp;sc_channel=BG&amp;sc_campaign=roundup&amp;sc_content_category=Int&amp;sc_country=WW" target="_blank">read about how to update your Alexa skill for US Spanish here.</a></p> <ul> </ul> <h2>2. Enhance the smart home camera experience with person detection</h2> <p>You can use the new Alexa.EventDetectionSensor interface in the Smart Home Skill API to tell Alexa when your smart home camera detects the presence of a person. Once you’ve implemented the capability, customers can use person detection as a trigger for other actions, such as turning on the house lights. You can also enable customers to view the last person detected by saying, “Alexa, show the most recent person detected at the front door.” The new capability is available in the US today. <a href=";sc_category=Owned&amp;sc_channel=BG&amp;sc_campaign=roundup&amp;sc_content_category=SH&amp;sc_country=WW" target="_blank">Read about it in our docs</a>.&nbsp;</p> <h2>3. Quickly test your voice UI with SMAPI quick builds</h2> <p>Save time and start testing early: We are excited to announce the launch of quick builds, which enable you to start testing your skill with sample utterances on average 67% quicker than before. This is done by introducing a new intermediate build state called Quick Build through SMAPI or the ASK CLI. Read about <a href=";sc_category=Owned&amp;sc_channel=BG&amp;sc_campaign=roundup&amp;sc_content_category=Productivity&amp;sc_country=WW#build-and-save" target="_blank">building your model</a> and <a href=";sc_category=Owned&amp;sc_channel=BG&amp;sc_campaign=roundup&amp;sc_content_category=Productivity&amp;sc_country=WW#get-skill-status" target="_blank">getting your skill status</a> in our docs.&nbsp;</p> <h2>4. Simulate a multi-turn conversation with the ASK CLI</h2> <p>Now available: Test multi-turn conversations using the the CLI, SMAPI,&nbsp;or the ASK plugin for Visual Studio Code.&nbsp;Use this new testing capability to improve your skill conversations and deliver a better customer experience. <a href=";sc_category=Owned&amp;sc_channel=BG&amp;sc_campaign=roundup&amp;sc_content_category=Productivity&amp;sc_country=WW#dialog-command" target="_blank">Learn about simulating a multi-turn conversation in our docs.&nbsp;</a></p> <p>&nbsp;</p> <p>As always, we can't wait to see what you build. As a reminder, learn how to get the most out of the tech docs by visiting the <a href="" target="_blank">Latest Tips page.</a></p> /blogs/alexa/post/b7bf617e-31e4-439c-a93e-6f0d09fe7a23/build-premium-experiences-for-kid-skills-in-the-us-preview Build Premium Experiences for Kid Skills in the US (Preview) Metty Fisseha 2019-06-14T17:56:41+00:00 2019-06-20T19:05:58+00:00 <p><img alt="" src="" style="height:480px; width:1908px" /></p> <p>As part of this preview, developers can build premium kid skills for the US Alexa Skills Store using in-skill purchasing (ISP).</p> <p><img alt="blog_kids-isp_954x240.png" src="" /></p> <p>Alexa developers have already created thousands of kid skills that provide fun and educational experiences for families, such as a skill that <a href=";qid=1560532142&amp;s=gateway&amp;sr=8-1">encourages kids to brush their teeth</a> and one that <a href="">teaches kids how to run their own lemonade stand</a> business. Today, we are excited to announce a preview of new tools that developers can use to build kid skills with in-skill purchasing (ISP) for the US Alexa Skills Store. With ISP, you can further enrich these kid skill experiences, offering premium content in the form of one-time purchases or subscriptions for families to enjoy across over 100 million Alexa-enabled devices.</p> <p>ISP for kid skills is supported by new tools powered by Alexa, including APIs to help you create premium kid skills, as well as purchase controls that help account holders manage them. If you are interested in building a kid skill with ISP, fill out <a href="">this form</a> telling us about your use case and we will notify you if your application has been selected.</p> <h2><a></a><a>How It Works: Purchasing Controls for Premium Kid Skills</a></h2> <p>By default, when a customer is offered premium content in a kid skill and agrees to purchase, the account holder will receive an SMS or email requesting they approve or decline the transaction within 24 hours. If approved, the purchase will be completed, and the customer will have access to the premium content. If declined, the purchase will not be completed, and the customer will have access only to the skill’s free content. If the purchase request is neither approved nor declined within 24 hours, the request is canceled.&nbsp; Account holders who want to allow purchases to be made in kid skills but do not wish to receive these approval requests can disable them in the Alexa app, allowing purchases to be made in kid skills without the request for approval.</p> <p>Customers can opt out from voice purchasing in kid skills, which will disable voice discovery of premium content in kid skills, by disabling the feature in the Alexa app. To manage these settings, open the Alexa App and navigate to Settings -&gt; Alexa Account -&gt; Voice Purchasing -&gt; Kid Skills Purchasing.</p> <h2><a></a><a>Amazon FreeTime and Amazon FreeTime Unlimited Offer a Curated Skill Experience</a></h2> <p>FreeTime on Alexa customers will not receive offers to purchase premium content within skills. And for FreeTime Unlimited subscribers, many of these premium experiences will already be available automatically as part of their subscription at no additional cost. See <a href=";node=17738015011">here</a> for a full list of premium kid skills included in the FreeTime Unlimited experience.</p> <p>If you have a kid skill that offers a best-in-class customer experience, and think it could be eligible to be included in FreeTime Unlimited, send an email to <a href=""></a> for consideration.</p> <h2><a></a><a>New Tools for Building a Premium Kids Skill</a></h2> <p>As part of this preview, you can build a premium kid skill using the tools that currently exist: the <a href="">Alexa Skills Kit Command-Line Interface (ASK CLI)</a> to write your own code, or the <a href="">Alexa Developer Console</a> to click through step-by-step instructions. However, we have built three new tools for kid skills specifically, to help you implement a thoughtful premium experience that is tailored to the controls set by the account holder:</p> <ul> <li>An extension to the current getInSkillProducts API to see if a product is PURCHASABLE, whether the account holder approved the purchase, or NOT_PURCHASABLE, pending authorization OR rejected three times in the past 30 days, which will suppress offers for that product over the next 30 days.</li> <li>A new inSkillProductsTransactions endpoint for transaction-level information, including when the request went into PENDING status and if a previous purchase request was denied. This endpoint is available only for kid skills.</li> <li>A new endpoint to get the purchase control setting for an account, to determine if the account holder has ENABLED or DISABLED voice purchasing for kids skills.</li> </ul> <p><em>Note that you must use the upsell API for when adding ISP to kid skills. Consumable products and Amazon Pay for Alexa Skills are not available for kid skills at this time. </em></p> <h2><a></a><a>Premium Kid Skill Experiences Available Today</a></h2> <p>Developers have already implemented ISP in their kid skills across a variety of fun and educational experiences, including:</p> <p><a href=""><strong>Kids Court (Pretzel Labs)</strong></a>:<strong> </strong>This skill teaches kids about the judicial system by allowing them to take their naughty friends, siblings or parents to Kids Court for a ruling from the Honorable Judge Lexy. Customers will learn how to articulate themselves clearly while presenting their case to Judge Lexy. Customers can play the judge in other kids’ trials once a day for free, or purchase the Supreme Court premium pack, which allows them to take as many cases as they want to judge.</p> <p><strong><a href="">You Choose Superman Adventures (Capstone)</a></strong>: This skill entertains kids with an action-packed, interactive adventure with America’s favorite super hero, Superman. Customers will help Superman protect the citizens of Earth and Metropolis, and defeat the evil plans of the most cunning and powerful super-villains. Customers get the first story, Metropolis Mayhem, for free and then can purchase additional stories including Apokolips Invasion, Metallo Attacks!, and Superman Day Disaster.</p> <p><strong><a href="">Travel Quest (Universatile)</a></strong>: This skill delights kids by taking them on a tour around the world, stopping at various countries and teaching them about the culture, history and landmarks. Each country includes ten destinations, 20 questions and 20 fun facts sure to provide hours of entertainment and education. Customers can access 6 countries for free, or can purchase additional themed country packs, such as the “Mediterranean Cruise Pack”, which provide more countries to travel to and learn about.</p> <p><a href=""><strong>Animal Sounds (LC Publishing)</strong></a>: This skill takes kids on a journey across the seven continents and into the vast oceans to learn about animals of different shapes and sizes. All customers will hear the animal sounds, while customers with a screen-enabled device are able to see the animals they’re learning about. Customers can access the continental pack for free, which contains some animal sounds to choose from, or can purchase the mega pack, which grants access to all of the continents plus an Oceanic pack of additional unique sounds. The mega pack also enables customers to use their Echo Buttons to request a new animal sound.</p> <p><strong><a href="">Master Swords (Touchpress)</a></strong>: This skill teaches kids how to spell through a fun, captivating game. The mission is to retrieve their Uncle’s stolen swords from grubby gremlins, hideous orcs, wicked tongued witches and a number of other fantastical creatures by using words as their weapon. As kids spell words correctly, they advance to higher levels and get closer to retrieving the swords. Customers can access the first kingdom and one sword for free, or can purchase the premium experience which allows them to access four kingdoms with the opportunity to collect up to seven swords across 1,000+ words to spell.</p> <p>We encourage you to engage with these premium kid skills to get a sense of how different developers are building delightful premium experiences for the family. In addition to the above skills, which are live today, we will soon be launching premium kid skills from names that families know and love such as Ghostbusters (Sony) and more. Stay tuned to the <a href=";node=13727921011">Alexa Skill Store</a> for updates on these skill launches.</p> <h2><a></a><a>Learn More and Apply for the ISP for Kid Skills Preview</a></h2> <p>Check out the resources below to learn more about how to build premium kids skills. You can also apply to participate in the ISP for kid skills preview, by filling out a short form <a href="">here</a>. We will notify you if your application is selected.</p> <ul> <li><a href=";">Webinar: How to Build Engaging Kid Skills for Alexa</a></li> <li><a href="">Guide: 6 Tips for Building Stellar Kid Skills</a></li> <li><a href="">Blog: 10 More Tips for Building Stellar Alexa Skills for Kids</a></li> <li><a href="">Blog: Certification Tips for Alexa Kid Skills</a></li> <li><a href="">Guide: Make Money with Your Alexa Skills</a></li> <li><a href="">Blog: Add In-Skill Purchasing (ISP) Directly from the Alexa Developer Console</a></li> </ul>