Open underdogliu opened 2 months ago
Hey @underdogliu, to solve this issue, either place code file where you are using "speechbrain" inside "speechbrain" folder cloned from Github or simply change from speechbrain.inference.separation import SepformerSeparation as separator
to from speechbrain.speechbrain.inference.separation import SepformerSeparation as separator
and similar changes to every import you are doing.
The issue is arising because "inference" folder is present in such path: speechbrain>speechbrain>inference
. Please let me know if this solves your issue.
@asumagic this has been fixed in 1.0.1, right?
@asumagic this has been fixed in 1.0.1, right?
No, unrelated. As hinted above, I think the problem is just that the setup for this colab makes it so that a speechbrain
directory is cloned in the working directory. When Python then tries to import it, the environment's speechbrain
package path /foo/bar/speechbrain/speechbrain/
is shadowed by the local directory, i.e. /foo/bar/speechbrain/
.
This is just a Python quirk, and I don't think it's a SB bug, rather just wrong commands in the colab that should be fixed. I would be surprised if it ever worked.
... We could maybe detect this situation by adding an __init__.py
to the main repo that would just error out with a hint, but that could be a source of confusion for whoever checks the repo and might have unintended consequences.
Describe the bug
I am now trying to call the Sepformer based on this tutorial from Hugging Face. But after installing the toolkit according to the instruction, seems like it cannot be properly run.
Expected behaviour
After running the script according to the instruction, speechbrain.inference cannot be properly called with simple error
To Reproduce
On Colab, first run
Then run
Environment Details
Google colab default environment Speechbrain version: 1.0.0 (installed from source)
Relevant Log Output
No response
Additional Context
No response