discordier/sam

How to get Sam's speech in WAV Data URL format?

Opened this issue · 2 comments

I need this for one of my projects. I will be very grateful if you help!

There is no function that does this out of the box, however, it is done internally for providing the wave download.

See https://github.com/discordier/sam/blob/master/src/util/player.es6#L80

The data url is built on 128.
You should be fine by copy pasting all above it and using it to creating your own data url from the buf8 result.

Maybe it is worth to extract this into a high level function which is then exported and called internally from RenderBuffer.