Skip to content

error on alignment step with cpu #12

@Elpatata145

Description

@Elpatata145

.
self.g2p_model.load_state_dict(torch.load(g2p_path, map_location=torch.device('cpu')))
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031\python\tkinter_init_.py", line 1892, in call
return self.func(args)
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031\python\Lib\site-packages\customtkinter\windows\widgets\ctk_button.py", line 554, in _clicked
self._command()
File "labelmakr.py", line 338, in
command=lambda: self.run_sofa(
File "labelmakr.py", line 552, in run_sofa
x = threading.Thread(target=sofa_func.infer_sofa(ckpt, dictionary, self.op_cmbo.get(), self.matmul_var.get(), self.lang_cmbo.get(), g2p_bool, g2p_model, g2p_cfg,))
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031.\sofa_func.py", line 66, in infer_sofa
dataset = grapheme_to_phoneme.get_dataset(P('corpus').rglob('
.wav'))
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031./SOFA\modules\g2p\base_g2p.py", line 58, in get_dataset
raise e
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031./SOFA\modules\g2p\base_g2p.py", line 54, in get_dataset
ph_seq, word_seq, ph_idx_to_word_idx = self(lab_text)
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031./SOFA\modules\g2p\base_g2p.py", line 33, in call
ph_seq, word_seq, ph_idx_to_word_idx = self._g2p(text)
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031./SOFA\modules\g2p\oov_g2p.py", line 46, in _g2p
phones = self.get_oov(word)
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031./SOFA\modules\g2p\oov_g2p.py", line 32, in get_oov
return self.g2p_model.predict_str(word)
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031.\models\g2p_model.py", line 155, in predict_str
tgt = self.predict(src)
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031.\models\g2p_model.py", line 133, in predict
mem = self.encoder(src)
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031\python\Lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031\python\Lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031.\models\g2p_model.py", line 57, in forward
x = self.emb(input)
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031\python\Lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031\python\Lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031\python\Lib\site-packages\torch\nn\modules\sparse.py", line 164, in forward
return F.embedding(
File "C:\Users\Usuario\Downloads\LabelMakr_v031\LabelMakr_v031\python\Lib\site-packages\torch\nn\functional.py", line 2267, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Error when processing corpus\01_5.wav: Expected tensor for argument #1 'indices' to have one of the following scalar types: Long, Int; but got torch.FloatTensor instead (while checking arguments for embedding)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions