collabora / WhisperLive

A nearly-live implementation of OpenAI's Whisper.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on client() line

alextong1010 opened this issue · comments

commented

Running client() gives me:

[INFO]: Waiting for server ready ...
[INFO]: Server Ready!
Connection is already closed.

AttributeError Traceback (most recent call last)
Cell In[2], line 1
----> 1 client()

File ~/Desktop/WhisperLive/whisper_live/client.py:537, in TranscriptionClient.call(self, audio, hls_url)
535 self.client.play_file(resampled_file)
536 else:
--> 537 self.client.record()

File ~/Desktop/WhisperLive/whisper_live/client.py:429, in Client.record(self, out_file)
427 self.frames = b""
428 if self.server_backend == "faster_whisper":
--> 429 self.write_srt_file(self.srt_file_path)
431 except KeyboardInterrupt:
432 if len(self.frames):

File ~/Desktop/WhisperLive/whisper_live/client.py:482, in Client.write_srt_file(self, output_path)
481 def write_srt_file(self, output_path="output.srt"):
--> 482 self.transcript.append(self.last_segment)
483 utils.create_srt_file(self.transcript, output_path)

AttributeError: 'Client' object has no attribute 'last_segment'

My terminal, on the other hand, shows this:

OMP: Error #15: Initializing libiomp5.dylib, but found libiomp5.dylib already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.
zsh: abort python3 run_server.py --port 9090 --backend faster_whisper
(venv) (base) me@me WhisperLive % /Users/me/opt/anaconda3/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '

Hello, I see that you are trying to run WhisperLive with microphone.
Does the audio file get transcribed as expected?

Hello, I see that you are trying to run WhisperLive with microphone. Does the audio file get transcribed as expected?
Actually,NO. I encounter same problem when i try to translate audio file by using case in doc with client("path/to/my_wav")

commented

Hello, I see that you are trying to run WhisperLive with microphone. Does the audio file get transcribed as expected?

Nope, its the same error. I tried running conda install nomkl in the terminal, but that ran into a bunch of issues itself.