huggingface / speechbox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with: ASR With Speaker Diarization Example

bramdes opened this issue · comments

running into lib version issues on Google colab

Reproduce

  • open Google colab (with GPU instance)
    -run:
 !pip install --upgrade transformers pyannote.audio
!pip install speechbox
!pip install --upgrade datasets


import torch
from speechbox import ASRDiarizationPipeline
from datasets import load_dataset

device = "cuda:0" if torch.cuda.is_available() else "cpu"
pipeline = ASRDiarizationPipeline.from_pretrained("openai/whisper-tiny", device=device)

# load dataset of concatenated LibriSpeech samples
concatenated_librispeech = load_dataset("sanchit-gandhi/concatenated_librispeech", split="train", streaming=True)
# get first sample
sample = next(iter(concatenated_librispeech))

out = pipeline(sample["audio"])
print(out)

Error


OSError                                   Traceback (most recent call last)
[<ipython-input-2-28ff1705801a>](https://localhost:8080/#) in <cell line: 2>()
      1 import torch
----> 2 from speechbox import ASRDiarizationPipeline
      3 from datasets import load_dataset
      4 
      5 device = "cuda:0" if torch.cuda.is_available() else "cpu"

17 frames
[/usr/lib/python3.9/ctypes/__init__.py](https://localhost:8080/#) in __init__(self, name, mode, handle, use_errno, use_last_error, winmode)
    372 
    373         if handle is None:
--> 374             self._handle = _dlopen(self._name, mode)
    375         else:
    376             self._handle = handle

OSError: /usr/local/lib/python3.9/dist-packages/torchtext/lib/libtorchtext.so: undefined symbol: _ZN2at4_ops10select_int4callERKNS_6TensorElN3c106SymIntE

Hey, facing the same issue. @hbredin

Hey, I was able to resolve it. Have a look at the below link. This should solve the issue,

https://github.com/pranavtushar/Colab/blob/main/install_pyannote_audio_colab.ipynb

Thanks @pranavtushar . that fixed the problem indeed!