facebookresearch / seamless_communication

Foundational Models for State-of-the-Art Speech and Text Translation
Other
10.93k stars 1.06k forks source link

Fairseq CString to python string #386

Open YKoustubhRao opened 8 months ago

YKoustubhRao commented 8 months ago

translator = Translator("seamlessM4T_v2_large", "vocoder_v2", device = torch.device("cpu"), dtype = torch.float16) lang = 'eng'

for file in os.listdir(src): textoutput, = translator.predict( input = os.path.join(src, file), task_str = 'ASR', tgt_lang = lang )

fairseq2n.bindings.data.string.CString object to python string

Awaisn25 commented 7 months ago

You can simply do str(<fairseq2n.bindings.data.string.CString Object>) or <fairseq2n.bindings.data.string.CString Object>.__str__()