Skip to content

Retain chars with semantic or phrasing meaning - #8

Open
lionel-rowe wants to merge 1 commit into
travisvn:mainfrom
lionel-rowe:retain-semantic-chars
Open

Retain chars with semantic or phrasing meaning#8
lionel-rowe wants to merge 1 commit into
travisvn:mainfrom
lionel-rowe:retain-semantic-chars

Conversation

@lionel-rowe

@lionel-rowe lionel-rowe commented Nov 10, 2025

Copy link
Copy Markdown

Fixes #7

Manually tested with this input, spoken output is as expected with no errors:

const tts = new EdgeTTS(`1 < 2 & 6 > 5, a\x00b, c\x1fd, foo "bar 'baz'", one (two) three, x\ty\r\nend!`, 'en-GB-SoniaNeural')
new Audio(URL.createObjectURL((await tts.synthesize()).audio)).play()

/regex/v is baseline 2023, depending on minimum support requirements you might want to swap it out for a hard-coded list of control chars a-la the version in src/utils.ts.

@travisvn

Copy link
Copy Markdown
Owner

I responded to the premise of this PR in this comment #7 (comment)

Posting here for visibility

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.

removeIncompatibleCharacters under src/isomorphic-utils.ts removes chars that should be retained

2 participants