Super Quick Blog: Alexa Sound Library

Posted by Steven Pears on March 02, 2018 · 1 min read

Amazon have just announced the Alexa Sound Library

To use these sounds Amazon tell you to add an SSML Audio tag. I submitted SSML support as a PR to Alexa.NET a while back, so to use these new sounds just use the following code after adding a package reference to Alexa.NET on NuGet

public SkillResponse FunctionHandler(SkillRequest input, ILambdaContext context)
{
  var ssml = new Speech();
  ssml.Elements.Add(new Audio("https://s3.amazonaws.com/asks/soundlibrary/cartoon/amzn_sfx_boing_long_1x_01.mp3"));
  var response = ResponseBuilder.Tell(ssml);
  return response;
}