Skip to content

Commit d97cf53

Browse files
committed
whisper import
1 parent 52e2fd6 commit d97cf53

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

npcsh/shell_helpers.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,20 @@
2424
import signal
2525
import time
2626

27-
import whisper
2827

28+
try:
29+
import whisper
30+
except:
31+
print(
32+
"Could not load the whisper package. If you want to use tts/stt features, please run `pip install npcsh[audio]` and follow the instructions in the npcsh github readme to ensure your OS can handle the audio dependencies."
33+
)
2934
try:
3035
from sentence_transformers import SentenceTransformer
3136
except:
32-
print("Could not load the sentence-transformers package.")
37+
38+
print(
39+
"Could not load the sentence-transformers package. If you want to use it or other local AI features, please run `pip install npcsh[local]` ."
40+
)
3341

3442
from .load_data import load_pdf, load_csv, load_json, load_excel, load_txt, load_image
3543
from .npc_sysenv import (

0 commit comments

Comments
 (0)