If I tell Alexa to emit text in certain languages (Chinese, Russian, etc.) or emojis, it will say nothing to the user. Does the Alexa API have a way to indicate a string will be converted to nothing/silence before or after emit? Alternately, is there a way to test the string outside of Alexa?
You can check the Device Log in the test section of the developer's console for the string or SSML of Alexa's response.
For my case it's the Directive.DeviceSpeechSynthesizer.Speak log.
{
"header": {
"namespace": "SpeechSynthesizer",
"name": "Speak",
"messageId": "0a290293-fe8d-40a5-835e-25f2b2e605eb",
"dialogRequestId": "aa432cda-079a-4e46-a831-55d9f212bb6c"
},
"payload": {
"caption": "ok",
"url": "some url",
"format": "AUDIO_MPEG",
"token": "some token",
"ssml": "<speak><prosody volume=\"x-loud\">ok</prosody><metadata><promptMetadata><promptId>ExecuteAction.CommandExecuted</promptId><namespace>HomeAutomation</namespace><locale>en_US</locale><overrideId>default</overrideId><variant>a836f358-a86c-4e3f-94e9-fe2f3bb24c7d</variant><condition/><weight>1</weight><stageVersion>Adm-20170215_180306-27</stageVersion></promptMetadata></metadata></speak>"
}
}
You will notice that the ssml contains the converted text.
Also there is a discussion about supporting another language in ssml response.
Related
I am trying to create a calendar event with extended data using Microsoft Graph API.(actually, I am trying to converting the existing open extension to schema extension since I couldn't filter the non-id extended value of the open extension.)
Before my try, I have already created my schema extension successfully and creating a calendar event with the schema extension responses an error code "BadRequest" and message "Requests must contain extension changes exclusively".
I tried to do this by following the doc.
POST https://graph.microsoft.com/v1.0/me/calendars/{calendar-group-id}/events
{
"subject": "schema extension test",
"body": {
"contentType": "HTML",
"content": "schema extension test"
},
"start": {
"dateTime": "2021-01-22T12:00:00",
"timeZone": "Eastern Standard Time"
},
"end": {
"dateTime": "2021-01-23T14:00:00",
"timeZone": "Eastern Standard Time"
},
"attendees": [],
"extendedData": {
"courseId": "11",
"materialId": "22",
"courseType": "video"
}
}
response:
{
"error": {
"code": "BadRequest",
"message": "Requests must contain extension changes exclusively.",
"innerError": {
...
}
}
}
Without extendedData, creating the event responses success, and after creating the event, if I patch the event with only extendedData, it responses an error "A type named 'Microsoft.OutlookServices.OpenTypeExtension' could not be resolved by the model. When a model is available, each type name must resolve to a valid type".
PATCH https://graph.microsoft.com/v1.0/me/calendars/{calendar-group-id}/events/{event-id}
{
"extendedData": {
"courseId": "11",
"materialId": "22",
"courseType": "video"
}
}
response:
{
"error": {
"code": "RequestBodyRead",
"message": "A type named 'Microsoft.OutlookServices.OpenTypeExtension' could not be resolved by the model. When a model is available, each type name must resolve to a valid type.",
"innerError": {
...
}
}
}
I was able to succeed when I used Graph API explorer with signed in user by consent Calendars.Read permission.
But if I try the same thing in postman, it doesn't work.
I already have granted all calendar permissions including delegated and application permissions in Azure.
This is because your schema extension name is not extendedData.
When you use POST https://graph.microsoft.com/v1.0/schemaExtensions to create an extension for Event type, the real name will be prefixed.
Like this:
And based on this known issue of Microsoft Graph:
You cannot specify a schema extension in the same operation as
creating an instance of contact, event, message, or post. You must
first create the resource instance and then do a PATCH to that
instance to add a schema extension and custom data.
So we need to create the event first and then update it.
When updating the event, we need to specify the real extension name:
I have created one Alexa skill which I want to communicate with my chatbot. When I am asking question to Alexa, in request only intent name is coming.But I want the utterance text also. Is it possible to get that utterance?
"request": {
"type": "IntentRequest",
"requestId": "amzn1.echo-api.request.480ebab4-cd67-418e-b67f-eb8a00b74020",
"timestamp": "2020-02-13T06:55:52Z",
"locale": "en-US",
"intent": {
"name": "ask_utterance",
"confirmationStatus": "NONE"
}
}
This is the request.I am correctly getting intent name but i want utterance text which will then I will send to my chatbot. Is it possible to do that?
No, you can't (as for now) have the complete utterance.
The only thing that is near to a complete utterance is AMAZON.SearchQuery slot.
Otherwise, you will obtain only slot values.
When I call the Gmail API I get the following back (just an excerpt obviously since the body is massive:
{
...
payload: {
...
parts: [
{
"partId": "1",
"mimeType": "text/html",
"filename": "",
"headers": [
{
"name": "Content-Type",
"value": "text/html; charset=\"UTF-8\""
},
{
"name": "Content-Transfer-Encoding",
"value": "quoted-printable"
}
],
"body": {
"size": 4696,
"data": "PCFET0NUWVBFIGh0bWw-PGh0bWwgbGFuZz1lbj48....
I have just included the relevant parts. You will see that the html body part has the email encoded as base64Url, but toe content transfer encoding clearly says quoted-printable. I run it through a base64url decoder and it gives the correct data. But the header explicitly says it is quoted-printable
What am I missing?
The plain body part is this, which seems perfectly correct.
"headers": [
...
{
"name": "Content-Transfer-Encoding",
"value": "base64"
} ],
"body": {
"size": 601,
"data": "R29vZ2xlIEFQSXMgRXhwbG9yZXIgd2FzIGdyYW5
When you request a Message resource, the Gmail API can deliver message data in one of four formats that you can set via a query string (see documentation).
Below is a description of each format option, taken from the official docs:
"full": Returns the full email message data with body content parsed in the payload field; the raw field is not used.
(default)
"metadata": Returns only email message ID, labels, and email headers.
"minimal": Returns only email message ID and labels; does not return the email headers, body, or payload.
"raw": Returns the full email message data with body content in the raw field as a base64url encoded string; the payload field is
not used.
"full" is the default option where the body content is parsed and automatically stored as a base64 encoded string in the data property.
Keep in mind that the Message resource object is provided as a convenience to interact with the RFC5322 payload and it always provides its data payload in base64 regardless of the value on the Content-Transfer-Encoding header.
If you want to wrangle with the raw IMF(Internet Message Format - RFC5322) text, then set the format to "raw" in your query string. You'll have to base64 decode the raw string to get the IMF data. It will look exactly as you expect, but you'll have to write your own parser to manage its contents.
I am failing to understand the simple passing of parameters to and fro via webhook. i am trying to build a simple bot using dialog flow and fb messenger. i have requirement to show two buttons to the end user to pick a cake type. i am able to show the options using the below custom response:
{
"facebook": {
"attachment": {
"type": "template",
"payload": {
"template_type": "button",
"text": "What kind of cake would you like?",
"buttons": [
{
"type": "postback",
"payload": "witheggs",
"title": "Contain Eggs"
},
{
"type": "postback",
"payload": "noeggs",
"title": "Eggless"
}
]
}
}
}
}
once user tap one of the two buttons then how do i set it to some variable in dialog flow and then ask next set of question?
I guess you're missing few steps here. Before, I explain you what to do, be sure to know what a postback is! Postback, when tapped, the text is sent as a user query to dialogflow.com.
Step-1: I created an intent with custom payload as follows:
Step-2: Now, I created a new intent where I have entered user says as noeggs which is of type postback & payload as noeggs the in previous image.
Step-3: Save & test it in FB Messenger.
So basically, what has happened here is, when you click on Eggless button, postback as noeggs is sent as user query to dialogflow.com where there is an intent which matches user says with noeggs & sends response back.
I am trying for push notification with multiple lines text message. I have tried many changes like FCMService.java with setBigStyle text format, HTML.fromHTML, and some other. But not able to get the multiple line message.
I have gone through multiple sites and solution but not work. Marking it at duplicate or vote down, help me. I will up flag for your answer.
Sorry Guys!. I have found the solution.
No need of doing any kind of modification in the any file like FCMService.java or any other custom messages for showing of multiple lines of Notification while using Push Notification V5.
Remove the field "style", from the object you are sending notification.
Automatically the Multiple lines of notification will be seen.
For more information, upvote the answer, ask your query. I will help you out.
Below is my notification payload. Here I don't have any style at
{
"registration_ids" : ["XXXXXX"],
"priority" : "high",
"content-available": "0",
"notification": {
"title": "New Message",
"body": "You have an Instruction received. Please contact your admin to process further and more queries“,
"badge": "2",
"sound" : "default"
},
"data" : {
"message": "New Message",
"body": "You have an Instruction received RM",
"sound" : "default",
"actionId": "123456",
"badgeCount": "1",
"instructionType": "History",
"targetFunction": "actions",
"notificationType": "pvm"
}
}