How to speak skype user with the bot using skype calling feature? - bots

I am working on bot technology, in my current bot project I used the skype calling feature in that I want the functionality like once bot accepted the call after that whatever I spoken with bot I want that speech in my code in the form of text.
Before posted question here I did research on google and find the below link but this link contains dial pad options but I want the functionality like instead of dial pad, I am able to speak with bot and get the that speech into my code in the form of text.
https://docs.botframework.com/en-us/csharp/builder/sdkreference/calling.html
Can you please tell me how to do that?
-Pradeep

Related

Azure Bot Creation with Natural Language understanding(LUIS)

I am facing issues while building a Voice bot using nodejs in Microsoft Azure, Currently i have made some research and built a sample chatbot which works fine using nodejs.
I have tried MS portals for voice bot integration and unable to take it forward, need guidance and suggestions.
My idea is getting a number from Twilio, then put my azure bot's end point URL in the twilio number.
Once my twilio gets an incoming call it will route the request to the Azure bot which will respond with a greeting and ask for few inputs, then the recorded voice should be passed to the LUIS app for Natural Language understanding and give the required text which will be further handled by the Azure bot.
I am not sure whether this is good solution, please suggest
I am not able to see any sample code for nodejs. Steps for integration and a basic sample code is what i need as a basic to start with, Your inputs/suggestions on this is highly appreciated.
Using the Bot Framework SDK for Node.js, you can specify text to be spoken by your bot on a speech-enabled channel in either of the following ways:
Set the IMessage.speak property and send the message using the session.send() method
Send the message using the session.say() method (passing parameters that specify display text, speech text, and options)
Send the message using a built-in prompt (specifying options speak and retrySpeak).
Feel free to review the following documentation provided and sample code for more details.
Update
Also check out Connect a bot to Twilio.

Bot was not started on DialogFlow for Telegram Integration

When I put the Telegram Token in DialogFlow, I get the error Bot was not started. I have started the bot in Telegram app. How do I solve this?
let’s say we will make the bot to give answers about programming language
steps:
create new agent
create entities
create the words contained in the entities
create intents
enter training phases (DialogFlow will recognise parts of the phases containing entities you just created. it will give different colors for different entities)
set default responses
add google assistant (if needed)
add response for Google Assistant. activate Google Assistant Response. choose basic card. add the image link (we can do this later). put the search text
https://google.com/search?q=how+to+le...
add more responses (telegram, slack, web demo, twitter, facebook messenger, etc.). you will get a token for activating the integration (in this example) i use Telegram
add response to Telegram. add card. fill in the card. don’t forget to add the search terms (you can add image url later)
at action and parameters section, set prompts for responses if needed
go to integrations. choose telegram (or whatever you chose before)
follow the instructions on how to create a bot in a telegram here: https://cloud.google.com/dialogflow/d...
copy the generated token
press start
there you go! now you have your own bot :)

Bot Framework Skype channel regular expressions not working

I built a bot using Bot Framework (node.js) with four connected channels (Messenger, Telegram, Skype and Web). At any moment the bot validates an inputted email address using a regular expression like this below:
/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*#([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i
It is working properly on all channels, except the Skype. E.g: gcfabri#gmail.com match with this regex but on Skype channel it doesn't happens.
According to GitHub user nwhitmont (Stack Overflow #nilsw) on issue [Skype] Regular expression not working to find email address in chat message? #4024:
Skype wraps email addresses in HTML tags, so you would need to adjust your RegEx accordingly.
On Skype channel you need to check for:
name#email.com
I was also facing the same issue and resolved by using the following regular expression.
#"\b(?!mailto:)([\w-]+(.[\w-]+)#([a-z0-9-]+(.[a-z0-9-]+)?.[a-z]{2,6}|(\d{1,3}.){3}\d{1,3})(:\d{4})?)"
Skype is converting the user input email address to a HTML text e.g (<a href='mailto:someone#example.com'>someemail#mail.com</a>). We need to find out the email from this.
For more detail, please refer.
Regex for detecting emails in text

How to end bot conversation and let real person handle responses in Dialog Flow?

I am developing a bot for business using Dialogflow. I want to keep an option "Talk to real person". When my customer wants to talk to real person, bot should stop and someone from my support staff will take care of that user.
How is it possible?
How can I pause/stop my bot and let real person handle conversation?
While searching for answer, I send an email to Dialogflow support and got this reply next day.
At this moment, you'll need to handle the task of passing conversations from bot to humans in your custom implementation. You can take a look at the following sample: https://github.com/dialogflow/agent-human-handoff-nodejs.
Hope this may help someone else having similar issue.
By native google, Dialogflow doesn't support bot to human handoff or provide any Web interface to achieve this, but in dialogflow normally the action “input.unknown” used to hand off the conversation to a Human. The “input.unknown” action is built into Dialogflow and used with the default fallback intent. When none of the intents is matched, the default fallback intent is triggered and action associated with it is added in the response also you need to write a logic what bot should do after that.
But to make things easier you can integrate dialogflow with any third-party tool like Kommunicate. As they provide pre-built chat widget user interface and bot to human handoff can be enabled on a click of a button, Please click here for more detailed information
PS: I work for Kommunicate
The issue is related more to the external software that implements Dialogflow than Dialogflow itself.
You can use the PHP code of Support Board as a starting point, or you can use the Support Board software for that directly. It has the feature that asks the user if he/she wants to contact a human agent when the bot does not understand the question. If the user accepts the bot is automatically disabled and an email is sent to the agents.
More details at https://board.support/
PS: I work for Support Board

How does Facebook Messenger connect with Wit.ai Bot Engine?

In Facebook's documentation they refer to wit.ai Bot Engine, but I can't find anywhere online where its explained how to connect the Story that you build in Wit with your Facebook Messenger App?
Wit.ai needs an input - user input. Sentence, phrase, word - to give you back the analysed results.
So first when you say "your Facebook Messenger app" - you need to make sure you are handling the messenger part by itself: have a code in your language of preference running on the server\your laptop which can receive the text which is sent to the messenger account on Facebook.
When you get that working, you will have to use one of Wit.ai libraries for the code language you are using to pass that phrase you receive from the user chatting through the messenger to Wit.ai "library" which will communicate it "to the wit.ai stories" you have and get the result from them.
For example for Python:
Library to handle FB Messenger chatting
Wit.ai library to pass the user input "to stories and get result"
You can integrate Wit to any messaging API. Using the Messenger Send/Receive API for example, you will be able to get and receive messages from/to Messenger users. Wit.ai can then parse the messages and predict the next response.
Here is an example in Node js: https://github.com/wit-ai/node-wit/blob/master/examples/messenger.js
I reviewed the latest updates on wit.ai. It seems that Wit.ai does not have an in-built integration with Facebook Messenger. That is, you can't plug it into Facebook Messenger directly by using the page access tokens etc.
What you'll need to do instead is set up a webhook where Messenger will send callbacks with the details of the user's message. If you want you can enable Facebook's in-built NLP too.
Then inside your webhook, send a call to Wit.ai, and get its output in JSON. Then you must process the JSON and send a reply back to the customer using a Sendmessage API call.
It's a bit long-winded, but if you have this setup, you can potentially use any AI engine in the backend. Including wit.ai or dialogflow.

Resources