speechmarkdown / speechmarkdown-js

Speech Markdown grammar, parser, and formatters for use with JavaScript.
MIT License
76 stars 16 forks source link

Amazon Polly support #62

Closed mritzco closed 1 year ago

mritzco commented 3 years ago

Hi,

I'm using Amazon Polly via API and it seems like the Alexa specification is not matching.

I'd like to contribute some fixes but would like to ask if there's any preference or coding standard for?

Full feature information: https://docs.aws.amazon.com/polly/latest/dg/supportedtags.html

Failing test on Polly:

const fails = {
  "audio-standard.spec.ts": `!["https://sample-dev.s3.amazonaws.com/path/18327803923/f7fb4173-4eab-46fc-80ec-020204a615f9.mp3?AWSAccessKeyId=AKXXXXXXXXXXXXXXXXXX&Expires=1596986208&Signature=VL6q9pYc8NTjf6gKVqN0Cem0WTA="]
  Announcing Speech Markdown.`,
  "disappointed-section.spec.ts": `#[disappointed] Hey there, nice to meet you`,
  "disappointed-standard.spec.ts": `We can switch (from disappointed)[disappointed] to (really disappointed)[disappointed:"pizza"].`,
  "dj-section.spec.ts": `#[dj] Hey there, nice to meet you`,
  "emphasis-standard.spec.ts": `A (reduced)[emphasis:"reduced"] level`,
  "excited-section.spec.ts": `#[excited] Hey there, nice to meet you`,
  "excited-standard.spec.ts": `We can switch (from excited)[excited] to (really excited)[excited:"pizza"].`,
  "interjection-standard.spec.ts": `(Wow)[interjection], I didn't see that coming.`,
  "multiple-modifiers-same-text.spec.ts": `Your balance is: (12345)[number;emphasis:"strong";whisper;pitch:"high"].`,
  "pitch-standard.spec.ts": `A (high)[pitch:"high"] pitch
  A (high)[pitch:'high'] pitch`,
  "prosody-multiple-modifiers.spec.ts": `Multiple modifiers on same (text)[vol;pitch;rate]`,
  "sections-standard.spec.ts": `#[voice:'Brian'] Hey there, nice to meet you`,
  "voice-standard.spec.ts": `Why do you keep switching voices (from one)[voice:"device"] to (the other)[voice:"kendra"]?
  Why do you keep switching voices (from one)[voice:'device'] to (the other)[voice:'kendra']?`,
};
johandouma commented 3 years ago

It looks like the feature set is different too if you use Neural vs Standard - eg emphasis is an "Unsupported Neural feature". This does not seem to be mentioned anywhere on the supported tags page https://docs.aws.amazon.com/polly/latest/dg/supportedtags.html. Maybe 2 formatters are required?

mritzco commented 3 years ago

Yes, that's correct. support is completely different.

On Thu, Aug 19, 2021, 12:19 PM Johan Douma @.***> wrote:

It looks like the feature set is different too if you use Neural vs Standard - eg emphasis is an "Unsupported Neural feature". This does not seem to be mentioned anywhere on the supported tags page https://docs.aws.amazon.com/polly/latest/dg/supportedtags.html. Maybe 2 formatters are required?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/speechmarkdown/speechmarkdown-js/issues/62#issuecomment-901618830, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGB3JGBWXMSLEMOZI3DR6TT5SH7LANCNFSM472QY3NQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

arjan commented 1 year ago

Has been fixed now that #66 is merged