collabora / WhisperLive

A nearly-live implementation of OpenAI's Whisper.
MIT License
2.09k stars 283 forks source link

运行服务器没反应,客户端运行后只输出:[INFO]: * recording #202

Open Jacoo520 opened 7 months ago

Jacoo520 commented 7 months ago

我在尝试windows系统下操作。 服务器运行命令: python run_server.py --port 9090 --backend faster_whisper

客户端代码:

from whisper_live.client import TranscriptionClient
client = TranscriptionClient(
  "localhost",
  9090,
  lang="en",
  translate=False,
  model="small",
  use_vad=False,
)

客户端输出日志:

PS D:\PY> & D:/anaconda3/envs/whisper/python.exe d:/PY/111py.py
[INFO]: * recording
PS D:\PY> 

安装PyAudio:pip install PyAudio,版本号:0.2.14 ffmpeg安装:https://www.ffmpeg.org/download.html python:Python 3.8.19 torch:2.2.2+cu118 whisper-live:0.4.1 faster-whisper:1.0.1

makaveli10 commented 6 months ago

@Jacoo520 I have been able to run on Windows without any issues. Were you able to resolve the issue?

laughman233 commented 4 months ago

我解决了 import argparse import os os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE' os.environ['OMP_NUM_THREADS'] = '4' if name == "main":

laughman233 commented 4 months ago

并且你还需要在客户端加入以下代码

Start the transcription process

try: client() except Exception as e: print(f"An error occurred: {e}")