[2noise/ChatTTS]web ui从已有音频中sample报错

2024-10-17 84 views
8

环境: conda安装,python3.12,安装了最新的chattts 0.1.1. 报错如下

Traceback (most recent call last):
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/blocks.py", line 1935, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/blocks.py", line 1520, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 2405, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 914, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/utils.py", line 826, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "/home/dhl/Documents/ChatTTS/examples/web/funcs.py", line 118, in on_upload_sample_audio
    spk_smp = chat.sample_audio_speaker(sample_audio)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Chat' object has no attribute 'sample_audio_speaker'. Did you mean: 'sample_random_speaker'?
Traceback (most recent call last):
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/blocks.py", line 1935, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/blocks.py", line 1520, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 2405, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 914, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/utils.py", line 826, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "/home/dhl/Documents/ChatTTS/examples/web/funcs.py", line 118, in on_upload_sample_audio
    spk_smp = chat.sample_audio_speaker(sample_audio)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Chat' object has no attribute 'sample_audio_speaker'. Did you mean: 'sample_random_speaker'?
Traceback (most recent call last):
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/blocks.py", line 1935, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/blocks.py", line 1520, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 2405, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 914, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/utils.py", line 826, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "/home/dhl/Documents/ChatTTS/examples/web/funcs.py", line 147, in refine_text
    params_refine_text=ChatTTS.Chat.RefineTextParams(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Chat.RefineTextParams.__init__() got an unexpected keyword argument 'manual_seed'
Traceback (most recent call last):
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/blocks.py", line 1935, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/blocks.py", line 1520, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 2405, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 914, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhl/anaconda3/envs/chattts/lib/python3.12/site-packages/gradio/utils.py", line 826, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "/home/dhl/Documents/ChatTTS/examples/web/funcs.py", line 118, in on_upload_sample_audio
    spk_smp = chat.sample_audio_speaker(sample_audio)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Chat' object has no attribute 'sample_audio_speaker'. Did you mean: 'sample_random_speaker'?

回答

4

请使用最新版ChatTTS.