Git Product home page Git Product logo

Comments (17)

St33lMouse avatar St33lMouse commented on May 25, 2024 2

Discord, but a discussion tab in your git would probably be enough, and easier for you to maintain. I want to know what all the little buttons do, api information, discussion about how long audio samples should be, stuff like that. news.

from tts-generation-webui.

rsxdalv avatar rsxdalv commented on May 25, 2024 1

ffmpeg-python
Version: 0.2.0
Summary: Python bindings for FFmpeg - with complex filtering support
Home-page: https://github.com/kkroening/ffmpeg-python
Author: Karl Kroening
Author-email: [email protected]
License: UNKNOWN
Location: /usr/local/lib/python3.10/dist-packages
Requires: future
Required-by:
Name: ffmpeg
Version: 1.4
Summary: ffmpeg python package url [https://github.com/jiashaokun/ffmpeg]
Home-page: https://github.com/jiashaokun/ffmpeg
Author: SkeyJIA
Author-email: [email protected]
License: MIT Licence
Location: /home/mouse/.local/lib/python3.10/site-packages
Requires:
Required-by:

Ok, in your specific case it's fairly likely that it's importing the wrong module, I believe it decided to import python-ffmpeg. Python and pip allows this to happen, afaik the results are pretty unpredictable if you install both or all 3 of them.

Now, judging by the path as seen here, for example Location: /home/mouse/.local/lib/python3.10/site-packages it seems like perhaps the virtual environment isn't being used. The virtual/conda environment only installs the correct one - "ffmpeg-python" so that it works correctly afterward.

Caution - this alternative "fix" will modify your environment and can cause issues in other installations

From other threads I have seen this to work; however, this shouldn't happen in the first place, it's something that needs to be addressed at installation.

pip uninstall ffmpeg
pip uninstall python-ffmpeg
pip uninstall ffmpeg-python
pip install ffmpeg-python

Also - if you just want it to go away and don't care about .ogg files, removing the

src\extensions_loader\extensions\callback_save_generation_ffmpeg.py
src\extensions_loader\extensions\callback_save_generation_musicgen_ffmpeg.py

files will make it go away. (They might be necessary when updating though)

from tts-generation-webui.

St33lMouse avatar St33lMouse commented on May 25, 2024 1

That worked, thanks! Whoever named those packages the way they did shakes head sadly

This project is impressive. You should set up a discussion section so people don't bug you with stupid questions, like me. For example "How is this project related to the ooba project? Is it possible to connect ooba to the sound generation here and get sound outputs from ooba text generaton like the eleven labs or silero extensions? How about Silly Tavern?

from tts-generation-webui.

jremb avatar jremb commented on May 25, 2024 1
pip uninstall ffmpeg
pip uninstall python-ffmpeg
pip uninstall ffmpeg-python
pip install ffmpeg-python

I tried this without any luck on my Windows 11 installation.

Also - if you just want it to go away and don't care about .ogg files, removing the

src\extensions_loader\extensions\callback_save_generation_ffmpeg.py
src\extensions_loader\extensions\callback_save_generation_musicgen_ffmpeg.py

files will make it go away. (They might be necessary when updating though)

Where can I find those files?

That is the actual path to the files. src can be found in tts-generation-webui directory. the callback_save_generation_ffmpeg.py file is located at src\extensions_loader\extensions, which is assuming the tts-generation-webui directory... so tts-generation-webui\src\extensions_loader\extensions is the path to the file. As for where tts-generation-webui directory itself is located... wherever you installed it.

from tts-generation-webui.

rsxdalv avatar rsxdalv commented on May 25, 2024 1

from tts-generation-webui.

pupdike avatar pupdike commented on May 25, 2024

Here is the inner error message I get which sounds the same:

pipe_input = ffmpeg.input("pipe:", format="f32le", ar=str(SAMPLE_RATE))
AttributeError: module 'ffmpeg' has no attribute 'input'

I tried "pip install ffmpeg-python" and that didn't seem to fix it.

from tts-generation-webui.

rsxdalv avatar rsxdalv commented on May 25, 2024

from tts-generation-webui.

rsxdalv avatar rsxdalv commented on May 25, 2024

Thank you for reporting that. I have a few questions to help me understand what could be the problem.
Is it windows 10 or 11?
Did you use the one click installers or have your own conda environment?
By chance, did you create any files named "ffmpeg.py"?
To the best of your knowledge, do you have the other module "ffmpeg" installed, not just "ffmpeg-python"?

As for debugging steps, within the virtual environment or conda environment (which can be opened using cmd_windows.bat), could you please run these commands: 

pip show ffmpeg-python
pip show ffmpeg
pip show python-ffmpeg
python -c "import ffmpeg; print(dir(ffmpeg)); print(ffmpeg.__file__)"
(...\one-click-installers-tts-main\installer_files\env) ...\one-click-installers-tts-main>pip show ffmpeg-python
Name: ffmpeg-python
Version: 0.2.0
Summary: Python bindings for FFmpeg - with complex filtering support
Home-page: https://github.com/kkroening/ffmpeg-python
Author: Karl Kroening
Author-email: [email protected]
License: UNKNOWN
Location: ...\one-click-installers-tts-main\installer_files\env\lib\site-packages
Requires: future
Required-by:

(...\one-click-installers-tts-main\installer_files\env) ...\one-click-installers-tts-main>pip show ffmpeg
WARNING: Package(s) not found: ffmpeg

(...\one-click-installers-tts-main\installer_files\env) ...\one-click-installers-tts-main>pip show python-ffmpeg
WARNING: Package(s) not found: python-ffmpeg

(...\one-click-installers-tts-main\installer_files\env) ...\one-click-installers-tts-main>python -c "import ffmpeg; print(ffmpeg)"
<module 'ffmpeg' from 'C:\\Users\\admin\\Desktop\\one-click-installers-tts-main\\installer_files\\env\\lib\\site-packages\\ffmpeg\\__init__.py'>

(...\one-click-installers-tts-main\installer_files\env) ...\one-click-installers-tts-main>python -c "import ffmpeg; print(dir(ffmpeg)); print(ffmpeg.__file__)"
['Error', 'Stream', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '_ffmpeg', '_filters', '_probe', '_run', '_utils', '_view', 'colorchannelmixer', 'compile', 'concat', 'crop', 'dag', 'drawbox', 'drawtext', 'filter', 'filter_', 'filter_multi_output', 'get_args', 'hflip', 'hue', 'input', 'merge_outputs', 'nodes', 'output', 'overlay', 'overwrite_output', 'probe', 'run', 'run_async', 'setpts', 'trim', 'unicode_literals', 'vflip', 'view', 'zoompan']
...\one-click-installers-tts-main\installer_files\env\lib\site-packages\ffmpeg\__init__.py

from tts-generation-webui.

St33lMouse avatar St33lMouse commented on May 25, 2024

I have the same bug. Note that this gives the reported error, but it still outputs a good file to outputs. Here's the output for your pip show commands:

pip show ffmpeg-python
pip show ffmpeg
pip show python-ffmpeg
python3 -c "import ffmpeg; print(dir(ffmpeg)); print(ffmpeg.file)"
Name: ffmpeg-python
Version: 0.2.0
Summary: Python bindings for FFmpeg - with complex filtering support
Home-page: https://github.com/kkroening/ffmpeg-python
Author: Karl Kroening
Author-email: [email protected]
License: UNKNOWN
Location: /usr/local/lib/python3.10/dist-packages
Requires: future
Required-by:
Name: ffmpeg
Version: 1.4
Summary: ffmpeg python package url [https://github.com/jiashaokun/ffmpeg]
Home-page: https://github.com/jiashaokun/ffmpeg
Author: SkeyJIA
Author-email: [email protected]
License: MIT Licence
Location: /home/mouse/.local/lib/python3.10/site-packages
Requires:
Required-by:
Name: python-ffmpeg
Version: 2.0.4
Summary: A python binding for FFmpeg which provides sync and async APIs
Home-page: https://github.com/jonghwanhyeon/python-ffmpeg
Author: Jonghwan Hyeon
Author-email: [email protected]
License: MIT
Location: /home/mouse/.local/lib/python3.10/site-packages
Requires: pyee, typing-extensions
Required-by:
['FFmpeg', 'FFmpegError', 'Progress', 'builtins', 'cached', 'doc', 'file', 'loader', 'name', 'package', 'path', 'spec', 'version', 'ffmpeg', 'file', 'options', 'progress', 'protocol', 'statistics', 'types', 'utils']
/home/mouse/.local/lib/python3.10/site-packages/ffmpeg/init.py
(/home/mouse/soungen/one-click-installers-tts-4.0/tts-generation-webui) mouse@mouse-hole:~/soungen/one-click-installers-tts-4.0$

from tts-generation-webui.

rsxdalv avatar rsxdalv commented on May 25, 2024

That worked, thanks! Whoever named those packages the way they did shakes head sadly

This project is impressive. You should set up a discussion section so people don't bug you with stupid questions, like me. For example "How is this project related to the ooba project? Is it possible to connect ooba to the sound generation here and get sound outputs from ooba text generaton like the eleven labs or silero extensions? How about Silly Tavern?

Good to hear!
Like a discord server?

from tts-generation-webui.

pupdike avatar pupdike commented on May 25, 2024
pip uninstall ffmpeg
pip uninstall python-ffmpeg
pip uninstall ffmpeg-python
pip install ffmpeg-python

I tried this without any luck on my Windows 11 installation.

Also - if you just want it to go away and don't care about .ogg files, removing the

src\extensions_loader\extensions\callback_save_generation_ffmpeg.py
src\extensions_loader\extensions\callback_save_generation_musicgen_ffmpeg.py

files will make it go away. (They might be necessary when updating though)

Where can I find those files? Are those somewhere inside the \installer_files\ directory? I searched and couldn't locate them.

from tts-generation-webui.

jremb avatar jremb commented on May 25, 2024

Alternatively, since this repo is already using the subprocess library, you can just strip out the code using ffmpeg python library and call ffmpeg directly with the subprocess library. Of course, you'll need to have the actual ffmpeg CLI installed.

This worked for me.

from tts-generation-webui.

pupdike avatar pupdike commented on May 25, 2024

Thanks, the update fixed for me in Windows 11. That was quick!

from tts-generation-webui.

mweldon avatar mweldon commented on May 25, 2024

Error in callback_save_generation extension: Incorrect ffmpeg version. Please install ffmpeg-python with pip install ffmpeg-python

pip install ffmpeg-python
Requirement already satisfied: ffmpeg-python in c:\users...\appdata\local\programs\python\python310\lib\site-packages (0.2.0)
Requirement already satisfied: future in c:\users...\appdata\local\programs\python\python310\lib\site-packages (from ffmpeg-python) (0.18.3)

from tts-generation-webui.

St33lMouse avatar St33lMouse commented on May 25, 2024

good job. The ffmpeg thing has been frustrating some people.

from tts-generation-webui.

rsxdalv avatar rsxdalv commented on May 25, 2024

good job. The ffmpeg thing has been frustrating some people.

Well it all starts with global python installations. Honestly, that's why I wish python would abandon global pip installs since they cause issues like this, where 2 packages collide and who knows why people don't have a virtual environment, except for the fact that they are hard to work with and so "not the default" in all cases.

from tts-generation-webui.

rsxdalv avatar rsxdalv commented on May 25, 2024

Error in callback_save_generation extension: Incorrect ffmpeg version. Please install ffmpeg-python with pip install ffmpeg-python

pip install ffmpeg-python Requirement already satisfied: ffmpeg-python in c:\users...\appdata\local\programs\python\python310\lib\site-packages (0.2.0) Requirement already satisfied: future in c:\users...\appdata\local\programs\python\python310\lib\site-packages (from ffmpeg-python) (0.18.3)

This is due to a global installation without a virtual environment, other ffmpeg packages are almost guaranteed to interfere.

from tts-generation-webui.

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.