Onnxruntime-Paket fehlt bei Silero-VadPython

Python-Programme
Anonymous
 Onnxruntime-Paket fehlt bei Silero-Vad

Post by Anonymous »

Wenn ich Silero-Vad verwende, um das Rauschen für mein schnelleres Whisper-Modell zu reduzieren, meldet es den folgenden Fehler: < /p>

Code: Select all

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
File d:\anaconda3\envs\whisper_env\Lib\site-packages\faster_whisper\vad.py:258, in SileroVADModel.__init__(self, encoder_path, decoder_path)
257 try:
--> 258     import onnxruntime
259 except ImportError as e:

File d:\anaconda3\envs\whisper_env\Lib\site-packages\onnxruntime\__init__.py:61
60 if import_capi_exception:
---> 61     raise import_capi_exception
63 from onnxruntime.capi.onnxruntime_inference_collection import (
64     AdapterFormat,  # noqa: F401
65     InferenceSession,  # noqa: F401
(...)
69     SparseTensor,  # noqa: F401
70 )

File d:\anaconda3\envs\whisper_env\Lib\site-packages\onnxruntime\__init__.py:24
23 try:
---> 24     from onnxruntime.capi._pybind_state import (
25         ExecutionMode,  # noqa: F401
26         ExecutionOrder,  # noqa: F401
27         GraphOptimizationLevel,  # noqa: F401
28         LoraAdapter,  # noqa: F401
29         ModelMetadata,  # noqa: F401
...
262     ) from e
264 opts = onnxruntime.SessionOptions()
265 opts.inter_op_num_threads = 1

RuntimeError: Applying the VAD filter requires the onnxruntime package
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
< /code>
Sie finden meinen Code unten: < /p>
from faster_whisper import WhisperModel
model = WhisperModel("../ctranslate2_models/faster-whisper-medium", device="cuda")
segments, info = model.transcribe(
"source.wav",
language="zh",
vad_filter=True,
vad_parameters=dict(min_silence_duration_ms=500),
)
for segment in segments:
print(f"[{segment.start:.2f}s -> {segment.end:.2f}s] {segment.text}")
< /code>
Ich habe meine Conda Env überprüft und die folgenden Pakete gefunden: < /p>
(whisper_env) C:\Users\xxx>conda list onnx
# packages in [url=viewtopic.php?t=25360]environment[/url] at D:\anaconda3\envs\whisper_env:
#
# Name                    Version                   Build  Channel
onnx                      1.17.0                   pypi_0    pypi
onnxruntime               1.21.0                   pypi_0    pypi
onnxruntime-gpu           1.21.1                   pypi_0    pypi
Es scheint, dass ich die ONNX -Pakete bereits heruntergeladen habe und auch Microsoft Visual C ++ Neuverteilbares neueste unterstützte installiert habe, wie Chatgpt vorgeschlagen. Warum meldet mein Code immer noch einen Fehler?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post