harry0703 / MoneyPrinterTurbo

利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

生成音频时报错

jerryblues opened this issue · comments

generating audio

2024-03-25 16:35:38.413 | INFO | app.services.voice:tts:12 - start, voice name: zh-CN-XiaoxiaoNeural
2024-03-25 16:40:39.370 | ERROR | app.services.voice:tts:29 - failed, error:
2024-03-25 16:40:39.371 | ERROR | app.services.task:start:77 - failed to generate audio, maybe the network is not available. if you are in China, please use a VPN.

经过测试,在linux服务器上,使用 edge-tts,也无法正常文字转语音,这是为啥,服务器上也已经配了代理服务器,linux上的服务器可以访问 google 和 microsoft azune

另外,配置文件中 subtitle_provider = "whisper" 或 "edge" 都测试过,是一样的报错

求指点~

这个应该就是网络问题

  1. tts走的是websocket
  2. whipser需要访问 huggingface 下载模型

通过 proxychains 解决了,thanks

请问如何解决的?我mac电脑全局已经配置了VPN,可以翻墙,但是,这个项目还是报这个错

commented

请问如何解决的?我mac电脑全局已经配置了VPN,可以翻墙,但是,这个项目还是报这个错
同样问题 请问你解决了吗?

请问如何解决的?我mac电脑全局已经配置了VPN,可以翻墙,但是,这个项目还是报这个错

我的方法如下,具体可以问下gpt proxychains的使用方法:
sudo apt-get install proxychains
编辑 /etc/proxychains.conf,在文件的末尾添加你的代理服务器
启动命令: proxychains

请问如何解决的?我mac电脑全局已经配置了VPN,可以翻墙,但是,这个项目还是报这个错
同样问题 请问你解决了吗?

我的方法如下,具体可以问下gpt proxychains的使用方法:
sudo apt-get install proxychains
编辑 /etc/proxychains.conf,在文件的末尾添加你的代理服务器
启动命令: proxychains

@lmx01 比如我的VPN,是类似这样的,设置就没问题了
image

或者你也可以试试 @jerryblues 的方法

我的在window上跑的,出现了下面的错误:

generating audio

2024-04-05 00:19:03 | INFO | "./app\services\voice.py:997": tts - start, voice name: , try: 1
2024-04-05 00:19:03 | ERROR | "./app\services\voice.py:1018": tts - failed, error: Invalid voice ''.
2024-04-05 00:19:03 | INFO | "./app\services\voice.py:997": tts - start, voice name: , try: 2
2024-04-05 00:19:03 | ERROR | "./app\services\voice.py:1018": tts - failed, error: Invalid voice ''.
2024-04-05 00:19:03 | INFO | "./app\services\voice.py:997": tts - start, voice name: , try: 3
2024-04-05 00:19:03 | ERROR | "./app\services\voice.py:1018": tts - failed, error: Invalid voice ''.
2024-04-05 00:19:03 | 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.
我已经开启了全局的VPN,也能访问GPT,楼上的方式我好像行不通,目前不知道如何处理?

搞不懂,已经在HK服务器上跑,也是这样

全局代理我这边也是失败的。
image
image

命令行执行

curl https://www.google.com

看看会不会报错

@JamesMonges 你这个是声音设置错了,你是用的API还是Web

命令行执行

curl https://www.google.com

看看会不会报错

我在终端中访问,无响应。并且 ping 也是失败的。但是浏览器可以打开 google.com.hk

对 音频合成得选语种一样的

对 音频合成得选语种一样的

+1 ,这个是导致这个问题的本质原因。如果你是使用中文,就需要选择中文的人声。

我curl可以正常请求https://www.google.com,但是还是报错2024-04-19 15:26:04 | INFO | "./app\services\voice.py:1042": azure_tts_v1 - start, voice name: , try: 1
2024-04-19 15:26:04 | ERROR | "./app\services\voice.py:1063": azure_tts_v1 - failed, error: Invalid voice ''.
2024-04-19 15:26:04 | INFO | "./app\services\voice.py:1042": azure_tts_v1 - start, voice name: , try: 2
2024-04-19 15:26:04 | ERROR | "./app\services\voice.py:1063": azure_tts_v1 - failed, error: Invalid voice ''.
2024-04-19 15:26:04 | INFO | "./app\services\voice.py:1042": azure_tts_v1 - start, voice name: , try: 3
2024-04-19 15:26:04 | ERROR | "./app\services\voice.py:1063": azure_tts_v1 - failed, error: Invalid voice ''.
2024-04-19 15:26:04 | 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. 要如何解决?

合成声音设置错误,比如用 zh-CN-XiaoxiaoNeural 试试看。具体的列表可以参考 docs 目录下面的 voice-list.txt

还是不行,我是windows,用的是api的形式,请求参数是{
"video_subject": "string",
"video_script": "风景如诗,风景如画。让我们一起探索那迷人的自然美景。从山脉到河流,从森林到草原,每一处都充满了生命的气息和大自然的魅力。站在山顶上,你可以感受到一种无名的力量,感受到自己与宇宙的联系。向下看,你可以看到风景的千变万化,这是一个充满活力和色彩的世界。不论是在日出时分欣赏湖面的晨雾,还是在夕阳时候欣赏傍晚的晚霞,自然景观始终让人心动。走进森林,你会听到鸟鸣,感受到清新的空气和生命的律动。在大沙漠中你会看到风的力量,感觉到一种孤独而美丽的寂静。每一处风景都在我们心中留下深刻的印象,唤起我们对世界的向往和对生活的热爱。",
"video_terms": "string",
"video_aspect": "9:16",
"video_concat_mode": "random",
"video_clip_duration": 5,
"video_count": 1,
"video_language": "zh",
"voice_name": "",
"voice_volume": 1,
"bgm_type": "random",
"bgm_file": "",
"bgm_volume": 0.2,
"subtitle_enabled": true,
"subtitle_position": "bottom",
"font_name": "STHeitiMedium.ttc",
"text_fore_color": "#FFFFFF",
"text_background_color": "transparent",
"font_size": 60,
"stroke_color": "#000000",
"stroke_width": 1.5,
"n_threads": 2,
"paragraph_number": 1,
"voice":"zh-CN-XiaoxiaoNeural"
},然后还是一样的报错

"voice_name": "zh-CN-XiaoxiaoNeural"

我看你发的请求参数,voice_name 是空的

我更换了voice_name后确实可以了,现在出现新的问题2024-04-19 16:22:46 | INFO | "./app\services\material.py:51": search_videos - searching videos: https://api.pexels.com/videos/search?query=Naruto%27s+Life+Journey&per_page=20&orientation=portrait, with proxies: {'http': 'http://xxx.xxx.xxx.xxx:xxxx', 'https': 'http://xxx.xxx.xxx.xxx:xxxx'}
2024-04-19 16:22:47 | ERROR | "./app\services\material.py:58": search_videos - search videos failed: {'status': 401, 'code': 'Unauthorized'}
2024-04-19 16:22:47 | INFO | "./app\services\material.py:140": download_videos - found 0 videos for 'Naruto's Life Journey'
2024-04-19 16:22:47 | INFO | "./app\services\material.py:51": search_videos - searching videos: https://api.pexels.com/videos/search?query=Rising+Hokage%3A+Naruto%27s+Legacy&per_page=20&orientation=portrait, with proxies: {'http': 'http://xxx.xxx.xxx.xxx:xxxx', 'https': 'http://xxx.xxx.xxx.xxx:xxxx'}
2024-04-19 16:22:48 | ERROR | "./app\services\material.py:58": search_videos - search videos failed: {'status': 401, 'code': 'Unauthorized'}
2024-04-19 16:22:48 | INFO | "./app\services\material.py:140": download_videos - found 0 videos for 'Rising Hokage: Naruto's Legacy'
2024-04-19 16:22:48 | INFO | "./app\services\material.py:51": search_videos - searching videos: https://api.pexels.com/videos/search?query=Friendship+%26+Dreams%3A+Naruto%27s+Tale&per_page=20&orientation=portrait, with proxies: {'http': 'http://xxx.xxx.xxx.xxx:xxxx', 'https': 'http://xxx.xxx.xxx.xxx:xxxx'}
2024-04-19 16:22:48 | ERROR | "./app\services\material.py:58": search_videos - search videos failed: {'status': 401, 'code': 'Unauthorized'}
2024-04-19 16:22:48 | INFO | "./app\services\material.py:140": download_videos - found 0 videos for 'Friendship & Dreams: Naruto's Tale'
2024-04-19 16:22:48 | INFO | "./app\services\material.py:51": search_videos - searching videos: https://api.pexels.com/videos/search?query=Ninja+Battles+%26+Triumphs%3A+Naruto%27s+Story&per_page=20&orientation=portrait, with proxies: {'http': 'http://xxx.xxx.xxx.xxx:xxxx', 'https': 'http://xxx.xxx.xxx.xxx:xxxx'}
2024-04-19 16:22:49 | ERROR | "./app\services\material.py:58": search_videos - search videos failed: {'status': 401, 'code': 'Unauthorized'}
2024-04-19 16:22:49 | INFO | "./app\services\material.py:140": download_videos - found 0 videos for 'Ninja Battles & Triumphs: Naruto's Story'
2024-04-19 16:22:49 | INFO | "./app\services\material.py:51": search_videos - searching videos: https://api.pexels.com/videos/search?query=From+Outcast+to+Hero%3A+Naruto%27s+Inspiring+Saga&per_page=20&orientation=portrait, with proxies: {'http': 'http://xxx.xxx.xxx.xxx:xxxx', 'https': 'http://xxx.xxx.xxx.xxx:xxxx'}
2024-04-19 16:22:50 | ERROR | "./app\services\material.py:58": search_videos - search videos failed: {'status': 401, 'code': 'Unauthorized'}
2024-04-19 16:22:50 | INFO | "./app\services\material.py:140": download_videos - found 0 videos for 'From Outcast to Hero: Naruto's Inspiring Saga'
2024-04-19 16:22:50 | INFO | "./app\services\material.py:148": download_videos - found total videos: 0, required duration: 131 seconds, found duration: 0.0 seconds
2024-04-19 16:22:50 | SUCCESS | "./app\services\material.py:176": download_videos - downloaded 0 videos
2024-04-19 16:22:50 | ERROR | "./app\services\task.py:123": start - failed to download videos, maybe the network is not available. if you are in China, please use a VPN. 这是我的代理的问题吗

这个是你的API KEY的问题,去 https://www.pexels.com/api/ 申请一个,免费的

这个是你的API KEY的问题,去 https://www.pexels.com/api/ 申请一个,免费的

申请完成后,填写在哪个地方?

在界面上,点击基础设置,填写进去即可

commented

我使用中文,选择zh-CN-XiaoxiaoNeural,少数情况可以生成语音,大部分时候出现:
failed to generate audio, maybe the network is not available. if you are in China, please use a VPN. 实在不知道怎么解决了

@lipeng1109 这个问题,一般还是网络原因,因为要连接微软的服务器(海外),网络不是特别好,建议你用VPN,就可以了