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

VAD causes error #440

Closed
xevidos opened this issue Jan 3, 2025 · 3 comments
Closed

VAD causes error #440

xevidos opened this issue Jan 3, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@xevidos
Copy link
Contributor

xevidos commented Jan 3, 2025

Which OS are you using?

  • OS: Linux Docker

When enabling VAD I get the following error:

Error transcribing file: '<' not supported between instances of 'float' and 'NoneType'
Traceback (most recent call last):
File "/data/.venv/lib/python3.11/site-packages/gradio/queueing.py", line 625, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/.venv/lib/python3.11/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 2047, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 1594, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/data/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/.venv/lib/python3.11/site-packages/gradio/utils.py", line 869, in wrapper
response = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/data/config/modules/whisper/base_transcription_pipeline.py", line 229, in transcribe_file
transcribed_segments, time_for_task = self.run(
^^^^^^^^^
File "/data/config/modules/whisper/base_transcription_pipeline.py", line 141, in run
vad_processed, speech_chunks = self.vad.run(
^^^^^^^^^^^^^
File "/data/config/modules/vad/silero_vad.py", line 58, in run
speech_chunks = self.get_speech_timestamps(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/config/modules/vad/silero_vad.py", line 160, in get_speech_timestamps
if (speech_prob < neg_threshold) and triggered:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'float' and 'NoneType'

@xevidos xevidos added the bug Something isn't working label Jan 3, 2025
@xevidos
Copy link
Contributor Author

xevidos commented Jan 3, 2025

After looking into this, it looks to me like the neg_threshold isn't set, perhaps a fallback should be added? Or a default value into the config file?

Old fallback?
if vad_options.neg_threshold is None: vad_options.neg_threshold = threshold - 0.15

@jhj0517
Copy link
Owner

jhj0517 commented Jan 3, 2025

Hi, Thanks for reporting this! I was able to reproduce the same.
I'm installing faster-whisper from source code because of #424 (comment),

It was probably caused by new source codes updates.
I guess it's time to use the fixed version now, faster-whisper==1.1.1, which was released 2 days ago.

@jhj0517
Copy link
Owner

jhj0517 commented Jan 3, 2025

Fixed in #441.
Thanks for noticing @xevidos, please feel free to reopen if the problem persists.

@jhj0517 jhj0517 closed this as completed Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants