diff --git a/voicebot/set_whisper_debug.py b/voicebot/set_whisper_debug.py index 1aa61ac..77902e4 100644 --- a/voicebot/set_whisper_debug.py +++ b/voicebot/set_whisper_debug.py @@ -8,8 +8,12 @@ import logging import sys import os -# Add the voicebot directory to the path -sys.path.append(os.path.dirname(os.path.abspath(__file__))) +# Add the project root (parent of the voicebot directory) to sys.path so +# imports like `from shared import ...` work when running this script from +# inside the `voicebot` container. +project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +if project_root not in sys.path: + sys.path.append(project_root) from shared.logger import logger