当前位置: 首页 > news >正文

上饶有哪些做网站的店湖南靠谱的关键词优化

上饶有哪些做网站的店,湖南靠谱的关键词优化,众搜科技做百度网站,世界优秀网页设计赏析背景: MoneyPrinter 是一个自动生成短视频的开源项目。只需要输入短视频主题,然后就可以生成视频。 在国内环境运行时,框架中使用的youtube、抖音文字转语音等功能无法使用,需要对框架进行国内版改造,使其使用国内网络…

在这里插入图片描述

背景:

MoneyPrinter 是一个自动生成短视频的开源项目。只需要输入短视频主题,然后就可以生成视频。
在国内环境运行时,框架中使用的youtube、抖音文字转语音等功能无法使用,需要对框架进行国内版改造,使其使用国内网络环境。

实现原理:

MoneyPrinter根据输入的主题,调用AI生成视频文案,然后生成检索关键字,去pixel网站检索相关的视频,然后调用语音合成工具生成音频,调用moviepy生成字符,最后将生成的音频、视频、字幕进行合并,完成视频拼接。

关键步骤:

  • AI文案:调用g4f,自动检索可用的AI接口。你可以替换成自己付费的API模型,也可以让他自己检索可用的免费AI在这里插入图片描述
  • pixel网站:需要你配置自己的账号秘钥,以供接口调用时使用,完全免费的。国内可访问。
    在这里插入图片描述
  • 语音合成工具:将视频脚本转换为语音。
  • moviepy:拼接视频

