Inspiration

As the time passes by we are getting more advanced and what happens in future depends on the outcome of the contributions that people will make in the present. We are living in the world in which we are having voice assistant in our pockets, which helps in simplifying our day to day life. I also like when things can be done easily without any hassle. Being a programmer I wanted to solve some problems faced during programming. And I thought why cant voice assistant help us with programming related query, why cant we ask Alexa how to solve the programming error that I am facing.

What it does

In this Alexa skill my aim is to provide solutions to the programmers over voice. All they have to do is ask Alexa their programming query and Alexa will search for answer to the programming query and provide the user with proper answer. To get started with the skill. What the skill currently does is it takes in the query and Bing search the query and find the links related to stack overflow and then using the info of the link parameters it do an api call to the stack overflow to get info about that posted question of the stack overflow. Then in the lambda function I am making a list of questions related to the query. And then the lambda function first confirms whether the question on the stack overflow is related to his query or not. If not related then it provides the next question and it goes on till the list of questions exhaust. If the question is related to the query that the user asked then it will tell the accepted answer in the answer thread and user will be provided this answer and the code included in the answer as a response card to his Alexa app. Then the user will be provided with an option whether or not he/she wants to here the comments to the answer that was just provided or it wants to repeat the answer. If yes then the Alexa provide the comment and if no the Alexa will ask whether he/she wants to here the next best answer in the answer list. The next best answer is considered on the basis of up votes to the answer.

How I built it

I used the following tools:

  1. Alexa Skill kit : To interface with Alexa and lambda function.
  2. Lambda function : To run the script to search for answer.
  3. Requests : For doing bing search and getting related questions from stack overflow.
  4. Beautiful Soup : For web scrapping to get the required text from the web page.

Challenges I ran into

I ran into couple of challenges like:

  1. Alexa was not able to get the library name properly the names like opencv, mechanize, etc.
  2. Lambda function is taking about 3 secs to respond to persons request. I wanted to reduce it more so that the response is quicker.

Accomplishments that I'm proud of

  1. The complete pipeline works good and has no bugs in it.
  2. It provides response card in which the answer is provided and the code is provided separately so that the person will be able to see it quickly.

What I learned

Even though it looked simple but I came across more and more challenges as I proceeded. I learned how voice assistant works and learned how to deploy lambda function.

What's next for Alexa Stack Overflow

Currently it is based completely on stack overflow but soon we will develop it to search answer in other discussion forums and the blogs in which people post answer to question. So that person will get answer to its question easily. And I am also thinking of adding feature like if the answer was helpful then the answer on stack overflow, or the blog or answer on any other discussion forum will get an upvote.

Share this project:
×

Updates