Closed scj725 closed 3 months ago
完整日志发一下。 两个可能原因: 1. ffmpeg 版本不对。 2. 某些云服务没有启用。 建议先看我的教程。
ffmpeg 本地安装了,版本是:14.1.0。python版本是:3.11.8。大模型用的ollama服务,语音用的chatTTS,已经试听过了,没问题,也看到了chatTTS接受了请求,这个时候还要用云服务才能行吗?无论是混剪还是AI自动生成,都是在生成视频字幕的时候报错,没有找到日志文件,报错内容就是:keyword: Keywords: Comedy Videos, Entertainment, Social Impact, Creativity, Global Connection main_generate_video_content end main_generate_ai_video begin: main_generate_video_dubbing begin use local audio {'text': ['标题:爆笑不停,搞笑视频的魅力与影响力\n\n在快节奏的现代生活中,人们对于轻松愉快的内容需求日益增长。在这种背 景下,搞笑视频作为一种独特的娱乐形式,以轻松幽默的方式为观众带来欢声笑语和放松心情的机会。本文将深入探讨搞笑视频的魅力、其背后的制作技巧以及它对社会和文化的影响。\n\n### 搞笑视频的魅力\n\n搞笑视频之所以吸引人,首先在于它们能够快速捕捉并传达情感共鸣。通过夸张的表演、出乎意料的情节设置或是幽默的语言,这些视频能迅速引起观众的会心一笑或捧腹大笑,从而在短时间内释放压力和焦虑。此外,搞笑视频往往具有高度的共享性——人们喜欢与他人分享快乐的瞬间,在社交媒体上转发和评论,使得内容得以快速传播。\n\n### 制作技巧揭秘\n\n要创作出成功的搞笑视频,制作者不仅需要具备出色的创意能力,还需掌握一定的制作技巧。首先,故事是基础,一个好的故事结构能够为后续幽默元素的植入提供框架;其次,夸张的表现手法可以放大笑点,使观众在视觉和听觉上都能感受到幽默感;此外,适时的剪辑与配乐也非常重要,它们能增强视频的情感张力,并提升整体观赏体验。\n\n### 社会影响\n\n搞笑视频对社会的影响是多方面的。一方面,它作为一种文化现象,反映了当代社会的价值观、流行趋势和人们的生活态度。通过娱乐的形式探讨严肃话题,使得复杂的问题以易于理解的方式被大众接受。另一方面,搞笑视频的全球传播特性促进了文化的交流与融合,为不同地区的人们提供了共同的幽默语言。\n\n### 结语\n\n总的来说,搞笑视频以其独特魅力在现代文化中占据一席之地。它不仅满足了人们寻求乐趣的需求,还通过创意和共享的过程促进了社会的多样性和包容性。随着技术的发展和全球化的加深,搞笑视频的影响力还将继续扩大,成为连接人与人、跨越地域界限的重要桥梁。\n\n---\n以上内容阐述了搞笑视频的魅力所在、其背后的制作技巧以及它在社会文化层面 的影响。希望这些洞察能为喜爱搞笑视频的人提供更深层次的理解,并激发更多创作者探索这一领域,创造更多令人捧腹的精彩作品。'], 'stream': False, 'lang': None, 'skip_refine_text': False, 'refine_text_only': False, 'use_decoder': True, 'audio_seed': 20, 'text_seed': 20, 'do_text_normalization': True, 'do_homophone_replacement': False, 'params_refine_text': {'prompt': '', 'top_P': 0.7, 'top_K': 20, 'temperature': 0.3, 'repetition_penalty': 1, 'max_new_token': 384, 'min_new_token': 0, 'show_tqdm': True, 'ensure_non_empty': True, 'stream_batch': 24}, 'params_infer_code': {'prompt': '[speed_5]', 'top_P': 0.7, 'top_K': 20, 'temperature': 0.3, 'repetition_penalty': 1.05, 'max_new_token': 2048, 'min_new_token': 0, 'show_tqdm': True, 'ensure_non_empty': True, 'stream_batch': True, 'spk_emb': None}} ffmpeg version N-116088-ge783e45e29-20240702 Copyright (c) 2000-2024 the FFmpeg developers built with gcc 14.1.0 (crosstool-NG 1.26.0.93_a87bf7f) configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-libxml2 --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --enable-libdvdread --enable-libdvdnav --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libaribcaption --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs=-lgomp --extra-ldflags=-pthread --extra-ldexeflags= --cc=x86_64-w64-mingw32-gcc --cxx=x86_64-w64-mingw32-g++ --ar=x86_64-w64-mingw32-gcc-ar --ranlib=x86_64-w64-mingw32-gcc-ranlib --nm=x86_64-w64-mingw32-gcc-nm --extra-version=20240702 libavutil 59. 28.100 / 59. 28.100 libavcodec 61. 9.100 / 61. 9.100 libavformat 61. 4.100 / 61. 4.100 libavdevice 61. 2.100 / 61. 2.100 libavfilter 10. 2.102 / 10. 2.102 libswscale 8. 2.100 / 8. 2.100 libswresample 5. 2.100 / 5. 2.100 libpostproc 58. 2.100 / 58. 2.100 Input #0, mp3, from 'E:\pyCharmProject\MoneyPrinterPlus\work\0.mp3': Metadata: encoder : Lavf60.16.100 Duration: 00:00:29.50, start: 0.023021, bitrate: 128 kb/s Stream #0:0: Audio: mp3 (mp3float), 48000 Hz, stereo, fltp, 128 kb/s Metadata: encoder : Lavf Stream mapping: Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native)) Press [q] to stop, [?] for help Output #0, wav, to 'E:\pyCharmProject\MoneyPrinterPlus\work\1721292271501.wav': Metadata: ISFT : Lavf61.4.100 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s Metadata: encoder : Lavc61.9.100 pcm_s16le [out#0/wav @ 000002388c630140] video:0KiB audio:5526KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.001378% size= 5526KiB time=00:00:29.47 bitrate=1536.0kbits/s speed= 143x Extracted files into E:\pyCharmProject\MoneyPrinterPlus\work\1721292271501.wav main_generate_video_dubbing end main_generate_subtitle begin: selected_audio_provider: Azure Encountered error. Cancellation details: CancellationDetails(reason=CancellationReason.Error, error_details="Connection failed (no connection to the remote host). Internal error: 1. Error details: Failed with error: WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED wss://SERVICE_REGION.stt.speech.microsoft.com/speech/universal/v2 X-ConnectionId: 9c29e6cd03a84b998cde5d84bf533636 SessionId: 9c29e6cd03a84b998cde5d84bf533636")
Session stopped. 2024-07-18 16:49:19.622 Uncaught app exception Traceback (most recent call last): File "D:\python\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 575, in _run_script self._session_state.on_script_will_rerun( File "D:\python\Lib\site-packages\streamlit\runtime\state\safe_session_state.py", line 65, in on_script_will_rerun self._state.on_script_will_rerun(latest_widget_states) File "D:\python\Lib\site-packages\streamlit\runtime\state\session_state.py", line 517, in on_script_will_rerun self._call_callbacks() File "D:\python\Lib\site-packages\streamlit\runtime\state\session_state.py", line 530, in _call_callbacks self._new_widget_state.call_callback(wid) File "D:\python\Lib\site-packages\streamlit\runtime\state\session_state.py", line 274, in call_callback callback(*args, **kwargs) File "E:\pyCharmProject\MoneyPrinterPlus\pages\01_auto_video.py", line 72, in generate_video main_generate_ai_video(video_generator) File "E:\pyCharmProject\MoneyPrinterPlus\main.py", line 268, in main_generate_ai_video main_generate_subtitle() File "E:\pyCharmProject\MoneyPrinterPlus\main.py", line 257, in main_generate_subtitle generate_caption() File "E:\pyCharmProject\MoneyPrinterPlus\services\captioning\captioning_service.py", line 60, in generate_caption captioning.finish() File "E:\pyCharmProject\MoneyPrinterPlus\services\captioning\common_captioning_service.py", line 204, in finish for caption in self.captions_from_offline_results(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pyCharmProject\MoneyPrinterPlus\services\captioning\common_captioning_service.py", line 187, in captions_from_offline_results last_caption = captions[-1]
IndexError: list index out of range
TTS可以本地了,但是语音识别功能还需要云服务。 后续会加上本地的语音识别功能。
本地语音识别服务fasterWhisper已经上线了。
膜拜大佬,赶紧尝鲜一下
File "D:\python\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 575, in _run_script self._session_state.on_script_will_rerun( File "D:\python\Lib\site-packages\streamlit\runtime\state\safe_session_state.py", line 65, in on_script_will_rerun self._state.on_script_will_rerun(latest_widget_states) File "D:\python\Lib\site-packages\streamlit\runtime\state\session_state.py", line 517, in on_script_will_rerun self._call_callbacks() File "D:\python\Lib\site-packages\streamlit\runtime\state\session_state.py", line 530, in _call_callbacks self._new_widget_state.call_callback(wid) File "D:\python\Lib\site-packages\streamlit\runtime\state\session_state.py", line 274, in call_callback callback(*args, **kwargs) File "E:\pyCharmProject\MoneyPrinterPlus\pages\02_mix_video.py", line 83, in generate_video_for_mix main_generate_ai_video_for_mix(video_generator) File "E:\pyCharmProject\MoneyPrinterPlus\main.py", line 342, in main_generate_ai_video_for_mix main_generate_subtitle() File "E:\pyCharmProject\MoneyPrinterPlus\main.py", line 257, in main_generate_subtitle generate_caption() File "E:\pyCharmProject\MoneyPrinterPlus\services\captioning\captioning_service.py", line 60, in generate_caption captioning.finish() File "E:\pyCharmProject\MoneyPrinterPlus\services\captioning\common_captioning_service.py", line 204, in finish for caption in self.captions_from_offline_results(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pyCharmProject\MoneyPrinterPlus\services\captioning\common_captioning_service.py", line 187, in captions_from_offline_results last_caption = captions[-1]