elevenlabs-python icon indicating copy to clipboard operation
elevenlabs-python copied to clipboard

Enhancement: Support for Localization of Numbers and Dates

Open rodrigoGA opened this issue 1 year ago • 2 comments

I've noticed that elevenlabs translates numbers and dates to audio in English, regardless of the target language. This can compromise the clarity of the generated content for speakers of other languages.

Hotfix Request: It would be beneficial to include a function to transform numbers and dates into text in the desired language before converting to audio. This could serve as a temporary workaround to prevent pronunciation errors and improve overall understanding.

I hope you will consider this proposal for future implementation.

Thank you.

rodrigoGA avatar Apr 07 '24 20:04 rodrigoGA

I agree that this needs to be a feature but I would recommend SSML. It seems that SSML is not fully enabled in Elevenlabs. Especially not in streaming

Example:

<speak>
  <say-as interpret-as="date" format="yyyymmdd" detail="1">
    2024-04-09
  </say-as>
</speak>

stevenzielke avatar Apr 09 '24 14:04 stevenzielke

I personally use https://github.com/savoirfairelinux/num2words to do conversion of my text before sending it to the API. It's a good workaround for the moment.

Maxamillian-Bonaparte avatar May 31 '24 10:05 Maxamillian-Bonaparte