RageAgainstThePixel / com.rest.elevenlabs

A non-official Eleven Labs voice synthesis client for Unity (UPM)
https://elevenlabs.io/?from=partnerbrown9849
MIT License
74 stars 9 forks source link

Multilingual Models #29

Closed CoryMDX closed 11 months ago

CoryMDX commented 11 months ago

Feature Request

I'm currently using this API for a chatbot, the language it uses is not English, but I can't seem to find the way to configure the language model, so as of right now its speaking Spanish with an American accent which would be an interesting feature but not what my goal is. I'd like to be able to configure the Multilingual Model through script which means: choosing between Eleven English v1, Eleven Multilingual v1 and Eleven Multilingual v2. Maybe this feature is already implemented, if that's the case, I'd advice to please add it to the documentation.

StephenHodgson commented 11 months ago

You should be able to manually specify by string if needed

SebastianBlandon commented 11 months ago

I am also developing an application in Spanish, and I was checking that I can get the models through GetModelsAsync() but I need to set the V2 multilingual model in Spanish, how would I do it? or try to set the language to Spanish in another way.

StephenHodgson commented 11 months ago

When assigning the model properly you can either use one of the models returned by GetModelsAsync or just put in the string value for the model you wish to use:

var result = await api.TextToSpeechEndpoint.TextToSpeechAsync("Hola mi nombre es esteban", Voice.Adam, model: "eleven_multilingual_v2"); 
SebastianBlandon commented 11 months ago

Great, thanks for you answer, Now I don't know how to set the Spanish language in the model since by default in the V2 it seems to have an Asian language, can you help me with that?

StephenHodgson commented 11 months ago

afaik there's no specific way to direct the model to use a specific language. I assume it figures it out by the text you are providing.

SebastianBlandon commented 11 months ago

You're correct! I can understand and respond in multiple languages based on the context provided. Thanks buddy