Skip to content

fix(helpers): decode XML entities in ssml_to_deepgram - #841

Open
themanoj-025 wants to merge 1 commit into
deepgram:mainfrom
themanoj-025:fix/ssml-unescape-entities
Open

themanoj-025 wants to merge 1 commit into
deepgram:mainfrom
themanoj-025:fix/ssml-unescape-entities

Conversation

@themanoj-025

Copy link
Copy Markdown

Fixes #811

Summary

  • Decoded XML/HTML entities using html.unescape() in ssml_to_deepgram() (in src/deepgram/helpers/text_builder.py) for both plain text (after tag stripping) and <phoneme> word and ph values.

Testing

  • Added test_ssml_to_deepgram_decodes_xml_entities and test_ssml_to_deepgram_decodes_phoneme_entities in tests/custom/test_client_construction_and_helpers.py.
  • Ran pytest tests/custom/test_client_construction_and_helpers.py --noconftest (15 passed).

This branch has not been deployed

No deployments
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.

[Bug]: ssml_to_deepgram leaves XML entities such as &amp; and &apos; in the TTS text

1 participant