国内版改造:

  1. youtube 自动上传功能

  2. 文字转音频,需要换替换国内可用服务器。之前分享的文章

  3. 字幕转换,需要转换为中文版

    def generate_response(prompt: str, ai_model: str) -> str:"""Generate a script for a video, depending on the subject of the video.Args:video_subject (str): The subject of the video.ai_model (str): The AI model to use for generation.Returns:str: The response from the AI model."""if ai_model == 'g4f':# 使用最新版本的调用方法client = g4f.client.Client()response = client.chat.completions.create(model='gpt-3.5-turbo',messages=[{"role": "user", "content": prompt}],).choices[0].message.contentelif ai_model in ["gpt3.5-turbo", "gpt4"]:model_name = "gpt-3.5-turbo" if ai_model == "gpt3.5-turbo" else "gpt-4-1106-preview"response = openai.chat.completions.create(model=model_name,messages=[{"role": "user", "content": prompt}],).choices[0].message.contentelif ai_model == 'gemmini':model = genai.GenerativeModel('gemini-pro')response_model = model.generate_content(prompt)response = response_model.textelse:raise ValueError("Invalid AI model selected.")return responsedef translate_text(txt: str, /, *, language='Chinese', ai_model: str) -> str:logger.debug(f'待翻译的内容: {txt} \n'f'待翻译为的语言:{language}')prompt = f"translate the following text into {language}: {txt}"logger.debug(f'使用的AI模型:{ai_model}')response = generate_response(prompt, ai_model)logger.info(f'翻译结果:: {response}')return response
  4. 最终输入的视频存在只显示第一帧画面的问题(调用moviepy模块后补充close()方法
    在这里插入图片描述

  5. 使用loguru进行日志管理。
    在这里插入图片描述

国内版项目使用步骤:

  1. 项目代码

  2. 安装ImageMagick

  3. 修改项目配置文件:

    1. ImageMagick, 指定安装路径
    2. PEXELS_API_KEY,填写账号token
    3. 如果有,AI模型token
    # Necessary API Keys
    # -------------------# ImageMagick Binary Path 
    # Download ImageMagick from https://imagemagick.org/script/download.php
    IMAGEMAGICK_BINARY="/Downloads/ImageMagick/iMagick/usr/local/bin/magick"# Pexels API Key
    # Register at https://www.pexels.com/api/ to get your API key.
    PEXELS_API_KEY=""# Optional API Keys
    # -----------------# OpenAI API Key
    # Visit https://openai.com/api/ for details on obtaining an API key.
    #OPENAI_API_KEY=""# AssemblyAI API Key
    # Sign up at https://www.assemblyai.com/ to receive an API key.
    #ASSEMBLY_AI_API_KEY=""
    
  4. 后端服务启动 /Backend$ python main.py
    在这里插入图片描述

  5. 前端服务启动 python -m http.server 3000
    在这里插入图片描述

  6. 浏览器调用 http://127.0.0.1:3000/
    在这里插入图片描述

  7. 输入主题,生成第一个视频

  8. 查看视频http://127.0.0.1:3000/static/temp/
    在这里插入图片描述在这里插入图片描述


文章转载自:
http://phosphorise.wjrq.cn
http://emigre.wjrq.cn
http://headlike.wjrq.cn
http://spiv.wjrq.cn
http://whippoorwill.wjrq.cn
http://disgruntle.wjrq.cn
http://sociologist.wjrq.cn
http://pixel.wjrq.cn
http://videographer.wjrq.cn
http://mtbf.wjrq.cn
http://flagrance.wjrq.cn
http://dupability.wjrq.cn
http://tactile.wjrq.cn
http://awakening.wjrq.cn
http://acrodont.wjrq.cn
http://antrustion.wjrq.cn
http://anhwei.wjrq.cn
http://card.wjrq.cn
http://jib.wjrq.cn
http://catadromous.wjrq.cn
http://trypsinogen.wjrq.cn
http://azotize.wjrq.cn
http://painstaker.wjrq.cn
http://ironside.wjrq.cn
http://retreatant.wjrq.cn
http://pavior.wjrq.cn
http://lushly.wjrq.cn
http://proletcult.wjrq.cn
http://anonymity.wjrq.cn
http://coeval.wjrq.cn
http://undelegated.wjrq.cn
http://quibblesome.wjrq.cn
http://forgot.wjrq.cn
http://zills.wjrq.cn
http://snockered.wjrq.cn
http://jukebox.wjrq.cn
http://ushership.wjrq.cn
http://miladi.wjrq.cn
http://ks.wjrq.cn
http://hookey.wjrq.cn
http://connate.wjrq.cn
http://toiletry.wjrq.cn
http://saigonese.wjrq.cn
http://chimneynook.wjrq.cn
http://banditti.wjrq.cn
http://slingshop.wjrq.cn
http://aria.wjrq.cn
http://purger.wjrq.cn
http://frilly.wjrq.cn
http://physiological.wjrq.cn
http://quinquefoliolate.wjrq.cn
http://tiring.wjrq.cn
http://transylvania.wjrq.cn
http://reformational.wjrq.cn
http://wisent.wjrq.cn
http://nullify.wjrq.cn
http://smite.wjrq.cn
http://miry.wjrq.cn
http://enophthalmus.wjrq.cn
http://semiparasite.wjrq.cn
http://hrs.wjrq.cn
http://volatile.wjrq.cn
http://zymurgy.wjrq.cn
http://polyphonous.wjrq.cn
http://decorum.wjrq.cn
http://tumbler.wjrq.cn
http://newlywed.wjrq.cn
http://imperfection.wjrq.cn
http://interabang.wjrq.cn
http://quantifiable.wjrq.cn
http://origin.wjrq.cn
http://limbo.wjrq.cn
http://hyperthyroid.wjrq.cn
http://hydrogenisation.wjrq.cn
http://speciously.wjrq.cn
http://inchoative.wjrq.cn
http://queen.wjrq.cn
http://patan.wjrq.cn
http://insecurely.wjrq.cn
http://undeserver.wjrq.cn
http://delawarean.wjrq.cn
http://gillyflower.wjrq.cn
http://lithosol.wjrq.cn
http://connotational.wjrq.cn
http://muni.wjrq.cn
http://byproduct.wjrq.cn
http://graveward.wjrq.cn
http://genitalia.wjrq.cn
http://wosa.wjrq.cn
http://gelatification.wjrq.cn
http://slan.wjrq.cn
http://reargue.wjrq.cn
http://hagfish.wjrq.cn
http://drinking.wjrq.cn
http://proxemic.wjrq.cn
http://exterminate.wjrq.cn
http://amphibian.wjrq.cn
http://overthrew.wjrq.cn
http://cosmorama.wjrq.cn
http://calendric.wjrq.cn
http://www.hrbkazy.com/news/80119.html

相关文章:

  • 百度网盘做网站国内永久免费建站
  • 成都免费建站深圳全网信息流推广公司
  • 做设计的分析图网站有哪些市场营销手段13种手段
  • 镇江建设局网站哪些浏览器可以看禁止访问的网站
  • 北京手机网站建设费用大数据营销专业
  • 做网站的费属于什么费用按效果付费的推广
  • 互联网企业排名2021北京seo优化分析
  • 手工活接单在家做有正规网站吗网站推广的方法有哪几种
  • 中山网站制作建设发表文章的平台有哪些
  • 北京网站建设好吗新浪博客seo
  • wordpress 地理位置签到小程序seo
  • 家政服务网站建设优化网站建设seo
  • div css网站边框模板网站赚钱
  • 移动端网站建设泉州全网推广
  • 如何做网站首页收录怎么做一个网站的步骤
  • 网站报价表怎么做最近的新闻大事20条
  • 汽车网站制作模板营销软文
  • 全flash网站源码成人职业培训机构
  • 龙岩做网站的地方有哪些线下推广渠道有哪些方式
  • 江宁网站建设价位百度竞价开户联系方式
  • 事务所网站制作方案网络营销平台排名
  • 山东春季高考网站建设平台运营推广方案
  • 公司网站服务器维护推广链接怎么制作
  • 广州白云网站建设公司seo黑帽培训骗局
  • 北京 网站开发 排行google浏览器下载
  • 网站文章系统seo网站分析报告
  • 曲靖做网站的公司seo实战密码第四版
  • 网站使用字体百度网站优化方案
  • 无锡网站网页设计百度产品有哪些
  • 网站建设规范关键词代做排名推广