sunxy 1 rok pred
rodič
commit
e3132ed2b1
2 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 2 2
      requirements.txt
  2. 1 1
      whisper_asr.py

+ 2 - 2
requirements.txt

@@ -1,10 +1,10 @@
 pyodps
 moviepy
 requests
-openai_whisper
 zhconv
 oss2
 pandas
 aliyun_python_sdk
+aliyun-log-python-sdk
 odps
-git+https://github.com/openai/whisper.git
+whisper

+ 1 - 1
whisper_asr.py

@@ -4,7 +4,7 @@ from zhconv import convert
 
 def get_whisper_asr(audio, model='medium'):
     try:
-        model = whisper.load_model(model)
+        model = whisper.load_model(model, device='cuda')
         result = model.transcribe(audio, language='Chinese')
         # 简繁转换
         # zh-cn 大陆简体