Диаризизация шепота без модуля с именем «Юлиус»Python

Программы на Python
Ответить Пред. темаСлед. тема
Anonymous
 Диаризизация шепота без модуля с именем «Юлиус»

Сообщение Anonymous »


I am trying to get this python file to run which takes an mp3 file and converts it to text with unique speaker ID's:

import whisperx import gc device ="cuda" batch_size = 32 compute_type = "float16" audio_file = "MEGA64 PODCAST 483.mp3" audio = whisperx.load_audio(audio_file) model = whisperx.load_model("large-v2", device, compute_type=compute_type) result = model.transcribe(audio, batch_size=batch_size) print(result["segments"]) model_a, metadata = whisperx.load_align_model(language_code=result["language"], device=device) result = whisperx.align(result["segments"], model_a, metadata, audio, device, return_char_alignments=False) # https://huggingface.co/settings/tokens # new read token HUGGING_FACE_TOKEN="xxxx" diarize_model = whisperx.DiarizationPipeline(use_auth_token=HUGGING_FACE_TOKEN, device=device) diarize_segments = diarize_model(audio, min_speakers=2, max_speakers=2) print(diarize_segments) print(diarize_segments.speaker.unique()) result = whisperx.assign_word_speakers(diarize_segments, result) print(diarize_segments) print(result["segments"]) # segments area now assigned speaker IDs I am using a python3 virtual env, so when I activate it, and try to run my above script with python ex.py I get this error output:

(venv_name) C:\Users\martin\Documents\projects\diarisation\Test2>python ex.py C:\Users\martin\Documents\projects\diarisation\venv_name\Lib\site-packages\pyannote\audio\core\io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call. torchaudio.set_audio_backend("soundfile") Traceback (most recent call last): File "C:\Users\martin\Documents\projects\diarisation\Test2\ex.py", line 1, in import whisperx File "C:\Users\martin\Documents\projects\diarisation\venv_name\Lib\site-packages\whisperx\__init__.py", line 1, in from .transcribe import load_model File "C:\Users\martin\Documents\projects\diarisation\venv_name\Lib\site-packages\whisperx\transcribe.py", line 10, in from .asr import load_model File "C:\Users\martin\Documents\projects\diarisation\venv_name\Lib\site-packages\whisperx\asr.py", line 13, in from .vad import load_vad_model, merge_chunks File "C:\Users\martin\Documents\projects\diarisation\venv_name\Lib\site-packages\whisperx\vad.py", line 9, in from pyannote.audio import Model File "C:\Users\martin\Documents\projects\diarisation\venv_name\Lib\site-packages\pyannote\audio\__init__.py", line 29, in from .core.inference import Inference File "C:\Users\martin\Documents\projects\diarisation\venv_name\Lib\site-packages\pyannote\audio\core\inference.py", line 37, in from pyannote.audio.core.model import Model, Specifications File "C:\Users\martin\Documents\projects\diarisation\venv_name\Lib\site-packages\pyannote\audio\core\model.py", line 47, in from pyannote.audio.core.task import ( File "C:\Users\martin\Documents\projects\diarisation\venv_name\Lib\site-packages\pyannote\audio\core\task.py", line 40, in from torch_audiomentations import Identity File "C:\Users\martin\Documents\projects\diarisation\venv_name\Lib\site-packages\torch_audiomentations\__init__.py", line 2, in from .augmentations.band_pass_filter import BandPassFilter File "C:\Users\martin\Documents\projects\diarisation\venv_name\Lib\site-packages\torch_audiomentations\augmentations\band_pass_filter.py", line 1, in import julius ModuleNotFoundError: No module named 'julius' (venv_name) C:\Users\martin\Documents\projects\diarisation\Test2> After seeing the error No module named 'julius' I try to install it with pip install julius, and confirm it's installed with pip freeze > requirements.txt which shows julius==0.2.7, but running the script again results in the same exact error with no change, as if julius is still not installed.

How do I fix this julius error to unblock my script from running?


Источник: https://stackoverflow.com/questions/780 ... med-julius
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Python»