luis bot not speaking - node.js

I'm using the LUIS bot in NodeJS and I am using session.say() to get the bot the speak but there is not audio output. I am trying to say a list of movies from a list like this session.say('hi', list.shift()) I know it works because 'hi' prints in the chat but no audio, I even put it in SSML format
session.say('hi','<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US">hey</speak>');
Any ideas why my bot isn't saying anything, but still printing stuff in the chat?

To use the text to speech feature on the Bot Framework Emulator, the user has to use the microphone on the emulator first. Basically, the bot will only speak to the user if the user speaks to the bot first. Note, there are several steps you need to follow to enable the microphone feature on the emulator:
If you do not already have a microsoftAppId and microsoftAppPassword for your bot, you will either have to create a new bot or register your bot on the Azure Portal. Be aware that if you choose to register your bot, you will not be able to deploy it later without creating a new bot.
Once you have your microsoftAppId and microsoftAppPassword, you will have to create a .env file to store them. It should look like:
MicrosoftAppId=YOUR_MICROSOFT_APP_ID
MicrosoftAppPassword=YOURR_MICROSOFT_APP_PASSWORD
Also, make sure you have configured thedotenv in your app.js file.
Now, you have to either add your microsoftAppId and microsoftAppPassword to the developer endpoint in your bot file or add it through the emulator. To add it in the emulator, right click on your bot under the ENDPOINT section and select Edit Settings. It should open a prompt where you can fill in the microsoftAppId and microsoftAppPassword.
Once you have completed all of the steps above, run your bot and connect to it in the emulator. You should be able to use the microphone to talk to your bot, and the bot should respond by speaking some text. Hope this helps.

Related

ms teams custom app starting a chat session with a bot

I'm building a teams app that contains some tabs and a bot.
Is it possible to, when an action is performed on a tab (i.e. clicking a button), initialize automatically a chat with the bot, or send a specific message?
Tks
Based on the comments above, what you're looking to do is implement "pro-active" messaging, where the bot itself initiates the conversation. It's definitely possible, and you can read more to get started here and here. The most important thing to know is that your user has to have installed the bot already, to get a "conversation context", but if they've installed the app, which includes the bot, to get the tab, then you're fine. You need to get some variables when they do install the app, which you hook into the conversationUpdate event to get access to. Give it a go and let me know if you have specific questions, here on SOverflow.

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 :)

How can I save and retrieve conversation data from the bot using Microsoft Bot Framework version 4?

I am using Bot Framework SDK 4 Nodejs, and am going to deploy the bot on Skype. I need to save the conversation data/ chat history of the bot for every user.
I tried using the conversationState property accessor but it returns some JSON having data about the general chat/turn context - like the buttons the bot has prompted etc.
I want the sequential chat history like :-
Bot: "What do you want to do?".
User : "I want to generate a ticket" and so on...
For example when you run the Bot locally on the Bot Framework Emulator, it displays some logs at the bottom right hand corner. I want those exact logs or something similar to be stored and used in my bot.
Please help me out! Thanks!

Skype Echo Bot for NodeJS: Messages Not Appearing in Skype App

I am following this Echo Bot Tutorial, and have gone through all of the basic steps regarding setup and registration. I am following the steps (near the bottom) regarding local testing, and have been using ngrok successfully.
I was able to add my Skype Bot as a contact, and I also have the latest version of the Skype app (Mac). When I send a message to the bot via the Skype app, I see the message appear in the debug notes in my terminal window. So I know that the messages I type are coming through.
I also see this:
skype-sdk.MessagingServiceClientV2 Sending message to 8:username with content Hey 8:username. Thank you for your message: "test".
However, I do not see any kind of reply in my Skype application. My expectation is that the bot would echo back my message to me.
My questions are:
1) When testing locally using the ngrok method described in the tutorial, should I be able to see activity from the Skype bot (in terms of messages to me)?
2) I am guessing this may be some an authentication issue? How can I best troubleshoot things, and get the Skype bot to actually respond in the Skype app?
I feel like I am incredibly close to getting this working, in that the messages I send are coming through... but the messages I expect from the Skype bot are not coming through. Any help or ideas greatly appreciated!
Found the fix, and posting it here should anyone else run into the same issue.
During the setup process, when I was using the Application Registration Portal, I selected the wrong string as my Application Secret.
Originally, I clicked on Generate New Key Pair, which resulted in a new entry appearing in the admin labeled Private Key. I used this string as my App Secret.
However, it appears that what I should have done was click on Generate New Password and used *that string instead**. Just gave it a try, and my bot is now responding back to me locally (in the Skype app), when testing with ngrok.
I think this particular distinction could have been made clearer in the documentation, as I lost a great deal of time due to this one oversight. Oh well, at least I can start developing now...

Resources