lowerquality / gentle

gentle forced aligner
https://lowerquality.com/gentle/
MIT License
1.46k stars 295 forks source link

Errors While Installing In Mac OS #326

Open Eeman1113 opened 11 months ago

Eeman1113 commented 11 months ago

The following error was show wne running ./install.sh:

`Installing dependencies... ==> Downloading https://formulae.brew.sh/api/formula.jws.json ########################################################################################################################################################################### 100.0% ==> Downloading https://formulae.brew.sh/api/cask.jws.json ########################################################################################################################################################################### 100.0% Warning: ffmpeg 6.0_2 is already installed and up-to-date. To reinstall 6.0_2, run: brew reinstall ffmpeg Warning: libtool 2.4.7 is already installed and up-to-date. To reinstall 2.4.7, run: brew reinstall libtool Warning: automake 1.16.5 is already installed and up-to-date. To reinstall 1.16.5, run: brew reinstall automake Warning: autoconf 2.71 is already installed and up-to-date. To reinstall 2.71, run: brew reinstall autoconf Warning: wget 1.21.4 is already installed and up-to-date. To reinstall 1.21.4, run: brew reinstall wget Warning: python@3.11 3.11.6_1 is already installed and up-to-date. To reinstall 3.11.6_1, run: brew reinstall python@3.11 Password: /opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'app' warnings.warn(msg) running develop /opt/homebrew/lib/python3.11/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated. !!

    ********************************************************************************
    Please avoid running ``setup.py`` and ``easy_install``.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!! easy_install.initialize_options(self) /opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !!

    ********************************************************************************
    Please avoid running ``setup.py`` directly.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************

!! self.initialize_options() running egg_info writing gentle.egg-info/PKG-INFO writing dependency_links to gentle.egg-info/dependency_links.txt writing requirements to gentle.egg-info/requires.txt writing top-level names to gentle.egg-info/top_level.txt reading manifest file 'gentle.egg-info/SOURCES.txt' adding license file 'COPYING' writing manifest file 'gentle.egg-info/SOURCES.txt' running build_ext Creating /opt/homebrew/lib/python3.11/site-packages/gentle.egg-link (link to .) Adding gentle 0.11.0 to easy-install.pth file

Installed /Users/eemanmajumder/code_shit/sih23/Bakar_Bakar/gentle Processing dependencies for gentle==0.11.0 Searching for twisted Reading https://pypi.org/simple/twisted/ Downloading https://files.pythonhosted.org/packages/24/83/8d34d264c72d5450cd3d3ef31c885bb36b94635aa8e9e223581793d9d6c8/twisted-23.10.0-py3-none-any.whl#sha256=4ae8bce12999a35f7fe6443e7f1893e6fe09588c8d2bed9c35cdce8ff2d5b444 Best match: twisted 23.10.0 Processing twisted-23.10.0-py3-none-any.whl Installing twisted-23.10.0-py3-none-any.whl to /opt/homebrew/lib/python3.11/site-packages Adding twisted 23.10.0 to easy-install.pth file Installing cftp script to /opt/homebrew/bin Installing ckeygen script to /opt/homebrew/bin Installing conch script to /opt/homebrew/bin Installing mailmail script to /opt/homebrew/bin Installing pyhtmlizer script to /opt/homebrew/bin Installing tkconch script to /opt/homebrew/bin Installing trial script to /opt/homebrew/bin Installing twist script to /opt/homebrew/bin Installing twistd script to /opt/homebrew/bin

Installed /opt/homebrew/lib/python3.11/site-packages/twisted-23.10.0-py3.11.egg Searching for zope-interface>=5 Reading https://pypi.org/simple/zope-interface/ No local packages or working download links found for zope-interface>=5 error: Could not find suitable distribution for Requirement.parse('zope-interface>=5')`

marcos452 commented 10 months ago

Hi, Do you solve this error. I also encountered same error @lilgandhi1199 Any help would be appreciated.

SuX97 commented 9 months ago

I have encountered the same error on Mac OS, any suggestion?

Abel1802 commented 9 months ago

Same error...

jimkleiber commented 8 months ago

Same error for me...has anyone figured out how to get this working? When I use the DMG on MacOS, for some reason I'm only able to align 15 seconds of a 6 minute audio, so getting the command line working might help me a lot.

SuX97 commented 8 months ago

Same error for me...has anyone figured out how to get this working? When I use the DMG on MacOS, for some reason I'm only able to align 15 seconds of a 6 minute audio, so getting the command line working might help me a lot.

@jimkleiber My walkaround is to open the App service in the background, and send request to the listening port like this:

  cmd = f'curl -F "audio=@./output/temp.mp3" -F "transcript=@./output/temp.txt" "http://localhost:8765/transcriptions?async=false"'
  import commands
  status, gentle_out = commands.getstatusoutput(cmd)

It works for me, though a bit ugly...

jimkleiber commented 8 months ago

ahhh, ok, that worked, but I got troubles with the "import commands" part, so I just did the curl. But then I didn't know where to save it and also had no idea it was running :-)

Is that what those other commands do? Help me store the result in an output file and also let me know if the output is happening?

SuX97 commented 8 months ago

ahhh, ok, that worked, but I got troubles with the "import commands" part, so I just did the curl. But then I didn't know where to save it and also had no idea it was running :-)

@jimkleiber I thought there are several alternatives for 'commands', check this out

Is that what those other commands do? Help me store the result in an output file and also let me know if the output is happening?

I think it's basically the same, I read it by:

    cmd = f'curl -F "audio=@./output/temp.mp3" -F "transcript=@./output/temp.txt" "http://localhost:8765/transcriptions?async=false"'
    import commands
    status, gentle_out = commands.getstatusoutput(cmd)
    words_with_timestamps = []
    for i, gentle_word in enumerate(gentle_out['words']):
        if gentle_word["case"] == 'success':
            words_with_timestamps.append([gentle_word["word"], gentle_word["start"], gentle_word["end"]])
        elif 0 < i < len(gentle_out["words"]) - 1:
            words_with_timestamps.append([gentle_word["word"], gentle_out["words"][i-1].end, gentle_out["words"][i+1].start])

It works for me.

jimkleiber commented 8 months ago

I found that just adding > ./files/subs-clip-results.json to the end of the normal curl allowed me to save it as a file, which is what I was hoping to do. Plus it also showed me a progress bar, so I knew something as happening.

I trust yours probably works, too, just maybe more than I need at the moment. However, thank you for helping, as who knows, I may need it in the future :-)

jimkleiber commented 8 months ago

Update: I solved the zope-interface error by adjusting the version of the Twisted package.

In the setup.py file, changing the install_requires to this.

    install_requires=['twisted>=18.7.0,<=22.10.0'],

It didn't fully install after that, I had to go into the ext/kaldi folder, open up .install_kaldi.sh and go step-by-step to see where it failed.

I eventually got it to load everything and compile from source, yay! If you have any questions, let me know and maybe I can help.

AlexGnatko commented 5 months ago

Actually I figured out (with the help of GPT4o) that the new line should be:

    install_requires=['twisted>=18.7.0,<=22.10.0', 'attrs==22.1.0', 'typing_extensions==4.0.0'],

Otherwise you'll be getting runtime errors trying to run serve.py. I was running this whole thing in a Docker container on Windows.