Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run the transcribe_wav.py code directly instead of using the release wheel package? #21

Open
QingWind6 opened this issue Oct 19, 2023 · 2 comments

Comments

@QingWind6
Copy link

I need to make certain modifications to the code, such as converting the frequency of the WAV file before reading it and then transcribing the speech. However, if I run transcribe_wav.py directly, it will throw an error:
Traceback (most recent call last):

  File "E:\useful-transformers-main\examples\whisper\transcribe_wav.py", line 4, in <module>
    from .whisper import decode_wav_file
ImportError: attempted relative import with no known parent package

How can I run the transcribe_wav.py code directly instead of using the release wheel package?
Thank you so much!

@HduHestin
Copy link

Have you solve it? i meet the same problem

@virtualmemorys
Copy link

attention the bold text....

(python3.10) [jss@Velu examples]$ pwd
/home/jss/useful-transformers-main/examples
(python3.10) [jss@Velu examples]$ taskset -c 4-7 python -m whisper.transcribe_wav ../wav/chinese.wav small zh
0%| | 0/1 [00:00<?, ?it/s]/home/jss/miniconda3/envs/python3.10/lib/python3.10/site-packages/numpy/core/getlimits.py:549: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
setattr(self, word, getattr(machar, word).flat[0])
/home/jss/miniconda3/envs/python3.10/lib/python3.10/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
return self._float_to_str(self.smallest_subnormal)
Model Execution time: 5.987481117248535 seconds
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:06<00:00, 6.62s/it]
<|notimestamps|>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants