astramind-ai / Auralis

A Fast TTS Engine
https://astramind.ai
Other
330 stars 19 forks source link

[BUG🐛] TypeError while from auralis import TTS, TTSRequest #14

Open JV-X opened 1 day ago

JV-X commented 1 day ago

I am installing the local Auralis environment. When I installed the dependent packages and tried to execute the following code, the following error occurred and the program automatically exited. I searched for some relevant information online, which probably said that there seemed to be some compatibility issues with the versions of numpy and numba. What are the versions of numpy and numba in your environment that can run normally?

my code:

from auralis import TTS, TTSRequest

# Initialize
tts = TTS().from_pretrained("AstraMindAI/xttsv2", gpt_model='AstraMindAI/xtts2-gpt')

# Generate speech
request = TTSRequest(
    # text="Hello Earth! This is Auralis speaking.",
    text="你好,地球,这里是Auralis说话",
    language="zh-cn",
    speaker_files=['摊手手并说话话.wav']
)

output = tts.generate_speech(request)
output.save('hello.wav')

error log:

(auralis_env) hygx@hygx:~/code/Auralis$  cd /home/hygx/code/Auralis ; /usr/bin/env /home/hygx/anaconda3/envs/auralis_env/bin/python /home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/adapter/../../debugpy/launcher 46404 -- /home/hygx/code/Auralis/examples/test.py 
Traceback (most recent call last):
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 71, in <module>
    cli.main()
  File "/home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 501, in main
    run()
  File "/home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 351, in run_file
    runpy.run_path(target, run_name="__main__")
  File "/home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 310, in run_path
    return _run_module_code(code, init_globals, run_name, pkg_name=pkg_name, script_name=fname)
  File "/home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 127, in _run_module_code
    _run_code(code, mod_globals, init_globals, mod_name, mod_spec, pkg_name, script_name)
  File "/home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 118, in _run_code
    exec(code, run_globals)
  File "/home/hygx/code/Auralis/examples/test.py", line 1, in <module>
    from auralis import TTS, TTSRequest
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/auralis/__init__.py", line 1, in <module>
    from .core.tts import TTS
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/auralis/core/tts.py", line 15, in <module>
    from auralis.common.definitions.requests import TTSRequest
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/auralis/common/definitions/requests.py", line 53, in <module>
    from auralis.common.definitions.enhancer import EnhancedAudioProcessor, AudioPreprocessingConfig
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/auralis/common/definitions/enhancer.py", line 9, in <module>
    import pyloudnorm
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/pyloudnorm/__init__.py", line 4, in <module>
    from .meter import Meter, IIRfilter
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/pyloudnorm/meter.py", line 6, in <module>
    from .iirfilter import IIRfilter
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/pyloudnorm/iirfilter.py", line 2, in <module>
    import scipy.signal
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/scipy/signal/__init__.py", line 320, in <module>
    from ._bsplines import *
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/scipy/signal/_bsplines.py", line 7, in <module>
    from ._signaltools import lfilter, sosfilt, lfiltic
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/scipy/signal/_signaltools.py", line 16, in <module>
    from ._ltisys import dlti
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/scipy/signal/_ltisys.py", line 29, in <module>
    from scipy.interpolate import make_interp_spline
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/scipy/interpolate/__init__.py", line 167, in <module>
    from ._interpolate import *
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/scipy/interpolate/_interpolate.py", line 12, in <module>
    from . import _fitpack_py
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/scipy/interpolate/_fitpack_py.py", line 8, in <module>
    from ._fitpack_impl import bisplrep, bisplev, dblint  # noqa: F401
  File "/home/hygx/anaconda3/envs/auralis_env/lib/python3.10/site-packages/scipy/interpolate/_fitpack_impl.py", line 103, in <module>
    'iwrk': array([], dfitpack_int), 'u': array([], float),
TypeError
(auralis_env) hygx@hygx:~/code/Auralis$ 

thanks for your reply.

JV-X commented 1 day ago

my version: numba 0.60.0 numpy 1.26.4

wjddd commented 1 day ago

my version: numba 0.60.0 numpy 1.26.4

会不会是scipy版本的问题?scipy==1.14.1是ok的。

JV-X commented 1 day ago

my version: numba 0.60.0 numpy 1.26.4

会不会是scipy版本的问题?scipy==1.14.1是ok的。

不是,我的scipy也是1.14.1

mlinmg commented 1 day ago

Can you post the output of your pip freeze?

JV-X commented 1 day ago

Of course, this is the output:

(auralis_env) hygx@hygx:~/code/Auralis$ pip freeze
aiofiles==24.1.0
aiohappyeyeballs==2.4.4
aiohttp==3.11.9
aiosignal==1.3.1
annotated-types==0.7.0
anyio==4.6.2.post1
asttokens==3.0.0
async-timeout==5.0.1
attrs==24.2.0
audioread==3.0.1
auralis==0.2.5
backcall==0.2.0
beautifulsoup4==4.12.3
blis==0.7.11
Brotli @ file:///croot/brotli-split_1714483155106/work
cachetools==5.3.3
catalogue==2.0.10
certifi @ file:///croot/certifi_1725551672989/work/certifi
cffi==1.17.1
charset-normalizer @ file:///croot/charset-normalizer_1721748349566/work
click==8.1.7
cloudpathlib==0.20.0
cloudpickle==3.1.0
colorama==0.4.6
compressed-tensors==0.8.0
confection==0.1.5
cutlet==0.4.0
cymem==2.0.10
datasets==2.14.4
decorator==5.1.1
dill==0.3.7
diskcache==5.6.3
distro==1.9.0
docopt==0.6.2
EbookLib==0.18
einops==0.8.0
exceptiongroup==1.2.2
executing==2.1.0
fastapi==0.115.5
ffmpeg==1.4
filelock @ file:///croot/filelock_1700591183607/work
frozenlist==1.5.0
fsspec==2024.10.0
fugashi==1.4.0
future==1.0.0
gguf==0.10.0
gmpy2 @ file:///tmp/build/80754af9/gmpy2_1645455533097/work
h11==0.14.0
hangul-romanize==0.1.0
httpcore==1.0.7
httptools==0.6.4
httpx==0.28.0
huggingface-hub==0.26.1
idna==3.10
importlib_metadata==8.5.0
iniconfig==2.0.0
interegular==0.3.3
ipython==8.12.3
jaconv==0.4.0
jedi==0.19.2
Jinja2 @ file:///croot/jinja2_1730902924303/work
jiter==0.8.0
joblib==1.4.2
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
langcodes==3.5.0
langid==1.1.6
language_data==1.3.0
lark==1.2.2
lazy_loader==0.4
librosa==0.10.2.post1
llvmlite==0.43.0
lm-format-enforcer==0.10.9
lxml==5.3.0
marisa-trie==1.2.1
markdown-it-py==3.0.0
MarkupSafe @ file:///croot/markupsafe_1704205993651/work
matplotlib-inline==0.1.7
mdurl==0.1.2
mistral_common==1.5.1
mkl-service==2.4.0
mkl_fft @ file:///io/mkl313/mkl_fft_1730824109137/work
mkl_random @ file:///io/mkl313/mkl_random_1730823916628/work
mojimoji==0.0.13
mpmath @ file:///croot/mpmath_1690848262763/work
msgpack==1.1.0
msgspec==0.18.6
multidict==6.1.0
multiprocess==0.70.15
murmurhash==1.0.11
nest-asyncio==1.6.0
networkx==3.4.2
num2words==0.5.13
numba==0.60.0
numpy==1.26.4
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu12==8.9.2.26
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu12==12.1.0.106
nvidia-ml-py==12.560.30
nvidia-nccl-cu12==2.19.3
nvidia-nvjitlink-cu12==12.4.127
nvidia-nvtx-cu12==12.1.105
openai==1.56.0
OpenCC==1.1.9
opencv-python-headless==4.10.0.84
outlines==0.0.46
packaging==24.2
pandas==2.2.3
parso==0.8.4
partial-json-parser==0.2.1.1.post4
pexpect==4.9.0
pickleshare==0.7.5
pillow==10.4.0
platformdirs==4.3.6
pluggy==1.5.0
pooch==1.8.2
preshed==3.0.9
prometheus-fastapi-instrumentator==7.0.0
prometheus_client==0.21.0
prompt_toolkit==3.0.48
propcache==0.2.1
protobuf==5.29.0
psutil==6.1.0
ptyprocess==0.7.0
pure_eval==0.2.3
py-cpuinfo==9.0.0
pyairports==2.1.1
pyarrow==18.1.0
pycountry==24.6.1
pycparser==2.22
pydantic==2.10.2
pydantic_core==2.27.1
Pygments==2.18.0
pyloudnorm==0.1.1
pypinyin==0.53.0
PySocks @ file:///home/builder/ci_310/pysocks_1640793678128/work
pytest==8.3.3
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
pytz==2024.2
PyYAML @ file:///croot/pyyaml_1728657952215/work
pyzmq==26.2.0
ray==2.39.0
referencing==0.35.1
regex==2024.11.6
requests @ file:///croot/requests_1730999120400/work
rich==13.9.4
rpds-py==0.22.0
safetensors==0.4.5
scikit-learn==1.5.2
scipy==1.14.1
sentencepiece==0.2.0
shellingham==1.5.4
six==1.16.0
smart-open==7.0.5
sniffio==1.3.1
sounddevice==0.5.1
soundfile==0.12.1
soupsieve==2.6
soxr==0.5.0.post1
spacy==3.7.5
spacy-legacy==3.0.12
spacy-loggers==1.0.5
srsly==2.4.8
stack-data==0.6.3
starlette==0.41.3
sympy==1.13.1
thinc==8.2.5
threadpoolctl==3.5.0
tiktoken==0.7.0
tokenizers==0.20.3
tomli==2.2.1
torch==2.5.1
torchaudio==2.5.1
torchvision==0.20.1
tqdm==4.67.1
traitlets==5.14.3
transformers==4.46.3
triton==3.1.0
typer==0.14.0
typing_extensions @ file:///croot/typing_extensions_1715268824938/work
tzdata==2024.2
urllib3 @ file:///croot/urllib3_1727769808118/work
uvicorn==0.32.1
uvloop==0.21.0
vllm==0.6.4.post1
wasabi==1.1.3
watchfiles==1.0.0
wcwidth==0.2.13
weasel==0.4.1
websockets==14.1
wrapt==1.17.0
xformers==0.0.28.post3
xxhash==3.5.0
yarl==1.18.3
zipp==3.21.0
(auralis_env) hygx@hygx:~/code/Auralis$
mlinmg commented 18 hours ago

I've tried to reinstall every dep at your verisions and didn't manage to reproduce the error, can you try to do a new env?