Diarization Error not yet Solved
#1
by
CJJ-on-HF
- opened
I checked "Diarization" and hit "Submit" button. Soon an error occurred in log:
Diarizing /tmp/3d44f24e98efb25d2163ee3ad5662587a9e228ed/轨道 1_064.wav
Created diarization context with auto cleanup timeout of 60 seconds
Loading diarization model from cache
Started auto cleanup of pool in 60 seconds
Deleting source file /tmp/3d44f24e98efb25d2163ee3ad5662587a9e228ed/轨道 1_064.wav
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/user/app/src/diarization/diarizationContainer.py", line 55, in execute
model = self.get_model()
File "/home/user/app/src/diarization/diarizationContainer.py", line 48, in get_model
self.model = self.cache.get("diarization", lambda : Diarization(self.auth_token))
File "/home/user/app/src/modelCache.py", line 9, in get
result = model_factory()
File "/home/user/app/src/diarization/diarizationContainer.py", line 48, in <lambda>
self.model = self.cache.get("diarization", lambda : Diarization(self.auth_token))
File "/home/user/app/src/diarization/diarization.py", line 33, in __init__
raise ValueError("No HuggingFace API Token provided - please use the --auth_token argument or set the HK_ACCESS_TOKEN environment variable")
ValueError: No HuggingFace API Token provided - please use the --auth_token argument or set the HK_ACCESS_TOKEN environment variable
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1075, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 882, in call_function
prediction = await fn(*processed_input)
File "/home/user/app/app.py", line 134, in transcribe_webui_simple_progress
return await self.transcribe_webui(modelName, languageName, urlData, multipleFiles, microphoneData, task, vadOptions,
File "/home/user/app/app.py", line 282, in transcribe_webui
result = self.transcribe_file(model, source.source_path, selectedLanguage, task, vadOptions, scaled_progress_listener, **decodeOptions)
File "/home/user/app/app.py", line 413, in transcribe_file
result = self._handle_diarization(audio_path, result)
File "/home/user/app/app.py", line 419, in _handle_diarization
diarization_result = list(self.diarization.run(audio_path, **self.diarization_kwargs))
File "/home/user/app/src/diarization/diarizationContainer.py", line 30, in run
result = pool.apply(self.execute, (audio_file,), kwargs)
File "/usr/local/lib/python3.10/multiprocessing/pool.py", line 360, in apply
return self.apply_async(func, args, kwds).get()
File "/usr/local/lib/python3.10/multiprocessing/pool.py", line 774, in get
raise self._value
ValueError: No HuggingFace API Token provided - please use the --auth_token argument or set the HK_ACCESS_TOKEN environment variable
Executing cleanup of pool
Stopped auto cleanup of pool
Closing pool of 1 processes
The error seemed to be related to the gated repository of (pyannote/speaker-diarization)[https://huggingface.co/pyannote/speaker-diarization]. I granted permission to this repo and further experimented with a duplicate version, passing my auth token to HK_ACCESS_TOKEN secret. Unfortunately, all attempts failed even with write access auth token. The error message insisted that I should offer an auth token, which I thought I've done enough.
Does anyone have a solution?