Replies: 2 comments 1 reply
-
Hi, We encountered similar problems when running VAD with multiple threads / processes. Please make sure that:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi @snakers4 , I've been able to suppress the warning by: However, it would be fantastic for many users if you can confirm that the warning messages above won't cause any performance issue or affect the accuracy of the Silero-VAD model? Thanks, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear Alexander,
I used the example code in silero-vad.ipynb as a guide and applied the silero-vad model to process files sequentially as shown below. I've observed a gradual slowdown in processing speed after each file is completed. To investigate, I queued several identical files. The first file processed returned speech timestamps in about 20 minutes, but as more files were handled, the same file took 2-3 hours to process for timestamps. Could this raise the question of a potential memory leak within the model's library? Are there any methods available to free up resources?
Best regards,
Jun
code in a nutshell:
import torch
torch.set_num_threads(1)
from IPython.display import Audio
from pprint import pprint
SAMPLING_RATE = 16000
USE_ONNX = False
model, utils = torch.hub.load(repo_or_dir='snakers4/silero-vad',
model='silero_vad',
force_reload=True,
onnx=USE_ONNX)
(get_speech_timestamps,
save_audio,
read_audio,
VADIterator,
collect_chunks) = utils
def process_audio(file_queue_manager)
wav = read_audio(file_queue_manager.getfile(), sampling_rate=SAMPLING_RATE)
# get speech timestamps from full audio file
speech_timestamps = get_speech_timestamps(wav, model, sampling_rate=SAMPLING_RATE)
# use speech_timestamps for further process
if name == "main":
# Start consumer thread
consumer_thread = threading.Thread(target=process_audio, args=(file_queue_manager,))
consumer_thread.daemon = True
consumer_thread.start()
Beta Was this translation helpful? Give feedback.
All reactions