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

Numpy 1.22.0 and 1.24.3 Problem with TTS 0.22.0 and Librosa 0.10.0 and 0.10.1 #3538

Closed
OrbitPeppermint opened this issue Jan 23, 2024 · 6 comments · Fixed by eginhard/coqui-tts#14
Labels
wontfix This will not be worked on but feel free to help.

Comments

@OrbitPeppermint
Copy link

OrbitPeppermint commented Jan 23, 2024

Hello everyone,
I'm working as a scientistic assistance on Linux and we had a compatibility problem with TTS 0.22.0, Librosa 0.10.0 and Numpy 1.22.0 after an TTS Update from 0.11.0 to 0.22.0.
With these updates we got the following traceback:

Traceback (most recent call last):
  File "/project/translate_lecture.py", line 195, in <module>
    main(
  File "/project/translate_lecture.py", line 96, in main
    speaker.speak(use_gpu=use_cuda)
  File "/project/src/speaker.py", line 49, in speak
    self._add_text(segment=segment, use_gpu=use_gpu)
  File "/project/src/speaker.py", line 110, in _add_text
    file_handler.adjust_audio_length(
  File "/project/utils/file_handler.py", line 122, in adjust_audio_length
    short_y = librosa.effects.time_stretch(y=y, rate=factor)
  File "/opt/conda/lib/python3.10/site-packages/librosa/effects.py", line 245, in time_stretch
    stft_stretch = core.phase_vocoder(
  File "/opt/conda/lib/python3.10/site-packages/librosa/core/spectrum.py", line 1457, in phase_vocoder
    d_stretch[..., t] = util.phasor(phase_acc, mag=mag)
  File "/opt/conda/lib/python3.10/site-packages/librosa/util/utils.py", line 2602, in phasor
    z = _phasor_angles(angles)
  File "/opt/conda/lib/python3.10/site-packages/numba/np/ufunc/dufunc.py", line 190, in __call__
    return super().__call__(*args, **kws)
numpy.core._exceptions._UFuncNoLoopError: ufunc '_phasor_angles' did not contain a loop with signature matching types <class 'numpy.dtype[float32]'> -> None

After this I was looking inside of the requirements of TTS 0.22.0 to search for the numpy compatibility:

# core deps
numpy==1.22.0;python_version<="3.10"
numpy>=1.24.3;python_version>"3.10"
librosa>=0.10.0
...

and Librosa 0.10.1:

install_requires =
    audioread >= 2.1.9
    numpy >= 1.20.3, != 1.22.0, != 1.22.1, != 1.22.2
...

With this knowledge I updated from python 3.10 (uninstalled) to python 3.11 and defined numpy==1.24.3 in our requirements, because I thought it needs the next higher compatible version, as read in the TTS requirements. But, while building, the compiler said:

#17 12.18 The conflict is caused by:
#17 12.18     The user requested numpy==1.24.3
#17 12.18     tts 0.22.0 depends on numpy==1.22.0; python_version <= "3.10"
#17 12.18

I already tried to install numpy, librosa and tts without an version tag, but I got again the 1.22.0 numpy version with librosa 0.10.0 and tts 0.22.0 with the error at the beginning.

Why does the compiler stops at the first requirement validation and doesn't run through to the next one? Does anyone has an idea to fix it? install python 3.10 and 3.11?

Originally posted by @OrbitPeppermint in #3537

@Ph0rk0z
Copy link

Ph0rk0z commented Jan 26, 2024

Consider editing the deps.

Copy link

stale bot commented Mar 1, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

@stale stale bot added the wontfix This will not be worked on but feel free to help. label Mar 1, 2024
@OrbitPeppermint
Copy link
Author

I have updated the deps where I negate the numpy versions 1.22.0 , 1.22.1 and 1.22.2 , defined tts <= 0.22.0 and librosa without any definitions. In the end I got the versions • Librosa: 0.10.0.post2
• TTS: 0.14.3
• Numpy: 1.23.5
and it‘s running but only on TTS 0.14.3 with limited functions in comparision with todays version of tts 0.22.0.
If anyone has the time for an tts update to get it running with a new numpy version, I would be really thankful :)
Cheers

@stale stale bot removed the wontfix This will not be worked on but feel free to help. label Mar 1, 2024
@Ph0rk0z
Copy link

Ph0rk0z commented Mar 1, 2024

I don't remember having issues with 1.23.5 and new TTS. I run XTTS and numpy keeps getting upgraded. I did upgrade librosa to the latest.

@eginhard
Copy link
Contributor

eginhard commented Apr 8, 2024

This is fixed in our fork: https://github.com/idiap/coqui-ai-TTS Thanks for pointing it out.

Copy link

stale bot commented May 11, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

@stale stale bot added the wontfix This will not be worked on but feel free to help. label May 11, 2024
@stale stale bot closed this as completed Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on but feel free to help.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants