aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bazarr/init.py2
-rw-r--r--bazarr/subsyncer.py7
-rw-r--r--requirements.txt1
3 files changed, 8 insertions, 2 deletions
diff --git a/bazarr/init.py b/bazarr/init.py
index 21c0cc2cc..bd4ad882d 100644
--- a/bazarr/init.py
+++ b/bazarr/init.py
@@ -47,7 +47,7 @@ import logging
# deploy requirements.txt
if not args.no_update:
try:
- import lxml, numpy
+ import lxml, numpy, webrtcvad
except ImportError:
try:
import pip
diff --git a/bazarr/subsyncer.py b/bazarr/subsyncer.py
index 780b24f90..7910956d8 100644
--- a/bazarr/subsyncer.py
+++ b/bazarr/subsyncer.py
@@ -16,7 +16,12 @@ class SubSyncer:
self.srtout = None
self.ffmpeg_path = None
self.args = None
- self.vad = 'subs_then_auditok'
+ try:
+ import webrtcvad
+ except ImportError:
+ self.vad = 'subs_then_auditok'
+ else:
+ self.vad = 'subs_then_webrtc'
self.log_dir_path = os.path.join(args.config_dir, 'log')
def sync(self, video_path, srt_path, srt_lang, media_type, sonarr_series_id=None, sonarr_episode_id=None,
diff --git a/requirements.txt b/requirements.txt
index e0b3a30c6..983acb62e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,3 @@
lxml>=4.3.0
numpy>=1.12.0
+webrtcvad-wheels>=2.0.10 \ No newline at end of file