Skip to content

Repository files navigation

🦜 Polly is a Cracker Netlify Status

About

Notes

The aws-sdk does not seem to work out of the box with Angular.

To get this working:

  1. Add the following line to polyfills.ts:
(window as any).global = window;
  1. add @types/node package (via npm or yarn)
  2. change the following line in tsconfig.app.json

from this:

"types": []

to this:

"types": ["node"]

Your mileage may vary

Change detection in callbacks needs a tick in the pants

πŸ’‘ I learned that change detection in Angular needs an app.tick() when the change occurs within a callback function.

Unneeded/unwanted arguments from base code example

πŸ˜‘ Working from the Polly base code example here, I found that the following lines where throwing errors in my angular app:

var polly = new AWS.Polly({ apiVersion: "2016-06-10" });
var signer = new AWS.Polly.Presigner(speechParams, polly);

I wound up removing the first line and the all of the arguments on the signer to get things working without errors.

const signer = new AWS.Polly.Presigner();

About

🦜 Amazon Polly does dad jokes... πŸ˜‚

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages