Skip to content

Feat/expressive tags#108

Open
willwade wants to merge 1 commit into
speechmarkdown:masterfrom
willwade:feat/expressive-tags
Open

Feat/expressive tags#108
willwade wants to merge 1 commit into
speechmarkdown:masterfrom
willwade:feat/expressive-tags

Conversation

@willwade
Copy link
Copy Markdown
Contributor

@willwade willwade commented Apr 9, 2026

A bunch of these new ai models support expressive elements for non verbal sounds. I think this is the right way of dealing with this but not sure. So this pr ;

  • Adds [laugh], [sigh], [cough], [gasp], etc. as SpeechMarkdown elements. These represent non-verbal sounds distinct from emotional styles like [cheerful] or [excited].

  • Grammar: 52 expressive keywords (laugh, sigh, cough, gasp, giggle, etc.)

  • W3c/Text/ElevenLabs formatters: preserve as [tag] literal text

  • Other formatters: silently strip (no native support)

  • 11 new tests covering multi-tag, edge cases, no-conflict with breaks

@willwade willwade force-pushed the feat/expressive-tags branch 2 times, most recently from 39e3efd to 7bd228f Compare April 9, 2026 03:43
Add [laugh], [sigh], [cough], [gasp], etc. as first-class SpeechMarkdown
elements. These represent non-verbal sounds distinct from emotional styles
like [cheerful] or [excited].

- Grammar: 52 expressive keywords (laugh, sigh, cough, gasp, giggle, etc.)
- W3c/Text/ElevenLabs formatters: preserve as [tag] literal text
- Other formatters: silently strip (no native support)
- 11 new tests covering multi-tag, edge cases, no-conflict with breaks

This enables the pipeline:
  SpeechMarkdown → SSML with [laugh] preserved → stripSSML → processAudioTags
  Each engine in js-tts-wrapper then maps [tags] to its native format.
@willwade willwade force-pushed the feat/expressive-tags branch from 7bd228f to 24e1b6b Compare April 9, 2026 03:46
@willwade
Copy link
Copy Markdown
Contributor Author

willwade commented Apr 9, 2026

NB: @arjan et al - once this gets through I've got a new engine (or two to be precise) - Acapela b92facb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant