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

libsndfile Error #42

Closed
gusanmaz opened this issue Aug 23, 2023 · 9 comments
Closed

libsndfile Error #42

gusanmaz opened this issue Aug 23, 2023 · 9 comments

Comments

@gusanmaz
Copy link

gusanmaz commented Aug 23, 2023

I first cloned the repo and then created a conda environment.

Afterwards I ran following two commands as stated in Installation Section:

pip install .
conda install -y -c conda-forge libsndfile

Installation completes without and error. However if I run following code:

python3 scripts/m4t/predict/predict.py "Teknolojiyi merkezine alan yenilikçi yapımızla hayatını kolaylaştırmaya devam ediyoruz." t2tt eng --src_lang tur

I get following output:

Traceback (most recent call last):
  File "/home/guvenc/seamless_communication/scripts/m4t/predict/predict.py", line 10, in <module>
    from seamless_communication.models.inference import Translator
  File "/home/guvenc/.local/lib/python3.10/site-packages/seamless_communication/models/inference/__init__.py", line 6, in <module>
    from seamless_communication.models.inference.translator import Translator as Translator
  File "/home/guvenc/.local/lib/python3.10/site-packages/seamless_communication/models/inference/translator.py", line 12, in <module>
    from fairseq2.data import Collater
  File "/home/guvenc/.local/lib/python3.10/site-packages/fairseq2/data/__init__.py", line 7, in <module>
    from fairseq2.data.cstring import CString as CString
  File "/home/guvenc/.local/lib/python3.10/site-packages/fairseq2/data/cstring.py", line 58, in <module>
    from fairseq2n.bindings.data.string import CString as CString
  File "/home/guvenc/.local/lib/python3.10/site-packages/fairseq2n/__init__.py", line 90, in <module>
    _load_sndfile()
  File "/home/guvenc/.local/lib/python3.10/site-packages/fairseq2n/__init__.py", line 80, in _load_sndfile
    raise OSError(
OSError: libsndfile is not found!. Use your system package manager to install it (e.g. `apt install libsndfile1`).

I use Ubuntu based Pop!_OS.

sudo apt install libsndfile1 outputs:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libsndfile1 is already the newest version (1.0.31-2build1).
The following packages were automatically installed and are no longer required:
  golang-1.18-go golang-1.18-src golang-src
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 250 not upgraded.

Installing libsndfile (https://github.com/libsndfile/libsndfile) from source didn't help either.

I wonder what I might be doing wrong.
Thanks!

@ChrisShaoMeng
Copy link

+1 Same error.

@cbalioglu
Copy link
Contributor

@gusanmaz if you have been able to install libsndfile via your system package manager, could you please try to install seamless_communication in a regular Python virtual environment (i.e. no Conda)?

@ChrisShaoMeng
Copy link

@gusanmaz if you have been able to install libsndfile via your system package manager, could you please try to install seamless_communication in a regular Python virtual environment (i.e. no Conda)?

It works for me, thanks!

@cgalisteo-stratio
Copy link

@gusanmaz if you have been able to install libsndfile via your system package manager, could you please try to install seamless_communication in a regular Python virtual environment (i.e. no Conda)?

That was the solution for me. I was getting that error using a conda environment, but now it's working with a regular virtualenv.

@gusanmaz
Copy link
Author

Thank you for the advice @cbalioglu.

This time I am getting ERROR: Could not find a version that satisfies the requirement fairseq2n==0.1.0 (from fairseq2) (from versions: none) ERROR: No matching distribution found for fairseq2n==0.1.0 message during installation. It appears like same issue has already been reported under fairseq2 issues: facebookresearch/fairseq2#1 .

I am able to install and run seamless_communication without using conda environment on my another less powerful machine with same OS with no libsndfile error. I am getting CUDA out of memory error. This machine has only 4GB vram whereas the other one has 12GB vram.

@gusanmaz
Copy link
Author

I solved the problem. It now works in 12GB vram machine with big model and 4GB vram machine with medium model.

@cbalioglu
Copy link
Contributor

@gusanmaz glad to hear! Closing this issue. Let us know if you experience another problem.

@shashank-neuralgarage
Copy link

I solved the problem. It now works in 12GB vram machine with big model and 4GB vram machine with medium model.

Can you share what worked for you?

@milo157
Copy link

milo157 commented Aug 28, 2023

I solved the problem. It now works in 12GB vram machine with big model and 4GB vram machine with medium model.

Can you share what worked for you?

Funny enough making sure I did a conda install of it. You can see my code here deploying it on Cerebrium: https://github.com/CerebriumAI/examples/tree/master/19-meta-seamless

cndn pushed a commit that referenced this issue Dec 7, 2023
…r. (#42)

* Make SC compatible with Transformer Encoder API change.

* Introduce wav2vec2_chunk offline streaming-compatible speech encoder.

* Make depthwise convolution causal, within Conformer convolution module.

* Add an asset and arch for m4t_v2_s2t.

* Change variable names to be compatible with fairseq2 changes.

* Refactor wav2vec2 encoder config, address comments.

* Specify pos_encoder_type for wav2vec2_chunk_arch.
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

6 participants