OpenVoice icon indicating copy to clipboard operation
OpenVoice copied to clipboard

I would like to ask, how can I add a new language like Vietnamese. Thank you

Open KalvinThien opened this issue 1 year ago • 8 comments

I would like to ask, how can I add a new language like Vietnamese. Thank you

KalvinThien avatar Oct 22 '24 12:10 KalvinThien

Hey @KalvinThien! I'm here to help you out with any bugs, questions, or contributions you have. Let's tackle this together!

To add a new language like Vietnamese to OpenVoice, you need to make changes in the openvoice/api.py file. Specifically, you should add an entry for Vietnamese in the language_marks dictionary within the BaseSpeakerTTS class:

class BaseSpeakerTTS(OpenVoiceBaseClass):
    language_marks = {
        "english": "EN",
        "chinese": "ZH",
        "vietnamese": "VI",  # Add this line
    }

This change assigns a language mark "VI" for Vietnamese, which can then be used in the tts method to process Vietnamese text [1].

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Oct 22 '24 12:10 dosubot[bot]

thank you for your help, you let me inquire further. Does the tool have a character limit when using clone voice? Thank you ...

Vào Th 3, 22 thg 10, 2024 vào lúc 19:44 dosubot[bot] < @.***> đã viết:

Hey @KalvinThien https://github.com/KalvinThien! I'm here to help you out with any bugs, questions, or contributions you have. Let's tackle this together!

To add a new language like Vietnamese to OpenVoice, you need to make changes in the openvoice/api.py file. Specifically, you should add an entry for Vietnamese in the language_marks dictionary within the BaseSpeakerTTS class:

class BaseSpeakerTTS(OpenVoiceBaseClass): language_marks = { "english": "EN", "chinese": "ZH", "vietnamese": "VI", # Add this line }

This change assigns a language mark "VI" for Vietnamese, which can then be used in the tts method to process Vietnamese text [1] https://github.com/myshell-ai/OpenVoice/blob/main/openvoice/api.py.

To continue talking to Dosu https://dosu.dev, mention @dosu https://github.com/dosu.

— Reply to this email directly, view it on GitHub https://github.com/myshell-ai/OpenVoice/issues/324#issuecomment-2429184393, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4X27SORCU2DTASGE5YGIVTZ4ZCDHAVCNFSM6AAAAABQMNE4QCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRZGE4DIMZZGM . You are receiving this because you were mentioned.Message ID: @.***>

KalvinThien avatar Oct 22 '24 14:10 KalvinThien

Yes, the OpenVoice tool has a character limit of 200 characters when using the clone voice feature. If the text exceeds this limit, an error message is displayed: "[ERROR] Text length limited to 200 characters for this demo, please try shorter text. You can clone our open-source repo and try for your usage" [1].

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Oct 22 '24 14:10 dosubot[bot]

Can you give me an example of using clone voice with Vietnamese text? I want to test v3

I tried and found that the accent was not quite right, I don't know where I went wrong @dosu.

KalvinThien avatar Oct 22 '24 14:10 KalvinThien

I'm bit lost - is not THIS repo the OpenSource repo - MIT license? If so, what the point of asking to clone opensource repo which has 200 characters limit?

CoolCold avatar Jan 31 '25 20:01 CoolCold

Could you provide more details about the specific steps you took when testing the clone voice with Vietnamese text? This might include the text you used, any modifications you made to the code, and the environment in which you are running the tool. This information will help in identifying where the issue might be.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

dosubot[bot] avatar Jan 31 '25 20:01 dosubot[bot]

Hey @KalvinThien! I'm here to help you out with any bugs, questions, or contributions you have. Let's tackle this together!

To add a new language like Vietnamese to OpenVoice, you need to make changes in the openvoice/api.py file. Specifically, you should add an entry for Vietnamese in the language_marks dictionary within the BaseSpeakerTTS class:

class BaseSpeakerTTS(OpenVoiceBaseClass): language_marks = { "english": "EN", "chinese": "ZH", "vietnamese": "VI", # Add this line } This change assigns a language mark "VI" for Vietnamese, which can then be used in the tts method to process Vietnamese text [1].

To continue talking to Dosu, mention @dosu.

How do we know if tts can support a new language? Is just adding language_marks support voice cloning in new languages?

Uniqbank avatar Feb 20 '25 19:02 Uniqbank

Hey @KalvinThien! I'm here to help you out with any bugs, questions, or contributions you have. Let's tackle this together!

To add a new language like Vietnamese to OpenVoice, you need to make changes in the openvoice/api.py file. Specifically, you should add an entry for Vietnamese in the language_marks dictionary within the BaseSpeakerTTS class:

class BaseSpeakerTTS(OpenVoiceBaseClass): language_marks = { "english": "EN", "chinese": "ZH", "vietnamese": "VI", # Add this line } This change assigns a language mark "VI" for Vietnamese, which can then be used in the tts method to process Vietnamese text [1].

To continue talking to Dosu, mention @dosu.

It requires base voice Vietnamese that's right? How i can get file vi.pth?

chuanweb avatar Jul 25 '25 07:07 chuanweb