Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Norwagian Language Not supported this model #482

Open
Suryaravi0510 opened this issue Jun 27, 2024 · 0 comments
Open

Norwagian Language Not supported this model #482

Suryaravi0510 opened this issue Jun 27, 2024 · 0 comments

Comments

@Suryaravi0510
Copy link

Based on the document when i try to translate Text-to-Text for English to Norwagian Language, it shows ERROR as target language is not supported by this model.

Full Source Code: https://github.com/Suryaravi0510/seamlessM4T_Transformers/blob/main/seamlessM4T_Transformers.ipynb

Screenshot 2024-06-27 160956

Code:

Processing the text input

text_inputs = processor(text="Hello, How are you?", src_lang="eng", return_tensors="pt").to(device)

Generating text from the processed text

text_array = model.generate(**text_inputs, tgt_lang="nno", generate_speech=False)

print(f"Translated Text:- {processor.decode(text_array[0].tolist()[0], skip_special_tokens=True)}")

ERROR:


ValueError Traceback (most recent call last)
in <cell line: 5>()
3
4 # Generating text from the processed text
----> 5 text_array = model.generate(**text_inputs, tgt_lang="nno", generate_speech=False)
6
7 print(f"Translated Text:- {processor.decode(text_array[0].tolist()[0], skip_special_tokens=True)}")

1 frames
/usr/local/lib/python3.10/dist-packages/transformers/models/seamless_m4t/modeling_seamless_m4t.py in generate(self, input_ids, input_features, return_intermediate_token_ids, tgt_lang, spkr_id, generate_speech, **kwargs)
4243 )
4244 elif tgt_lang not in lang_code_to_id:
-> 4245 raise ValueError(
4246 f"""tgt_lang={tgt_lang} is not supported by this model.
4247 Please specify a tgt_lang in {','.join(lang_code_to_id.keys())}. Note that SeamlessM4T supports

ValueError: tgt_lang=nno is not supported by this model.
Please specify a tgt_lang in arb,ben,cat,ces,cmn,cym,dan,deu,eng,est,fin,fra,hin,ind,ita,jpn,kan,kor,mlt,nld,pes,pol,por,ron,rus,slk,spa,swe,swh,tam,tel,tgl,tha,tur,ukr,urd,uzn,vie. Note that SeamlessM4T supports
more languages for text translation than for speech synthesis.

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

No branches or pull requests

1 participant