GPT-SoVITS icon indicating copy to clipboard operation
GPT-SoVITS copied to clipboard

多语种混合broken, AttributeError: module 'LangSegment' has no attribute 'setfilters'

Open MissingTwins opened this issue 11 months ago • 1 comments

Language for reference audio 如果和 Inference text language 选的语言不一样就会出错。 之前版本没有问题。 OS: Ubuntu Server 22.04 LTS

image

实际输入的参考文本: 山上一只虎, 林中一只鹿, 路边一头猪, 草里一只兔, 还有一只鼠。 数一数, 一二三四五。
实际输入的目标文本: 日语学习的第一个门槛便是五十音图。五十音图中,横排为“行”,竖排为“段”。例如,“あいうえお”叫做“あ行”,“かきくけこ”叫做“か行”,竖排的则分别被称为“あ段”、“い段”等。
实际输入的目标文本(切句后): 日语学习的第一个门槛便是五十音图
五十音图中,横排为“行”,竖排为“段”
例如,“あいうえお”叫做“あ行”,“かきくけこ”叫做“か行”,竖排的则分别被称为“あ段”、“い段”等
实际输入的目标文本(每句): 日语学习的第一个门槛便是五十音图。
Traceback (most recent call last):
  File "/home/ben/work/SoVITS/lib/python3.10/site-packages/gradio/routes.py", line 442, in run_predict
    output = await app.get_blocks().process_api(
  File "/home/ben/work/SoVITS/lib/python3.10/site-packages/gradio/blocks.py", line 1389, in process_api
    result = await self.call_function(
  File "/home/ben/work/SoVITS/lib/python3.10/site-packages/gradio/blocks.py", line 1108, in call_function
    prediction = await utils.async_iteration(iterator)
  File "/home/ben/work/SoVITS/lib/python3.10/site-packages/gradio/utils.py", line 346, in async_iteration
    return await iterator.__anext__()
  File "/home/ben/work/SoVITS/lib/python3.10/site-packages/gradio/utils.py", line 339, in __anext__
    return await anyio.to_thread.run_sync(
  File "/home/ben/work/SoVITS/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/home/ben/work/SoVITS/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    return await future
  File "/home/ben/work/SoVITS/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
  File "/home/ben/work/SoVITS/lib/python3.10/site-packages/gradio/utils.py", line 322, in run_sync_iterator_async
    return next(iterator)
  File "/home/ben/work/SoVITS/lib/python3.10/site-packages/gradio/utils.py", line 691, in gen_wrapper
    yield from f(*args, **kwargs)
  File "/home/ben/work/SoVITS/GPT-SoVITS/GPT_SoVITS/inference_webui.py", line 375, in get_tts_wav
    phones2,bert2,norm_text2=get_phones_and_bert(text, text_language)
  File "/home/ben/work/SoVITS/GPT-SoVITS/GPT_SoVITS/inference_webui.py", line 260, in get_phones_and_bert
    LangSegment.setfilters(["zh","ja","en"])
AttributeError: module 'LangSegment' has no attribute 'setfilters'

出错代码位置,一周前有改动 https://github.com/RVC-Boss/GPT-SoVITS/blame/939971afe3770c530b0bc0f9a1d5824a1786411d/GPT_SoVITS/inference_webui.py#L260

MissingTwins avatar Feb 27 '24 14:02 MissingTwins

没有更新依赖包,与语言选项无关。仅仅是因为默认选择纯中纯日时不会调用LangSegment所以没报错

KamioRinn avatar Feb 27 '24 14:02 KamioRinn

pip把LangSegment升级下

RVC-Boss avatar Feb 28 '24 02:02 RVC-Boss

Thank you for the fast response, I have been able to fix the issue by upgrade LangSegment to 0.2.3

MissingTwins avatar Feb 28 '24 03:02 MissingTwins