Skip to content

sang004/AudioEliza

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Audio Eliza

When the original computer psychotherapist ELIZA first appeared in the 60's, some people actually mistook her for human. It was text-based however, which was quite convincing during the age of IRC chatrooms. ELIZA takes your sentence and reflects it into a question through string substitution and pattern matching. Transforming "Tell me what you think about me" into "You want me to tell you what I think about you?" creating a simple illusion of understanding.

This project brings speech (Bing Speech) to Eliza through the high accessibility of Skype. To start talking with the Skype-bot version ELIZA, click on our live link to add the bot to your Skype contacts:
Add the bot

Step 1: Call it and start talking
Step 2: To end the call just say “bye” or click on “End call”

Table of Content

Getting started
Prerequisites
Bot setup
Local installation
Azure installation
Authors
License
Developer guide

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. Always run Visual studio as ADMINISTRATOR

Prerequisites

Things you need to install:

Setup

Bot setup

https://itsamiraclemycodeworks.wordpress.com/2017/01/31/first-blog-post/

Firstly, login into bot framework directory then click create bot
Picture

Then describe it
Picture

For this field, you will need the host address of where it is hosted. Either in a tunneling address from ngrok or Azure app service host.

https://a8e2caa6.ngrok.io/api/messages
https://callingbot01name.azurewebsites.net/api/messages

Picture

And follow through the instructions after clicking the create microsoft app id and password.
Picture

Leave every thing else as default and click on save settings.

With the bot up, you should be able to see some default channels
Picture

Finally, to add call ability to the bot, select edit on the "Skype" channel and onto the "Calling" tab. Enable "Calling" and populate the webhook

https://a8e2caa6.ngrok.io/api/calling/call
https://callingbot01name.azurewebsites.net/api/calling/call

Picture

Initial Solution setup

After cloning the repository, go to the directory:
Picture
Access 'C:\Users\user\Source\Repos\bot.vs\config\applicationhost.config' and edit this file
Picture
At line 168, replicate the line and paste below it. At the replicated line, change "localhost" to astriek to tell the application to listen to every process on the port 3999.
Picture

Web.Config Configurations

There are a few sections of Web.config that requires attention:

  • Bot
    Tells the bot framework connector which bot should be used. With parameters of bot ID (name of your bot) and the Microsoft application credentials attached to it.
    Picture

  • Local
    The bot can be hosted locally on your desktop, it is good for repeated testing and debugging. When running it locally, it requires a tunneling program ngrok to be running, explanation is as below. Picture

  • Azure
    When the code is ready, deploying to Azure will allow the bot to run without the need to keeping your desktop alive. Trial account is available for 1 month with 200USD credit. (at the time of this writing)
    Picture

  • Other services
    Services such as Bing speech is required for transcribing the caller's speech to text and in order for the code to know how to respond. Picture

Deployment

Local

Run code visual studio as administrator, in project folder "..\bot.vs\config\applicationhost.config", make sure to add

<binding protocol="http" bindingInformation="*:3999:*" />

at line below line 168 to ensure that the tunneling would work.

In ngrok, type "ngrok http 3999" to start the tunneling from bot framework connector to your running code, it will show that an address that look like:

http://a8e2caa6.ngrok.io

In bot framework portal, set bot messaging endpoint to

https://a8e2caa6.ngrok.io/api/messages

and skype channel's calling webhook to

https://a8e2caa6.ngrok.io/api/calling/call

When the configurations are done, just click on the play button at the top to start the code! Picture

Azure

Open up the soluution, right click the project and click 'Publish':

image

With this, click on next and change the name of the application if desired. There is an option of Debug/Release, as this is a working copy, choosing 'Release' is fine. So click 'Publish'

Picture

Picture

To change if the published code is going to be in DEBUG / RELEASE MODE, click "edit settings" and change it here: Picture

When deployment to Azure is successful, this will show up:

Picture

Running the tests

Before the bot is published onto the Microsoft bot directory that is visible to the public, you can add the bot by clicking on the Skype icon here:   Picture

And just call it and start talking :)

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details