Parcourir la source

non verbose wget

subDesTagesMitExtraKaese il y a 1 an
Parent
commit
f2312f3faa
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      Dockerfile
  2. 1 1
      speech_recognition.py

+ 1 - 1
Dockerfile

@@ -34,6 +34,6 @@ ADD ./*.py /app/
 
 ARG PRELOAD_MODEL
 ENV PRELOAD_MODEL ${PRELOAD_MODEL}
-RUN if [ -n "$PRELOAD_MODEL" ]; then wget "https://ggml.ggerganov.com/ggml-model-whisper-$PRELOAD_MODEL.bin"; fi
+RUN if [ -n "$PRELOAD_MODEL" ]; then wget -nv "https://ggml.ggerganov.com/ggml-model-whisper-$PRELOAD_MODEL.bin"; fi
 
 CMD ["python3", "-u", "main.py"]

+ 1 - 1
speech_recognition.py

@@ -65,7 +65,7 @@ class ASR():
   def load_model(self):
     if not os.path.exists(self.model_path) or os.path.getsize(self.model_path) == 0:
       print("Downloading model...")
-      subprocess.run(["wget", self.model_url, "-O", self.model_path], check=True)
+      subprocess.run(["wget", "-nv", self.model_url, "-O", self.model_path], check=True)
       print("Done.")
 
   async def transcribe(self, audio: bytes) -> str: