Comments (8)
My exact same script running the previous commit before Pandas update works still.
from whisperx.
This wav reproduces the error.
https://huggingface.co/speechbrain/asr-crdnn-rnnlm-librispeech/resolve/main/example.wav
Using pandas 1.5.3.
from whisperx.
@sawadata thank you!
Hmm should work now 5b8c8a7
Let me know
from whisperx.
Same issue as in #49
This is because you are running on very short audio file. I will fix this bug when I have time but for now just use longer audio (its not really designed for 3s audio anyway)
from whisperx.
Thank you, reverted to old commit in default branch now. I will work on these experimental changes till its working fully
from whisperx.
whisperX/whisperx/alignment.py
Line 293 in 7f2159a
I added
group_keys=True
to the above line like this:
per_seg_grp = char_segments_arr.groupby(["segment-idx", "subsegment-idx"], as_index = False, group_keys=True)
And the error disappeared.
from whisperx.
@m-bain
Thank you for your correction.
I tried the latest version.
Unfortunately the exception still reproduces.
May be because 'level_1' is remaining?
(venv) ai-ubuntu@ai-ubuntu:~/git/tmp/whisperx$ whisperx --language=en example.wav
Performing transcription...
[00:00.000 --> 00:03.280] The birch canoe slid on the smooth planks.
Performing alignment...
/home/ai-ubuntu/git/tmp/whisperx/venv/lib/python3.8/site-packages/whisperx/alignment.py:294: FutureWarning: Not prepending group keys to the result index of transform-like apply. In the future, the group keys will be included in the index, regardless of whether the applied function returns a like-indexed object.
To preserve the previous behavior, use
>>> .groupby(..., group_keys=False)
To adopt the future behavior and silence this warning, use
>>> .groupby(..., group_keys=True)
char_segments_arr = per_seg_grp.apply(lambda x: x.reset_index(drop = True)).reset_index()
Traceback (most recent call last):
File "/home/ai-ubuntu/git/tmp/whisperx/venv/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3802, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 165, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 5745, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 5753, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'level_1'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ai-ubuntu/git/tmp/whisperx/venv/bin/whisperx", line 11, in <module>
load_entry_point('whisperx==1.0', 'console_scripts', 'whisperx')()
File "/home/ai-ubuntu/git/tmp/whisperx/venv/lib/python3.8/site-packages/whisperx/transcribe.py", line 470, in cli
result_aligned = align(result["segments"], align_model, align_metadata, audio_path, device,
File "/home/ai-ubuntu/git/tmp/whisperx/venv/lib/python3.8/site-packages/whisperx/alignment.py", line 384, in align
cseg['segment-text-start'] = cseg['level_1']
File "/home/ai-ubuntu/git/tmp/whisperx/venv/lib/python3.8/site-packages/pandas/core/frame.py", line 3807, in __getitem__
indexer = self.columns.get_loc(key)
File "/home/ai-ubuntu/git/tmp/whisperx/venv/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3804, in get_loc
raise KeyError(key) from err
KeyError: 'level_1'
from whisperx.
@m-bain I am still getting this error. I supplied a 30seconds audio
from whisperx.
Related Issues (20)
- [CONTRIBUTION] Speech Dataset Generator
- Whisper-X is completely broken for me after the new update. HOT 1
- WhisperX is not working after the update HOT 6
- TypeError: TranscriptionOptions.__new__() missing 3 required positional arguments: 'max_new_tokens', 'clip_timestamps', and 'hallucination_silence_threshold' HOT 9
- AttributeError: 'Wav2Vec2Processor' object has no attribute 'sampling_rate' HOT 9
- 'speechbrain' must be installed to use 'speechbrain/spkrec-ecapa-voxceleb' embeddings HOT 4
- Any idea how to disable the profanity filter?
- Transcription generated in another language for malayalam
- "import whisperx"
- Is there anyway to get whisperx working on a 2020 mbp intel i5 on 8gb RAM no gpu? HOT 1
- How to get word level timestamps?
- no active speech found in audio
- Missing Words // Cut-Off in Music
- whisperx diarization no module named 'julius' HOT 1
- how to use diarisation and trasncribe function with cpu
- Feature Request: Option to add more models HOT 1
- could we use torch 1.x rather than torch 2.x?
- Can I use openai's whisper instead of faster-whisper with this library? HOT 4
- In thailand language, whsiper-large-v3 could get word level timestamps, but whisperx could not! Why? HOT 1
- Verbose transcription doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whisperx.