lenML / Speech-AI-Forge

🍦 Speech-AI-Forge is a project developed around TTS generation model, implementing an API Server and a Gradio-based WebUI.
https://huggingface.co/spaces/lenML/ChatTTS-Forge
GNU Affero General Public License v3.0
711 stars 87 forks source link

windows下勾选Enable Enhance生成音频出错 #22

Closed xldistance closed 4 months ago

xldistance commented 4 months ago
Traceback (most recent call last):
  File "E:\ChatTTS-Forge\py310\lib\site-packages\gradio\queueing.py", line 528, in process_events
    response = await route_utils.call_process_api(
  File "E:\ChatTTS-Forge\py310\lib\site-packages\gradio\route_utils.py", line 270, in call_process_api
    output = await app.get_blocks().process_api(
  File "E:\ChatTTS-Forge\py310\lib\site-packages\gradio\blocks.py", line 1908, in process_api
    result = await self.call_function(
  File "E:\ChatTTS-Forge\py310\lib\site-packages\gradio\blocks.py", line 1485, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "E:\ChatTTS-Forge\py310\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "E:\ChatTTS-Forge\py310\lib\site-packages\anyio\_backends\_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
  File "E:\ChatTTS-Forge\py310\lib\site-packages\anyio\_backends\_asyncio.py", line 859, in run
    result = context.run(func, *args)
  File "E:\ChatTTS-Forge\py310\lib\site-packages\gradio\utils.py", line 808, in wrapper
    response = f(*args, **kwargs)
  File "E:\ChatTTS-Forge\modules\webui\webui_utils.py", line 193, in tts_generate
    audio_data, sample_rate = apply_audio_enhance(
  File "E:\ChatTTS-Forge\py310\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\ChatTTS-Forge\modules\webui\webui_utils.py", line 80, in apply_audio_enhance
    enhancer = load_enhancer(device)
  File "E:\ChatTTS-Forge\modules\Enhancer\ResembleEnhance.py", line 24, in load_enhancer
    resemble_enhance.load_model()
  File "E:\ChatTTS-Forge\modules\Enhancer\ResembleEnhance.py", line 36, in load_model
    hparams = HParams.load(Path(MODELS_DIR) / "resemble-enhance")
  File "E:\ChatTTS-Forge\modules\repos_static\resemble_enhance\hparams.py", line 109, in load
    hps.append(cls.from_yaml(run_dir / "hparams.yaml"))
  File "E:\ChatTTS-Forge\modules\repos_static\resemble_enhance\hparams.py", line 94, in from_yaml
    return cls(**dict(OmegaConf.merge(cls(), OmegaConf.load(path))))
  File "E:\ChatTTS-Forge\py310\lib\site-packages\omegaconf\omegaconf.py", line 190, in load
    obj = yaml.load(f, Loader=get_yaml_loader())
  File "E:\ChatTTS-Forge\py310\lib\site-packages\yaml\__init__.py", line 81, in load
    return loader.get_single_data()
  File "E:\ChatTTS-Forge\py310\lib\site-packages\yaml\constructor.py", line 51, in get_single_data
    return self.construct_document(node)
  File "E:\ChatTTS-Forge\py310\lib\site-packages\yaml\constructor.py", line 60, in construct_document
    for dummy in generator:
  File "E:\ChatTTS-Forge\py310\lib\site-packages\yaml\constructor.py", line 413, in construct_yaml_map
    value = self.construct_mapping(node)
  File "E:\ChatTTS-Forge\py310\lib\site-packages\omegaconf\_utils.py", line 151, in construct_mapping
    return super().construct_mapping(node, deep=deep)
  File "E:\ChatTTS-Forge\py310\lib\site-packages\yaml\constructor.py", line 218, in construct_mapping
    return super().construct_mapping(node, deep=deep)
  File "E:\ChatTTS-Forge\py310\lib\site-packages\yaml\constructor.py", line 143, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
  File "E:\ChatTTS-Forge\py310\lib\site-packages\yaml\constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "E:\ChatTTS-Forge\py310\lib\site-packages\omegaconf\_utils.py", line 183, in <lambda>
    lambda loader, node: pathlib.PosixPath(*loader.construct_sequence(node)),
  File "E:\ChatTTS-Forge\py310\lib\pathlib.py", line 962, in __new__
    raise NotImplementedError("cannot instantiate %r on your system"
NotImplementedError: cannot instantiate 'PosixPath' on your system

不勾选Enable Enhance可以正常运行

zhzLuke96 commented 4 months ago

fixed 61d9809804ad8c141d36afde51a608734a105662