Spaces:
Running
on
Zero
Running
on
Zero
File size: 427 Bytes
627d3d7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import os
from modules.utils.constants import ROOT_DIR
import logging
logger = logging.getLogger(__name__)
def setup_ffmpeg_path():
ffmpeg_path = os.path.join(ROOT_DIR, "ffmpeg")
os.environ["PATH"] = ffmpeg_path + os.pathsep + os.environ["PATH"]
import pydub.utils
if pydub.utils.which("ffmpeg") is None:
logger.error("ffmpeg not found in PATH")
raise Exception("ffmpeg not found in PATH")
|