abhirooptalasila / AutoSub

A CLI script to generate subtitle files (SRT/VTT/TXT) for any video using either DeepSpeech or Coqui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR: No matching distribution found for deepspeech==0.9.3 (from -r requirements.txt (line 3))

PacoH opened this issue · comments

commented
pip3 install -r requirements.txt

Collecting deepspeech==0.9.3 (from -r requirements.txt (line 3))
  ERROR: Could not find a version that satisfies the requirement deepspeech==0.9.3 (from -r requirements.txt (line 3)) (from versions: none)
ERROR: No matching distribution found for deepspeech==0.9.3 (from -r requirements.txt (line 3))

Can you give platform info?
There might not be wheel files and tar.gz source distribution for deepspeech for your platform. That is why it fails to find an installation candidate for you and gives you the error you are getting.

commented

@abhirooptalasila

OK. Thank you. I was using an old Mac Pro with OX X 10.8.5.

I switched to my iMac with OS X 10.15.1

Now I'm getting

Collecting kiwisolver==1.2.0
  Downloading kiwisolver-1.2.0.tar.gz (52 kB)
	 |████████████████████████████████| 52 kB 5.5 MB/s
	ERROR: Command errored out with exit status 1:
    WARNING: The wheel package is not available.
ERROR: Could not find a version that satisfies the requirement kiwisolver==1.2.0
ERROR: No matching distribution found for kiwisolver==1.2.0

Python 2.7.16
Python 3.7.3

Not sure what's going wrong. Can you try building from source?

commented

I see no instructions on how to do that and every time I have attempted to build something with as many requirements as this package has, it has always failed at at least one requirement. If I am having this much trouble installing in the normal manner, I can't even imagine how many more problems I would have installing it from scratch.

For the record, I upgraded OS X to 12.0.1, updated to Command Line Tools for Xcode 13.1, updated brew, and ran pip3 install -r requirements.txt again and now I get:

ERROR: Command errored out with exit status 1:
   command: /usr/local/opt/python@3.9/bin/python3.9 /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/3p/2sx3fly12dv2rfy28mhg0gkh0000gp/T/tmpgk22g_om
	   cwd: /private/var/folders/3p/2sx3fly12dv2rfy28mhg0gkh0000gp/T/pip-install-huvamq6w/scipy_e3724c1a98c64ecf942132b8c344ccbd
  Complete output (109 lines):
  setup.py:418: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /private/var/folders/3p/2sx3fly12dv2rfy28mhg0gkh0000gp/T/pip-modern-metadata-blgh76yo'), proceeding with generating Cython sources and expanding templates
	warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
  Running from scipy source directory.
  lapack_opt_info:
  lapack_mkl_info:
  customize UnixCCompiler
	libraries mkl_rt not found in ['/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
	NOT AVAILABLE

  openblas_lapack_info:
	libraries openblas not found in ['/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
	NOT AVAILABLE

  openblas_clapack_info:
	libraries openblas,lapack not found in ['/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
	NOT AVAILABLE

  flame_info:
	libraries flame not found in ['/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
	NOT AVAILABLE

  accelerate_info:
	NOT AVAILABLE

  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
	libraries lapack_atlas not found in /usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib
	libraries tatlas,tatlas not found in /usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib
	libraries lapack_atlas not found in /usr/local/lib
	libraries tatlas,tatlas not found in /usr/local/lib
	libraries lapack_atlas not found in /usr/lib
	libraries tatlas,tatlas not found in /usr/lib
  <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
	NOT AVAILABLE

  atlas_3_10_info:
	libraries lapack_atlas not found in /usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib
	libraries satlas,satlas not found in /usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib
	libraries lapack_atlas not found in /usr/local/lib
	libraries satlas,satlas not found in /usr/local/lib
	libraries lapack_atlas not found in /usr/lib
	libraries satlas,satlas not found in /usr/lib
  <class 'numpy.distutils.system_info.atlas_3_10_info'>
	NOT AVAILABLE

  atlas_threads_info:
  Setting PTATLAS=ATLAS
	libraries lapack_atlas not found in /usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib
	libraries ptf77blas,ptcblas,atlas not found in /usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib
	libraries lapack_atlas not found in /usr/local/lib
	libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
	libraries lapack_atlas not found in /usr/lib
	libraries ptf77blas,ptcblas,atlas not found in /usr/lib
  <class 'numpy.distutils.system_info.atlas_threads_info'>
	NOT AVAILABLE

  atlas_info:
	libraries lapack_atlas not found in /usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib
	libraries f77blas,cblas,atlas not found in /usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib
	libraries lapack_atlas not found in /usr/local/lib
	libraries f77blas,cblas,atlas not found in /usr/local/lib
	libraries lapack_atlas not found in /usr/lib
	libraries f77blas,cblas,atlas not found in /usr/lib
  <class 'numpy.distutils.system_info.atlas_info'>
	NOT AVAILABLE

  lapack_info:
	libraries lapack not found in ['/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
	NOT AVAILABLE

  /usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/distutils/system_info.py:1858: UserWarning:
	  Lapack (http://www.netlib.org/lapack/) libraries not found.
	  Directories to search for the libraries can be specified in the
	  numpy/distutils/site.cfg file (section [lapack]) or by setting
	  the LAPACK environment variable.
	return getattr(self, '_calc_info_{}'.format(name))()
  lapack_src_info:
	NOT AVAILABLE

  /usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/distutils/system_info.py:1858: UserWarning:
	  Lapack (http://www.netlib.org/lapack/) sources not found.
	  Directories to search for the sources can be specified in the
	  numpy/distutils/site.cfg file (section [lapack_src]) or by setting
	  the LAPACK_SRC environment variable.
	return getattr(self, '_calc_info_{}'.format(name))()
	NOT AVAILABLE

  Traceback (most recent call last):
	File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
	  main()
	File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
	  json_out['return_val'] = hook(**hook_input['kwargs'])
	File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
	  return hook(metadata_directory, config_settings)
	File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in prepare_metadata_for_build_wheel
	  self.run_setup()
	File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/build_meta.py", line 267, in run_setup
	  super(_BuildMetaLegacyBackend,
	File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/build_meta.py", line 158, in run_setup
	  exec(compile(code, __file__, 'exec'), locals())
	File "setup.py", line 540, in <module>
	  setup_package()
	File "setup.py", line 536, in setup_package
	  setup(**metadata)
	File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/distutils/core.py", line 135, in setup
	  config = configuration()
	File "setup.py", line 435, in configuration
	  raise NotFoundError(msg)
  numpy.distutils.system_info.NotFoundError: No lapack/blas resources found. Note: Accelerate is no longer supported.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/04/ab/e2eb3e3f90b9363040a3d885ccc5c79fe20c5b8a3caa8fe3bf47ff653260/scipy-1.4.1.tar.gz#sha256=dee1bbf3a6c8f73b6b218cb28eed8dd13347ea2f87d572ce19b289d6fd3fbc59 (from https://pypi.org/simple/scipy/) (requires-python:>=3.5). Command errored out with exit status 1: /usr/local/opt/python@3.9/bin/python3.9 /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/3p/2sx3fly12dv2rfy28mhg0gkh0000gp/T/tmpgk22g_om Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement scipy==1.4.1 (from versions: 0.8.0, 0.9.0, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.12.1, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 1.0.0b1, 1.0.0rc1, 1.0.0rc2, 1.0.0, 1.0.1, 1.1.0rc1, 1.1.0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.4.0rc1, 1.4.0rc2, 1.4.0, 1.4.1, 1.5.0rc1, 1.5.0rc2, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.6.0rc1, 1.6.0rc2, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.7.0rc1, 1.7.0rc2, 1.7.0, 1.7.1, 1.7.2)
ERROR: No matching distribution found for scipy==1.4.1

python3 3.9.8

Still not sure what's going wrong. I've built it from source for my M1 machine and didn't face any issues.
If you're following this, make sure there's no version mismatch with your python (3.9 releases still have a lot of bugs, at least with MacOS).

commented

Oh. I didn't know that. I unlinked python@3.9 and linked python@3.8 and deleted AutoSub and started from scratch. This time it installed no problem. I have literally labored for days to get to this point. A simple note that python@3.8 is the latest stable version on OS X and known to work with this module, and how to switch to it from 3.9, would be appropriate and would have saved me and probably others all that trouble. At least I updated brew, Xcode, and OS X in the process but now there are many issues with a new OS X, as there always are.

I'm still having problems though. Since I installed this to a virtual environment, I was able to run python3 autosub/main.py --file ~/movie.mp4 --format srt txt only from the AutoSub directory. When I cd'ed to the movie's directory and activated the 'sub' directory with source ~/AutoSub/sub/bin/activate, I got /AutoSub/sub/bin/python3: can't open file 'autosub/main.py': [Errno 2] No such file or directory. What is the proper way to run this from another directory? I also noticed that the -o output directory option doesn't work with this version.

You can't run AutoSub from another directory as this is not a "package" perse (no associated PyPi package). So you'll have to run the command from the AutoSub directory with the full path to the movie file.

commented

Oh, I see. OK, well can you reimplement the -o option so we can easily output the subtitles to the video's directory? I also noticed that the -C option doesn't work. I'm not sure but does increasing that number improve results? I'm getting results that are not as good as Youtube's autogenerated captions.

Got it. Will need to add the output option.
About the accuracy, we can't do anything about that until DeepSpeech releases new/better models. Although, I've tried huggingface's models and they perform much better. So I plan to integrate that too. But I'll only be able to work on this next month.
What is the -C option?

commented

Thanks! Can you point me to the HuggingFace pre-trained models that I can try? I can't find any.

The -C option is -C --concurrency=<concurrency> Number of concurrent API requests to make [default: 10]. I thought maybe that would affect performance but not sure. I found this option from three different sources:

henry40408/autosub3: Command-line utility for auto-generating subtitles for any video file
[NO LONGER MAINTAINED] Command-line utility for auto-generating subtitles for any video file
agermanidis/autosub: [NO LONGER MAINTAINED] Command-line utility for auto-generating subtitles for any video file

Check this. Bit of a learning curve if you're not familiar with transformers.
My project is not related to the one you linked (all 3 point to the same repo). The name clash is just a coincidence.
That option is needed since ASR is being done using the Google Speech API, whereas here, we're just using a local language model to generate our output.

commented

I was just hoping there was a pre-trained model. I thought your project was the latest fork of that project that worked.

I think you completely misunderstood. This project is for local inference and all the others you've seen on GitHub just act as
a wrapper to the Google STT API. The accuracy of DeepSpeech might be worse off than that of Google but it's openly available.

commented

Yes, because of the same name. Maybe you should add a disclaimer that this is not the original Google API version which hasn't been updated in years.

commented

Same issue with me:

ERROR: Could not find a version that satisfies the requirement deepspeech==0.9.3 (from autosub) (from versions: none)
ERROR: No matching distribution found for deepspeech==0.9.3
OS Name:                   Microsoft Windows 11 Home
OS Version:                10.0.22621 N/A Build 22621
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free

Python 3.10.0

I think deepspeech is not compatible with python 3.10 even maybe >=3.8