You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That would make sense... to be honest, I did not like having the download hack via the embedded <a> element in the same method as the wav blob generating for some time.
It makes totally sense to separate them, as not all wav buffers must get downloaded or, as in your case, even should get streamed verbatim to a client.
Current implementation simply assumed to be run in a browser and provide wav files to download.
Opening a PR would be nice, it will become 0.3.0 then.
Feature release 0.3.0
Features:
- New method `SamJs.wav(text: string, phonetic?: boolean): Uint8Array;`
which
renders a wave buffer.
See #46, #47 (thanks to @seofernando25)
Fixes:
- Typo `dipthong` has been corrected to `diphthong` all over the code
base.
This includes the flag `FLAG_DIPTHONG` which is now named
`FLAG_DIPHTHONG`.
Fixes#19
- Fix comments to clearify that the '*' is not a wildcard but a marker
that the
second char in a phoneme is to be ignored.
Fixes # 21
Additionally minor changes like adding download in demo html file.
A server returning the contents from
sam.buf8(...)
doesn't automatically plays on the client.It would be nice if there was a
sam.toWavBuffer()
function for this and similar use cases.The code for it already exists in the
RenderBuffer
function found here, so an implementation of it could just be a refactor of that function:any thoughts on it? I understand if you do not want to expose that on the API for simplicity.
I would be more than glad to open a PR.
Also thank you so much for making this library 🙏
The text was updated successfully, but these errors were encountered: