<commit_before># AlexaSkillsKit.NET
.NET library to write Alexa skills that's interface-compatible with [Amazon's AlexaSkillsKit for Java](https://github.com/amzn/alexa-skills-kit-java) and matches that functionality:
* handles the (de)serialization of Alexa requests & responses into easy-to-use object models
* verifies authenticity of the request by validating its signature and timestamp
* code-reviewed and vetted by Amazon (Alexa skills written using this library passed certification)
* :new: supports following interfaces:
  * [AudioPlayer](https://developer.amazon.com/docs/custom-skills/audioplayer-interface-reference.html)
  * [PlaybackController](https://developer.amazon.com/docs/custom-skills/playback-controller-interface-reference.html)
  * [Display](https://developer.amazon.com/docs/custom-skills/display-interface-reference.html)
  * [Dialog](https://developer.amazon.com/docs/custom-skills/dialog-interface-reference.html)
  * [VideoApp](https://developer.amazon.com/docs/custom-skills/videoapp-interface-reference.html)
  

Beyond the functionality in Amazon's AlexaSkillsKit for Java, AlexaSkillsKit.NET:
* performs automatic session management so you can easily [build conversational Alexa apps](https://freebusy.io/blog/building-conversational-alexa-apps-for-amazon-echo)
* supports asynchronous programming model
* :new: can be extended to support custom and new coming interfaces and request types
(see [Implement external interface](#implement-external-interface) section), such as:
  * [Skill Events](https://developer.amazon.com/docs/smapi/skill-events-in-alexa-skills.html)

This library was originally developed for and is in use at https://freebusy.io

This library is available as a NuGet package at https://www.nuget.org/packages/AlexaSkillsKit.NET/

# How To Use

### 1. Set up your development environment

Read [Getting started with Alexa App development for Amazon Echo using .NET on Windows](https://freebusy.io/blog/getting-started-with-alexa-app-development-for-amazon-echo-using-dot-net)

Note, that if you are hosting your API in Amazon Lambda, Azure Function, Azure Web App or other well-known cloud service, you can use parent domain certificate instead of providing your own.

### 2. Implement your skill as a "Speechlet"

If your Alexa skill does any kind of asynchronous I/O, it's recommended that you derive your app from the `SpeechletBase` class and implement these methods as defined by `ISpeechletAsyncV2`:
  
```csharp
public interface ISpeechletAsyncV2
{
    Task<SpeechletResponse> OnIntentAsync(IntentRequest intentRequest, Session session, Context context);
    Task<SpeechletResponse> OnLaunchAsync(LaunchRequest launchRequest, Session session);
    Task OnSessionStartedAsync(SessionStartedRequest sessionStartedRequest, Session session);
    Task OnSessionEndedAsync(SessionEndedRequest sessionEndedRequest, Session session);
}
```
  
Alternatively, you can implement synchronous `ISpeechletV2` interface:
  
```csharp
public interface ISpeechletV2
{
    SpeechletResponse OnIntent(IntentRequest intentRequest, Session session, Context context);
    SpeechletResponse OnLaunch(LaunchRequest launchRequest, Session session);
    void OnSessionStarted(SessionStartedRequest sessionStartedRequest, Session session);<commit_msg>Fix interface names in readme<commit_after># AlexaSkillsKit.NET
.NET library to write Alexa skills that's interface-compatible with [Amazon's AlexaSkillsKit for Java](https://github.com/amzn/alexa-skills-kit-java) and matches that functionality:
* handles the (de)serialization of Alexa requests & responses into easy-to-use object models
* verifies authenticity of the request by validating its signature and timestamp
* code-reviewed and vetted by Amazon (Alexa skills written using this library passed certification)
* :new: supports following interfaces:
  * [AudioPlayer](https://developer.amazon.com/docs/custom-skills/audioplayer-interface-reference.html)
  * [PlaybackController](https://developer.amazon.com/docs/custom-skills/playback-controller-interface-reference.html)
  * [Display](https://developer.amazon.com/docs/custom-skills/display-interface-reference.html)
  * [Dialog](https://developer.amazon.com/docs/custom-skills/dialog-interface-reference.html)
  * [VideoApp](https://developer.amazon.com/docs/custom-skills/videoapp-interface-reference.html)
  

Beyond the functionality in Amazon's AlexaSkillsKit for Java, AlexaSkillsKit.NET:
* performs automatic session management so you can easily [build conversational Alexa apps](https://freebusy.io/blog/building-conversational-alexa-apps-for-amazon-echo)
* supports asynchronous programming model
* :new: can be extended to support custom and new coming interfaces and request types
(see [Implement external interface](#implement-external-interface) section), such as:
  * [Skill Events](https://developer.amazon.com/docs/smapi/skill-events-in-alexa-skills.html)

This library was originally developed for and is in use at https://freebusy.io

This library is available as a NuGet package at https://www.nuget.org/packages/AlexaSkillsKit.NET/

# How To Use

### 1. Set up your development environment

Read [Getting started with Alexa App development for Amazon Echo using .NET on Windows](https://freebusy.io/blog/getting-started-with-alexa-app-development-for-amazon-echo-using-dot-net)

Note, that if you are hosting your API in Amazon Lambda, Azure Function, Azure Web App or other well-known cloud service, you can use parent domain certificate instead of providing your own.

### 2. Implement your skill as a "Speechlet"

If your Alexa skill does any kind of asynchronous I/O, it's recommended that you derive your app from the `SpeechletBase` class and implement these methods as defined by `ISpeechletWithContextAsync`:
  
```csharp
public interface ISpeechletWithContextAsync
{
    Task<SpeechletResponse> OnIntentAsync(IntentRequest intentRequest, Session session, Context context);
    Task<SpeechletResponse> OnLaunchAsync(LaunchRequest launchRequest, Session session);
    Task OnSessionStartedAsync(SessionStartedRequest sessionStartedRequest, Session session);
    Task OnSessionEndedAsync(SessionEndedRequest sessionEndedRequest, Session session);
}
```
  
Alternatively, you can implement synchronous `ISpeechletWithContext` interface:
  
```csharp
public interface ISpeechletWithContext
{
    SpeechletResponse OnIntent(IntentRequest intentRequest, Session session, Context context);
    SpeechletResponse OnLaunch(LaunchRequest launchRequest, Session session);
    void OnSessionStarted(SessionStartedRequest sessionStartedRequest, Session session);
{'fraction_non_alphanumeric': 0.08695652173913043, 'fraction_numerical': 0.0012077294685990338, 'mean_word_length': 5.753312945973496, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 22, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '274777', 'n_tokens_mistral': 1830, 'n_tokens_neox': 1731, 'n_words': 559}