AIWintermuteAI / WhisperLive

A nearly-live implementation of OpenAI's Whisper.
MIT License
20 stars 8 forks source link

TypeError: TranscriptionClient.__init__() got an unexpected keyword argument 'callback' #5

Open ChristianFariolen opened 1 month ago

ChristianFariolen commented 1 month ago

I ran into an issue when executing the example_client.py, it would throw this error:

` $ python examples/example_client.py

Traceback (most recent call last): File "/home/rpi/WhisperLive/examples/example_client.py", line 26, in client = TranscriptionClient( ^^^^^^^^^^^^^^^^^^^^ TypeError: TranscriptionClient.init() got an unexpected keyword argument 'callback' ` Using the following versions:

garfunnck commented 1 month ago

@AIWintermuteAI I ran into a similar problem how do i solve this? I appreciate the help

AIWintermuteAI commented 1 month ago

How are you installing WhisperLive? You should make sure you pip install my fork and not the upstream.

ChristianFariolen commented 1 month ago

I'll just drop the commands that I've issued through the terminal, following your procedure from your youtube channel:

Whisper Live Installation

sudo apt-get update && sudo apt-get upgrade python -m venv venvs/whisper source venvs/whisper/bin/activate git clone https://github.com/AIWintermuteAI/WhisperLive.git cd WhisperLive/ pip install -e . pip install piper-tts pip install "numpy<2.0"

python3 run_server.py --port 9090 \ --backend faster_whisper

New terminal session for the client

source venvs/whisper/bin/activate cd WhisperLive/ python examples/example_client.py

ChristianFariolen commented 1 month ago

Oops my bad mistakenly clicked the closed button

AIWintermuteAI commented 1 month ago

Interesting. I'll take a look this week.

garfunnck commented 1 month ago

@AIWintermuteAI appreciate it!

AIWintermuteAI commented 1 month ago

Cannot reproduce this on my side, it still looks like you have some other installation of WhisperLive on your system, which for some reason is what gets picked during the import. You can try

(whisper) ubuntu@ubuntu-laptop:~/github/WhisperLive$ pip show whisper_live
Name: whisper-live
Version: 0.4.1
Summary: A nearly-live implementation of OpenAI's Whisper.
Home-page: https://github.com/collabora/WhisperLive
Author: Collabora Ltd
Author-email: vineet.suryan@collabora.com
License: MIT
Location: /home/ubuntu/github/WhisperLive
Editable project location: /home/ubuntu/github/WhisperLive
Requires: faster-whisper, ffmpeg-python, kaldialign, numba, onnxruntime, openai-whisper, PyAudio, scipy, soundfile, torch, torchaudio, websocket-client, websockets
Required-by: 

Location: /home/ubuntu/github/WhisperLive This shows the location of the installed package.

You can also search for whisper_live on your system and see if there are multiple ones installed.