actions-on-google / actions-on-google-nodejs

Node.js client library for Actions on Google
https://actions-on-google.github.io/actions-on-google-nodejs
Apache License 2.0
899 stars 193 forks source link

Longform TTS not being played on a phone, however it plays in the web simulator #349

Open ghost opened 5 years ago

ghost commented 5 years ago

Hello everyone,

I'm having a bit of an issue getting TTS to work in a Google Assistant Action on Android. I'm trying to make a "flash briefing" action that reads some news headlines and summaries, and these play on the web simulator. However on Android, it will just say "Here is the Radio NZ briefing" and close the conversation.

{
  "payload": {
    "google": {
      "expectUserResponse": false,
      "richResponse": {
        "items": [
          {
            "simpleResponse": {
              "textToSpeech": "Here is the Radio NZ briefing:"
            }
          },
          {
            "simpleResponse": {
              "textToSpeech": "<speak><p>Another 25 Wellington bus services cancelled - A chronic bus driver shortage continues to plague the Capital's peak hours services.</p><p>'A David and Goliath battle': Police inflatable stops environmental disaster - A maritime police officer has described the David and Goliath battle as he stopped a 200-tonne ferry from slamming into an Auckland wharf, from a 12-metre inflatable boat.</p><p>Career expo givers prisoners options for life on the outside - Women prisoners say they feel discriminated against by employers and that finding a job once they're on the outside is extremely difficult.</p><p>Outgoing rugby boss 'remembered for worst year in very proud history' - The outgoing boss of Taranaki rugby freely admits he'll \"be remembered as the CEO who presided over the worst year in our very proud history\".</p><p>Five people rescued after avalanche hits skiing party - Five people have been safely rescued after an avalanche hit their skiing party on Aoraki Mt Cook this afternoon.</p><p>Liquor store 'not keeping with the village', say opponents - Residents in a Wellington suburb say a bottle store is not in keeping with the village and its presence would increase alcohol consumption in the neighbourhood.</p><p>UK and Norway experts consulted in Royal Commission - Members of the Royal Commission into the Christchurch Mosque Attacks have travelled to Norway and the UK to speak with counter terrorism experts and senior police and intelligence officials.</p><p>Pigeon Valley fire deemed accidental - Fire and Emergency New Zealand has confirmed that one of the country's largest plantation forest fires was accidental.</p><p>Grieving mother appeals for help over death of Jasmine Wilson - The distraught mother of a woman who died after being dumped outside a hospital with injuries that left her 'unrecognisable' has appealed for anyone with information to come forward.</p><p>Accused shooter's manifesto 'crosses the line' - chief censor - The chief censor says a review of the accused Christchurch shooter's manifesto has ruled it was objectionable.</p><p>Police return to Christchurch hit-and-run scene - Police have finished re-enacting the events of last Wednesday when a man was hit by a van as the driver fled from police.</p><p>Unhappy neighbours battle council over Christchurch mall expansion - Neighbouring residents of a Christchurch mall will battle the City Council over plans to expand the complex.</p><p>Teen pleads guilty to possessing mosque shoooting video - A 17-year-old has pleaded guilty to possessing a copy of the video of the Christchurch mosque shootings.</p><p>Illegal firearms collection events: Police urge gun owners to make complaints - Police are urging people with complaints over treatment at gun collection events to come forward.</p><p>Flood-anxious Dunedin residents meet with experts over threats - South Dunedin residents met with scientists, engineers and policy makers to discuss flooding threats in their low-lying suburb on Monday night.</p><p>Strong earthquake shakes part of South Island, no tsunami warning - A strong earthquake near Milford Sound measured 5.5 on the Richter scale and was just at 12km deep, GeoNet says.</p><p>Thunderstorms in North may become severe - MetService - Metservice has issued a severe thunderstorm watch for the upper west coast of the North Island tonight.</p><p>Brain tumor missed by ED doctors insisting on psychological assessment - Doctors at Capital and Coast District Health Board failed to order a brain scan for a woman with a brain tumour, insisting instead on a psychological assessment.</p></speak>"
            }
          }
        ]
      }
    }
  },
  "outputContexts": []
}

Does anyone know what I can do to get it working? Is this possibly a bug?

ghost commented 5 years ago

Just saw this here: https://developers.google.com/actions/assistant/responses#media_responses

Media responses let your Actions play audio content with a playback duration longer than the 120-second limit of SSML.

I tested it on Android with a smaller SSML response and it's now working - I feel that this constraint should also be reflected in the behaviour of the web simulator.

Fleker commented 5 years ago

An internal issue has been raised.