Alexa uses the video skill "invocation name" which conflicts with the device name… - alexa-skill

(Please, note that my issue happens in French and I didn't try English)
My video skill is called "Kodono Smart Home".
The "invocation name" is "freebox".
My skill controls a TV device that is called (by default) "Freebox".
Since the beginning of May, Alexa has a strange behavior:
if I say "switch TV CHANNEL on Freebox", or "pause Freebox", or "Launch Netflix on Freebox" she replies: "I can play it on Freebox or Freebox, what do you prefer?", and then she loops on this answer;
if I just say "switch TV CHANNEL" or "Launch Netflix or "Pause", then she executes it without issue on the only video device called "Freebox";
If I say "switch TV CHANNEL/launch Netflix/pause on Living Room", then it works because the Freebox device is in the Living Room;
Obviously I don't have any other device called "Freebox". And I reset my Echo Dot.
Now the interesting part: I deleted the Freebox device, renamed it to "décodeur", then added it back to Alexa.
This time, all voice commands work normally!
However, if I say "Do this on décodeur", she replies "I do it on Freebox"… And if I say "Do this on Freebox", she replies "I don't know Freebox".
So at some point Alexa thinks that "décodeur" is "Freebox", but she's not able to find "Freebox"… Crazy, no?!
I looked at my Discovery payload that is sent to identify the device:
"endpointId": "freebox-123",
"friendlyName": "décodeur",
"description": "Freebox Révolution (123)",
"manufacturerName": "Assistant Cloud pour Freebox"
There are occurrences of the "Freebox" word, but if Alexa was using one of them, she would say "Assistant Cloud pour Freebox" or "Freebox Révolution" or similar.
After searching around, the only hard-coded reference to "Freebox" word is in the Developer Console in the "invocation word" field. I cannot find any other reference of it.
So why the hell Alexa is now using that invocation word for a Video Skill and mixes it up with the device name?!

I contacted the Alexa team using https://developer.amazon.com/alexa/console/contact-us and they told me they passed the issue to an internal team. A few days later, the bug seems to have been fixed on their side!

Related

Cancelled account linking leads to endless loop of same response

If a user invokes my action, she is asked by google whether her account should be linked or not (something like: "If you want to use xxx, I got to link your account at xxx with google. Is this okay?"). Now, if she chooses "no", and my action returns an answer with expectUserResponse set to false, google assistant seems to jump into a very awkward endless loop of my returned response, even emitting the assistant's "conversation finished" sound after each response:
("In order to use xxx, I got to link your account at xxx with google. Is this okay?" - "No" - "Okay, this means you are not able to use your account at xxx. Get back to us if you change your mind.")
"Schönen Tag" (in the second speech bubble) is the response I am sending from my fulfillment.
So what we are getting here is an endless "Schönen Tag" - GoogleSound - "Schönen Tag" - GoogleSound - "Schönen Tag" - GoogleSound - Schönen Tag"- GoogleSound and so on. With no additional user input between each message. Imho, this definitely shouldn't happen, no matter if I configured sth wrongly or not.
I don't even need my fulfillment server to reproduce this. If I create a dialogflow intent, attach the actions_intent_SIGN_IN event to it and let this intent return a static response with "set this intent as end of conversation" set to true, I am able to fully reproduce this strange behaviour:
(this actually was the setup for all screenshots above)
If I recreate this intent, but change the setting to not end the conversation after sending the response, I do not get an endless loop anymore. But this isn't what I intended to do.
It also doesn't seem to matter if I require the sign in for explicit invocations or not (in the integrations-tab).
It looks like this was a bug, with a fix released this morning.
Are you still running into this issue?

amazon alexa skill kit (ASK)

what is the difference between this.emit(:ask) and this.response(:speak) in amazon alexa
EG:
let handler = {
'PlayVideoIntent' : function() {
// VideoApp.Play directives can be added to the response
if (this.event.context.System.device.supportedInterfaces.VideoApp) {
this.response.playVideo('http://path/to/my/video.mp4');
} else {
this.response.speak("The video cannot be played on your device. " +
"To watch this video, try launching the skill from your echo show device.");
}
this.emit(':responseReady');
}
}
Alexa Skills Kit documentation have a detailed explanation.
From Response vs ResponseBuilder section:
Currently, there are two ways to generate the response objects in Node.js SDK. The first way is using the syntax follows the format this.emit(:${action}, 'responseContent').
If you want to manually create your own responses, you can use this.response to help. this.response contains a series of functions, that you can use to set the different properties of the response. This allows you to take advantage of the Alexa Skills Kit's built-in audio and video player support. Once you've set up your response, you can just call this.emit(':responseReady') to send your response to Alexa. The functions within this.response are also chainable, so you can use as many as you want in a row.
When you have finished set up your response, simply call this.emit(':responseReady') to send your response off. Below are two examples that build response with several response objects:
Example1:
this.response.speak(speechOutput)
.listen(repromptSpeech);
this.emit(':responseReady');
Example 2
this.response.speak(speechOutput)
.cardRenderer(cardTitle, cardContent, cardImage)
.renderTemplate(template)
.hint(hintText, hintType);
this.emit(':responseReady');
Since responseBuilder is more flexible to build rich response objects, we prefer using this method to build the response.
Welcome to StackOverflow. The answer is available in the question itself.
When you have an ask it essentially means that the session is still maintained and Alexa is expecting something from the user. And on the other hand if you are going with a tell, it means that there is no session available. below example will be helpful.
tell
User: Alexa, how are you doing.
Alexa: I'm doing good thank you.
--Conversation ended
ask
User: Alexa set an alarm
Alexa: sure, at what time? <-- This is where we use ask, as the conversation is incomplete
User: at 5:30 AM
Alexa: Alarm set <-- This is where we use tell, as the task is done and there is no use of user's input anymore.
Hope this helps you.
Happy Coding!!!

Lync 2013 SDK - Join Conference & Connect AVModality when "Join meeting audio from" setting set to "Do not join audio"

I'm rather new to the Lync 2013 SDK (been using it for a couple weeks now) and have been able to figure out mostly everything I need except for this...
When I'm joining a conference (using ConversationManager.JoinConference()) it joins fine. However, in certain cases (not all), I want to then connect the AVModality on the conference. Sometimes it works, sometimes it just sits in "Connecting" and never connects (even though I've called EndConnect).
What I've found is the setting in Skype's Options -> Skype Meetings -> Joining conference calls section, seems to override my code. Maybe a race condition?
When the setting is "Do not join audio" and "Before I join meetings, ask me which audio device I want to use" is NOT CHECKED (meaning I get no prompt when joining): the conference joins, the AVModality goes Disconnected -> Connecting -> Disconnected. Then my code triggers a BeginConnect and the AVModality goes Disconnected -> Connecting - and never resolves (sometimes I get a fast busy tone audio sound).
When the "Before I join meetings, ask me which audio device I want to use" IS CHECKED (meaning I get the prompt): the conference joins, the prompt asks how to connect, if I select Skype for business - it connects audio fine (expected). Interestingly, if I hang up the call using the Lync UI (AVModality goes to Disconnected), it then immediately connects back again (assuming my BeginConnect doing this).
Here's where it gets really convoluted:
If I call BeginConnect when the state is Connecting on the AVmodality within the ModalityStateChanged event handler... the following happens:
Conference joins, prompt asks me how to connect (AVmodality state is "Connecting" at this point until a decision is made on the prompt) - this means my BeginConnect fires. Then if I choose "Do not join audio" in the prompt... the AVModality status goes Connecting -> Disconnected -> Connecting -> Joining -> Connected. So - my BeginConnect is already in progress and still works in this case so long as it fires BEFORE the selection of "Do not join audio".
So I'm wondering if the "Do not join audio" selection (whether with or without the prompt) actually sets some other properties on something which prevents the AVModality from being connected after that point without doing some additional hocus pocus? If so - I'd like to know the additional hocus pocus I need to perform :)
Thanks for any and all help!
It's come down to this... whether the conference joining does join the audio or not - I've handled every scenario except one, which I still can't figure out:
1. I need the conference audio to be joined, but the user selects to NOT join the audio (either on the prompt, or from the Skype options settings).
In this case - I have added an event handler to the modality state change event, and when the NewState == Disconnected, I trigger a BeginConnect on the modality itself. This works fine. Within the callback, I have the EndConnect call. However - the AVModality state continues to stay in "Connecting" and never resolves to being connected. On the UI - it shows the audio buttons, but all grayed out (like normal when it's connecting). I'm not sure how to make it finish connecting?
Here's a snippet of code:
if (merge)
{
myHandler = delegate (object sender1, ModalityStateChangedEventArgs e1)
{
AVModality avModality = (AVModality)sender1;
Globals.ThisAddIn.confConvo = avModality.Conversation;
if (e1.NewState == ModalityState.Connected)
{
DialNumberInSkype(meetingInfo);
avModality.ModalityStateChanged -= myHandler;
}
if (e1.NewState == ModalityState.Disconnected)
{
object[] asyncState = { avModality, "CONNECT" };
avModality.BeginConnect((ar) =>
{
avModality.EndConnect(ar);
DialNumberInSkype(meetingInfo);
}, asyncState);
avModality.ModalityStateChanged -= myHandler;
}
};
}
EDIT:
For some reason, I'm not able to add a comment right now...
I tried setting the endpoint as you suggested. However, I get an ArgumentException error "Value does not fall within the expected range." So I tried hardcoding the uri value in the CreateContactEndpoint to "sip:my_login#domain.com" (except real value of course) - and got the same ArgumentException error. I added a breakpoint before this and was able to see the value for the avModality.Endpoint - and it is actually set to me the entire time... it's not null or unset when I'm trying to call BeginConnect.
When JoinConference() is invoked audio modality will be connected even without explicitly invoking BeginConnect().
When prompt asking for audio device selection is shown(when ask before join option is set in skype) conversation property ConferenceEscalationProgress will be having value AwaitingJoinDialogResponse.
Setting conversation property ConferenceJoinDialogCompleted as true will initiate Modality connection even though the prompt is not closed.
Edited
If do not join audio is selected, modality will be disconnected, at this point you are trying to invoke BeginConnect(). Try setting modality endpoint before invoking BeginConnect().
conversation.Modalities[ModalityTypes.AudioVideo].Endpoint = lyncClient.Self.Contact.CreateContactEndpoint(lyncClient.Self.Contact.Uri);

How to implement activation phrase like "Hey Cortana" in SpeechRecognizer?

In the SpeechAndTTS samples in Universal Windows demo apps (link), even the continuous dictation examples requires the user to click on a button to start the recognizer.
So my question is how can we implement an always listening SpeechRecognizer? Activated when hearing something like "Hey Cortana" or "Okay Google".
The closest thing I can think of is
place a SpeechRecognitionListConstraint on the speechRecoginzer, which only listen to the "wake up word" ("Hey Cortana" for example)
In the ResultGenerated event handler, check if "Hey Cortana" is heard with medium/high confidence. If "Hey Cortana" is not heard, use speechRecognizer.CompileConstraintsAsync() to force the recognizer to listen again.
In the Completed event handler, use speechRecognizer.CompileConstraintsAsync() to force the recognizer to listen again.
Another thing I have checked is the Timeouts on the speechRecognizer. https://msdn.microsoft.com/en-us/library/windows.media.speechrecognition.speechrecognizertimeouts.aspx
But it appears we cannot have infinite InitialSilenceTimeout.
So, is there a straight-forward way to have a speechRecognizer that does not stop listening until the "wake up phrase" is heard?
So my question is how can we implement an always listening SpeechRecognizer? Activated when hearing something like "Hey Cortana" or "Okay Google".
As we know, we can't implement Cortana into our App when the app is already running in the foreground, we need to use SpeechRecognition. But we can done this job using Continuous dictation.
even the continuous dictation examples requires the user to click on a button to start the recognizer.
Yes, but this is because await speechRecognizer.ContinuousRecognitionSession.StartAsync() is in the button click event, the session start work in this event. To make it start without button click event, you can start this session in the OnNavigateTo method of the Page and stop this session in the OnNavigateFrom method. And of course you can stop this session when "wake up phrase" is heard.
I agree with your mind that you can force it to listen in the Completed event, but I prefer to use speechRecognizer.ContinuousRecognitionSession.StartAsync() like this in the SpeechContinuousRecognitionSession.Completed | completed event:
if (args.Status != SpeechRecognitionResultStatus.Success)
{
if (args.Status == SpeechRecognitionResultStatus.TimeoutExceeded)
{
await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
// Show the state on UI
});
await speechRecognizer.ContinuousRecognitionSession.StartAsync();
}
...
}
And for the time limit, I just tested, by default the Continuous dictation will last about 5s without any voice at first and then went to the state time out. And I also tested to set the time like this:
speechRecognizer.Timeouts.InitialSilenceTimeout = TimeSpan.FromSeconds(10.0);
It worked by my side.
Actually for your scenario, you can refer to a official video: Cortana and Speech Platform In Depth. In the sample of this video, it listens to two sentences: "take a note" and "save trip".

