mirror of
https://github.com/gpt-omni/mini-omni
synced 2025-06-26 18:16:26 +00:00
Merge pull request #1 from Aaron-genai-superdev/add-sys-path-fix
[Update omni_streamlit.py]:Fix: Add sys.path to omni_streamlit.py for correct utils import(checked)
This commit is contained in:
@@ -13,6 +13,13 @@ import tempfile
|
||||
import librosa
|
||||
import traceback
|
||||
from pydub import AudioSegment
|
||||
import sys
|
||||
|
||||
# 获取项目的根目录
|
||||
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||
# 将项目根目录添加到 sys.path
|
||||
sys.path.append(project_root)
|
||||
|
||||
from utils.vad import get_speech_timestamps, collect_chunks, VadOptions
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user