#I created a pronunciation dictionary as a .pls file and after uploading it to my Project (I'm using

1 messages · Page 1 of 1 (latest)

mossy jasperBOT
#
AI-generated Answer for tfhospod

The issue you're experiencing might be due to the model you're using. The guide you followed for creating a pronunciation dictionary is correct, but it's important to note that not all models support the use of pronunciation dictionaries in the same way.

In the provided content, it's mentioned that alias tags are supported by all models excluding eleven_turbo_v2_5. Phoneme tags, which are used for specific pronunciation rules, only work with the models eleven_turbo_v2 and eleven_monolingual_v1. If you use phoneme tags with other models, they will silently skip the word.

Since you're using the Eleven Multilingual v2 model, it might not be interpreting the phoneme tags correctly, leading to the literal pronunciation of the IPA aliases. You might want to try using the eleven_turbo_v2 or eleven_monolingual_v1 models instead, as they are designed to work with phoneme tags.

tepid horizon
#

I'm using <Alias> tags though

mossy jasperBOT
#
AI-generated Answer for tfhospod

The issue might be related to the model you're using. According to the information provided, alias tags are supported by all models excluding eleven_turbo_v2_5. However, phoneme tags only work with the models eleven_turbo_v2 and eleven_monolingual_v1. If you use phoneme tags with other models, they will silently skip the word.

If you're using the eleven_multilingual_v2 model, it might not support the phoneme tags, causing it to read the IPA aliases literally. You might want to switch to a model that supports phoneme tags, such as eleven_turbo_v2 or eleven_monolingual_v1, to get the desired pronunciation.

tepid horizon
#

I'm not using phoneme tags though

mossy jasperBOT
#
AI-generated Answer for tfhospod

It's important to note that alias tags are supported by all models excluding eleven_turbo_v2_5. However, phoneme tags only work with the models eleven_turbo_v2 and eleven_monolingual_v1. If you use phoneme tags with other models, they will silently skip the word.

If you're using alias tags and they're not working as expected, it could be due to the model you're using. If you're using the eleven_turbo_v2_5 model, it does not support alias tags, which could explain the issue you're experiencing.

Here's an example of how to use a pronunciation dictionary with the Python SDK:

import requests
from elevenlabs import play, PronunciationDictionaryVersionLocator

with open("dictionary.pls", "rb") as f:
    # this dictionary changes how tomato is pronounced
    pronunciation_dictionary = client.pronunciation_dictionary.add_from_file(
        file=f.read(), name="example"
    )

audio_1 = client.generate(
    text="Without the dictionary: tomato",
    voice="Rachel",
    model="eleven_turbo_v2",
)

audio_2 = client.generate(
    text="With the dictionary: tomato",
    voice="Rachel",
    model="eleven_turbo_v2",
    pronunciation_dictionary_locators=[
        PronunciationDictionaryVersionLocator(
            pronunciation_dictionary_id=pronunciation_dictionary.id,
            version_id=pronunciation_dictionary.version_id,
        )
    ],
)

# play the audio
play(audio_1)
play(audio_2)

This code creates a pronunciation dictionary from a file, generates two different text-to-speech audios (one with the dictionary and one without), and plays them. If you're still having issues, please ensure that your .pls file is correctly formatted and that you're using a model that supports the tags you're using.

tepid horizon
#

I'm using Eleven Multilingual v2.

mossy jasperBOT
#
AI-generated Answer for tfhospod

The issue you're experiencing might be due to the fact that the Eleven Multilingual v2 model does not support alias tags. According to the information provided, alias tags are supported by all models excluding eleven_turbo_v2_5. Phoneme tags only work with the models eleven_turbo_v2 and eleven_monolingual_v1. If you use phoneme tags with other models, they will silently skip the word.

If you want to use pronunciation dictionaries with the Eleven Multilingual v2 model, you might need to use phoneme tags instead of alias tags. Here's an example of how to use phoneme tags in a pronunciation dictionary:

<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0"
      xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon
        http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
      alphabet="ipa" xml:lang="en-US">
  <lexeme>
    <grapheme>tomato</grapheme>
    <phoneme>/tə'meɪtoʊ/</phoneme>
  </lexeme>
  <lexeme>
    <grapheme>Tomato</grapheme>
    <phoneme>/tə'meɪtoʊ/</phoneme>
  </lexeme>
</lexicon>

In this example, the pronunciation for tomato and Tomato is specified using the IPA alphabet. The pronunciation dictionary can then be uploaded using the ElevenLabs Python SDK.

tepid horizon
#

I thought you said phoneme tags only work with eleven_turbo_v2 and eleven_monolingual_v1

mossy jasperBOT
#
AI-generated Answer for tfhospod

Yes, you're correct. The phoneme tags are only supported by the eleven_turbo_v2 and eleven_monolingual_v1 models. If you use phoneme tags with other models, they will silently skip the word.

For the eleven_multilingual_v2 model that you're using, it doesn't support phoneme tags. However, alias tags are supported by all models excluding eleven_turbo_v2_5.

If you want to control the specific pronunciation of words, you might need to switch to a model that supports phoneme tags or use alias tags instead.

tepid horizon
#

I AM using alias tags.