Regarding popcorn time app

I am curious about how popcorn time works. I have read somewhere and it seems that the app is centered upon a group of APIs.
One for torrents, another for the movie info, and another for the poster, [as well as] an API for the subtitles making the end-product entirely automated with no hosting necessary. All Popcorn Time does is “take existing information and put it together.
How did they able to make everything entirely automated ?
I download myself from theirs github what I think it is a good place to you start. https://github.com/popcorn-time/popcorn-app. Unfortunately their service depends from a service what was shut down recently. This code in the github just show the code of the client. So, if we want to create some similar service the chalenge now it is to create something close to the old Popcorn service, preferably 100% automated.
In my first look, I believe they used to merge all the information into a REST service http://subapi.com/. This may be found here https://github.com/popcorn-time/popcorn-app/blob/master/js/frontend/providers/torrents.js . this may be the service what was shut down. By the quality of the information this don't look like something 100% automated but humanly managed.
As the service is turned off it is not easy to see how was exactly this service works. Look to the client we can try to discovery some excepted JSONs. I have been trying to discovery to create a similar service based on the torrents informations on the web.
This is the best what I could do so far ( NOT WORKING VERSION ):
<?php
header("Access-Control-Allow-Origin: *");
header('Content-type: text/json');
?>{
"movies":[
{
"imdb_id": "tt1234721",
"title": "Robocop",
"year": "2014",
"runtime": "118 minutes",
"synopsis": "In 2028 Detroit, when Alex Murphy - a loving husband, father and good cop - is critically injured in the line of duty, the multinational conglomerate OmniCorp sees their chance for a part-man, part-robot police officer",
"voteAverage": "6.7",
"poster": "http://ia.media-imdb.com/images/M/MV5BMjAyOTUzMTcxN15BMl5BanBnXkFtZTgwMjkyOTc1MDE#._V1_SX214_.jpg",
"backdrop": "http://coolandcollected.com/wp-content/uploads/2013/05/neca-robocop-2.jpg",
"torrents": [ {"1080P": ["http://torrage.com/torrent/6CCD91113CDE3D36A2B213BF701EB251A5E580C8.torrent"] } ],
"torrent": ["http://torrage.com/torrent/6CCD91113CDE3D36A2B213BF701EB251A5E580C8.torrent"],
"videos": [],
"subtitles": [],
"seeders": ["udp://tracker.openbittorrent.com:80", "udp://tracker.publicbt.com:80", "udp://tracker.istole.it:6969", "udp://tracker.ccc.de:80", "udp://open.demonii.com:1337"],
"leechers": ["udp://tracker.openbittorrent.com:80", "udp://tracker.publicbt.com:80", "udp://tracker.istole.it:6969", "udp://tracker.ccc.de:80", "udp://open.demonii.com:1337"]
}
]
}'

Resources