question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can we send media response without speech?

See original GitHub issue

I have tried to send response without addSimpleResponse:

app.ask(app.buildRichResponse()
// removed speech response
//      .addSimpleResponse('')
      .addMediaResponse(app.buildMediaResponse()
        .addMediaObjects([app.buildMediaObject(
          strings.title,
          options.audioURL
        )
          .setDescription(description)
          .setImage(
            options.imageURL || config.media.DEFAULT_SONG_IMAGE,
            app.Media.ImageType.LARGE
          )
        ])
      )
      .addSuggestions(options.suggestions)
      .addSuggestionLink(
        mustache.render(strings.suggestionLink, options),
        mustache.render(config.endpoints.ALBUM_DETAIL, options)
      )
    );

and with empty addSimpleResponse

app.ask(app.buildRichResponse()
// muted speech response
      .addSimpleResponse('')
      .addMediaResponse(app.buildMediaResponse()
        .addMediaObjects([app.buildMediaObject(
          mustache.render(strings.title, options),
          options.audioURL
        )
          .setDescription(description)
          .setImage(
            options.imageURL || config.media.DEFAULT_SONG_IMAGE,
            app.Media.ImageType.LARGE
          )
        ])
      )
      .addSuggestions(options.suggestions)
      .addSuggestionLink(
        mustache.render(strings.suggestionLink, options),
        mustache.render(config.endpoints.ALBUM_DETAIL, options)
      )
    );

But all the time gets fail:

{
  "message": "Failed to parse Dialogflow response into AppResponse, exception thrown with message: Empty speech response",
  "apiResponse": {
    "id": "786399ec-fe7f-432d-aa26-4628802d0b05",
    "timestamp": "2018-03-14T13:28:46.777Z",
    "lang": "en-us",
    "result": {},
    "status": {
      "code": 206,
      "errorType": "partial_content",
      "errorDetails": "Webhook call failed. Error: 400 Bad Request"
    },
    "sessionId": "1521034108233"
  }
}

In the same time it works with speech response fine. _I’ve grab working code right from our sources https://github.com/internetarchive/internet-archive-google-action/blob/master/functions/src/dialog/audio.js#L20_

How can I send media response without speech?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
igilhamcommented, Nov 19, 2018

For a clip of silence, you might be violating the general policies where it says Playing a silent sound file without a clear purpose may get your app rejected from the directory in the review process since it’s not the best user experience.

Maybe a short (not too loud) sound effect can be better to let the user know the next media is playing. But you should test it out with users to see what they are fine with.

What if the clear purpose is to work around a bad UX design decision by the Assistant platform? Playing SSML in between audio files in a playlist is terrible UX.

Assistant is also a bit buggy. I starts playing the MediaResponse silently, speaks the SSML over the top, then continues playing the audio file from part way through, having skipped the first few seconds (up to 120s).

1reaction
nealrscommented, Dec 11, 2018

@igilham re: that SSML issue, I’ve definitely had this problem and filed a bug with the AOG team directly (1-2 months ago). they claim it’s been fixed - but if you’re still seeing it, you may want to email them with an example recording/video.

and i totally agree re: required SSML between audio clips being a bad UX.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Say 'No Comment' Without Actually Saying It - PRNEWS
This is a nice way of saying that the official replied, No comment. A better response: “I'll check on that and will get...
Read more >
Nonverbal Communication: How to Communicate Without ...
Nonverbal communication is the way we send messages without speaking. Typically, nonverbal messages are sent using facial expressions, ...
Read more >
When NOT to Speak to a Reporter and How to Say No- Nicely
Learn ways you can evaluate whether or not you should be talking to the media, ways to thoughtfully decline an interview, and lastly, ......
Read more >
How to respond to disinformation while protecting free speech
How to respond to disinformation while protecting free speech. This piece offers recommendations to address some of these issues without ...
Read more >
Counterspeech Doctrine | The First Amendment Encyclopedia
The counterspeech doctrine posits that the proper response to negative speech is to counter it with positive expression. It derives from the theory...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found