You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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
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 supportsValueError:
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 supportsmore languages for text translation than for speech synthesis.
The text was updated successfully, but these errors were encountered: