MoneyPrinterTurbo icon indicating copy to clipboard operation
MoneyPrinterTurbo copied to clipboard

生成音频的时候报sub_maker错误

Open jakubik2023 opened this issue 2 years ago • 1 comments

generating audio

2024-04-08 00:27:29 | INFO | "./app/services/voice.py:997": tts - start, voice name: en-US-AnaNeural, try: 1 2024-04-08 00:27:29 | WARNING | "./app/services/voice.py:1012": tts - failed, sub_maker is None or sub_maker.subs is None 2024-04-08 00:27:29 | INFO | "./app/services/voice.py:997": tts - start, voice name: en-US-AnaNeural, try: 2 2024-04-08 00:27:29 | WARNING | "./app/services/voice.py:1012": tts - failed, sub_maker is None or sub_maker.subs is None 2024-04-08 00:27:29 | INFO | "./app/services/voice.py:997": tts - start, voice name: en-US-AnaNeural, try: 3 2024-04-08 00:27:30 | WARNING | "./app/services/voice.py:1012": tts - failed, sub_maker is None or sub_maker.subs is None 2024-04-08 00:27:30 | ERROR | "./app/services/task.py:80": start - failed to generate audio, maybe the network is not available. if you are in China, please use a VPN. 2024-04-08 00:27:30.326 Uncaught app exception Traceback (most recent call last): File "/root/anaconda3/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script exec(code, module.dict) File "/opt/MoneyPrinterTurbo/webui/Main.py", line 380, in video_files = result.get("videos", []) AttributeError: 'NoneType' object has no attribute 'get'

jakubik2023 avatar Apr 07 '24 16:04 jakubik2023

  1. 首先启用全局vpn,确保llm可以调用;
  2. 设置"voice_name": "zh-CN-XiaoxiaoNeural-Female",其实就是设置一个中文的语音;

PS:voice_name我没有测过其他的,不知道是传空的不行还是其他语言不行。我使用的是edge-tts,whisper的没有试过。

下面是一个示例请求参数:

{
    "video_subject": "在这个快节奏的生活里,我们常常忘了停下脚步,寻找那些让心灵微笑的瞬间。\\n从今天开始,给自己的生活增添一抹色彩。尝试一项新的爱好,无论是画画、烹饪,还是学习一门新乐器。\\n找回与家人朋友共度的欢乐时光。在自然中放松身心,让爱和笑声充满你的每一天。\\n偶尔,给自己一点独处的时间。在星空下散步,或是静静地阅读一本书,找到属于自己的平静。\\n生活的乐趣无处不在,只要你愿意去发现。今天,就从一个小小的改变开始,让我们的生活更加丰富多彩。",
    "video_language": "zh-CN",
    "video_script": "在这个快节奏的生活里,我们常常忘了停下脚步,寻找那些让心灵微笑的瞬间。从今天开始,给自己的生活增添一抹色彩。尝试一项新的爱好,无论是画画、烹饪,还是学习一门新乐器。找回与家人朋友共度的欢乐时光。在自然中放松身心,让爱和笑声充满你的每一天。偶尔,给自己一点独处的时间。在星空下散步,或是静静地阅读一本书,找到属于自己的平静。生活的乐趣无处不在,只要你愿意去发现。今天,就从一个小小的改变开始,让我们的生活更加丰富多彩。",
    "video_terms": "enjoying life, finding happiness, learning hobbies, family joy, nature relaxation",
    "video_concat_mode": "random",
    "video_aspect": "9:16",
    "video_clip_duration": 3,
    "video_count": 1,
    "voice_name": "zh-CN-XiaoxiaoNeural-Female",
    "voice_volume": 1.0,
    "bgm_volume": 0.2,
    "subtitle_enabled": true,
    "font_name": "STHeitiLight.ttc",
    "subtitle_position": "bottom",
    "text_fore_color": "#FFFFFF",
    "font_size": 60,
    "stroke_color": "#000000",
    "stroke_width": 1.5
}

KevinZhang19870314 avatar Apr 08 '24 01:04 KevinZhang19870314

failed to generate audio, maybe the network is not available. if you are in China, please use a VPN

网络问题,用全局VPN流量

harry0703 avatar Apr 08 '24 02:04 harry0703