aws-samples / amazon-sumerian-hosts

Amazon Sumerian Hosts (Hosts) is an experimental open source project that aims to make it easy to create interactive animated 3D characters for Babylon.js, three.js, and other web 3D frameworks. It leverages AWS services including Amazon Polly (text-to-speech) and Amazon Lex (chatbot).
MIT No Attribution
174 stars 80 forks source link

Reusing Polly existing file content rather than calling AWS every time? #42

Open mikaelwozniak opened 3 years ago

mikaelwozniak commented 3 years ago

If my application has a set list of hardcoded texts to be said by the virtual host, I shouldn’t need to call AWS Polly every time a new visitor comes on my webpage. I should just have the mp3/api-call-result files saved somewhere and link with those static files.

What is the easiest way to achieve this with this repo code? Many Thanks.

jkerste commented 2 years ago

Hey @mikaelwozniak, this library is not currently designed to support storing and replaying audio. That said, if you wanted to achieve that you could look into creating some custom functionality with the resulting pre-signed url returned from AWS Polly:

charles-hay commented 2 years ago

@mikaelwozniak Any luck with this? I'm trying to do the same thing

Krxtopher commented 1 year ago

@mikaelwozniak and @charles-hay, can you explain what your motivation is for wanting to use locally cached audio and viseme data? Amazon Polly automatically serves cached versions of that data when called with the same parameters (voice ID, speech text, language ID). There's no cost to you when that happens. You only pay when unique new audio is generated. So you wouldn't be saving cost. Is there some other benefit you're looking to achieve with local caching?

charles-hay commented 1 year ago

... @mikaelwozniak oh well I wasted a lot of time 😓