GithubHelp home page GithubHelp logo

Comments (8)

vanguardanon1029 avatar vanguardanon1029 commented on May 16, 2024 1

My exact same script running the previous commit before Pandas update works still.

from whisperx.

sawadata avatar sawadata commented on May 16, 2024 1

This wav reproduces the error.
https://huggingface.co/speechbrain/asr-crdnn-rnnlm-librispeech/resolve/main/example.wav
Using pandas 1.5.3.

from whisperx.

m-bain avatar m-bain commented on May 16, 2024 1

@sawadata thank you!
Hmm should work now 5b8c8a7
Let me know

from whisperx.

m-bain avatar m-bain commented on May 16, 2024 1

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.

m-bain avatar m-bain commented on May 16, 2024

Thank you, reverted to old commit in default branch now. I will work on these experimental changes till its working fully

from whisperx.

sawadata avatar sawadata commented on May 16, 2024

per_seg_grp = char_segments_arr.groupby(["segment-idx", "subsegment-idx"], as_index = False)

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.

sawadata avatar sawadata commented on May 16, 2024

@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.

arnavmehta7 avatar arnavmehta7 commented on May 16, 2024

@m-bain I am still getting this error. I supplied a 30seconds audio

from whisperx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.