useful-transformers
useful-transformers copied to clipboard
How to run the transcribe_wav.py code directly instead of using the release wheel package?
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!
Have you solve it? i meet the same problem
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|>.