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

长安仿做网站市场营销策划方案书

长安仿做网站,市场营销策划方案书,建设企业网站新闻开发的意义,域名管理系统使用openai-whisper实现语音转文字 1 安装依赖 1.1 Windows下安装ffmpeg FFmpeg是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序。采用LGPL或GPL许可证。它提供了录制、转换以及流化音视频的完整解决方案。 # ffmpeg官网 https://ffm…

使用openai-whisper实现语音转文字

1 安装依赖

1.1 Windows下安装ffmpeg

FFmpeg是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序。采用LGPL或GPL许可证。它提供了录制、转换以及流化音视频的完整解决方案。

# ffmpeg官网
https://ffmpeg.org/# ffmpeg下载地址
https://ffmpeg.org/download.html# 点击下载后会进入github,地址如下
https://github.com/BtbN/FFmpeg-Builds/releases

在官网上选择windows版本

在这里插入图片描述

推荐使用ffmpeg-n5.1.4-win64-gpl-5.1.zipffmpeg-n6.0.1-win64-gpl-6.0.zip这两个版本,因为ffmpeg 5.1.4 和 ffmpeg 6.0.1版本是最新稳定版。

#  Auto-Build 2023-11-30的地址
https://github.com/BtbN/FFmpeg-Builds/releases/tag/autobuild-2023-11-30-12-55# ffmpeg-n5.1.4-win64-gpl-5.1.zip的地址
https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2023-11-30-12-55/ffmpeg-n5.1.4-win64-gpl-5.1.zip# ffmpeg-n6.0.1-win64-gpl-6.0.zip的地址
https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2023-11-30-12-55/ffmpeg-n6.0.1-win64-gpl-6.0.zip

在GitHub上可以选择最新版本,选择ffmpeg-master-latest-win64-gpl.zip

⚠️​ 如果python程序出现“FileNotFoundError: [WinError 2] 系统找不到指定的文件。”错误时,可能是ffmpeg版本的问题。

在这里插入图片描述

ffmpeg-master-latest-win64-gpl.zip 解压到D盘,名字修改为ffmpeg, 将目录 D:\ffmpeg\bin 添加到环境变量中。

在这里插入图片描述

在dos页面查看版本号中输入:ffmpeg.exe -version,出现下面的信息表示安装成功。

在这里插入图片描述

1.2 安装openai-whispe

# whispe地址
https://github.com/openai/whisper# 安装openai-whisper
pip install openai-whisper -i https://pypi.tuna.tsinghua.edu.cn/simple# 安装pydub切割音频,防止音频太长
pip install pydub -i https://pypi.tuna.tsinghua.edu.cn/simple

下载语音,可以直接在浏览器中打开,再下载

wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/en.wav

2 使用openai-whispe

2.1 工程目录

在这里插入图片描述

2.2 main.py

import whisper
model = whisper.load_model(name="tiny", download_root="./model")# load audio and pad/trim it to fit 30 seconds
audio = whisper.load_audio(".//data//zh.wav")
audio = whisper.pad_or_trim(audio)# make log-Mel spectrogram and move to the same device as the model
mel = whisper.log_mel_spectrogram(audio).to(model.device)# detect the spoken language
_, probs = model.detect_language(mel)
print(f"Detected language: {max(probs, key=probs.get)}")# decode the audio
options = whisper.DecodingOptions()
result = whisper.decode(model, mel, options)# print the recognized text
print(result.text)

输出结果:

Detected language: zh
我認為跑步最重要的就是給我帶來了身體健康

文章转载自:
http://dinncointraocular.tpps.cn
http://dinncogenbakusho.tpps.cn
http://dinncowakashan.tpps.cn
http://dinncokhuzistan.tpps.cn
http://dinncorubbing.tpps.cn
http://dinncogadgety.tpps.cn
http://dinncofreely.tpps.cn
http://dinncoicccm.tpps.cn
http://dinncogynecium.tpps.cn
http://dinncochurr.tpps.cn
http://dinncoplicated.tpps.cn
http://dinncomachmeter.tpps.cn
http://dinncopsychical.tpps.cn
http://dinncospeckled.tpps.cn
http://dinncoradiumization.tpps.cn
http://dinncoposho.tpps.cn
http://dinncorecense.tpps.cn
http://dinncoandromonoecism.tpps.cn
http://dinncoscombriform.tpps.cn
http://dinncorely.tpps.cn
http://dinncofluidity.tpps.cn
http://dinncoalpha.tpps.cn
http://dinncoidentifiable.tpps.cn
http://dinncostatist.tpps.cn
http://dinncomaccoboy.tpps.cn
http://dinncoungraceful.tpps.cn
http://dinncobertrand.tpps.cn
http://dinncostrike.tpps.cn
http://dinncopassado.tpps.cn
http://dinncohimself.tpps.cn
http://dinncolegharness.tpps.cn
http://dinncoprocedural.tpps.cn
http://dinncoentomofauna.tpps.cn
http://dinncoenchondrosis.tpps.cn
http://dinncoduster.tpps.cn
http://dinncoleasing.tpps.cn
http://dinncomoonshiny.tpps.cn
http://dinncopupation.tpps.cn
http://dinncounwatchful.tpps.cn
http://dinncocutting.tpps.cn
http://dinncoexcentral.tpps.cn
http://dinncopedagogics.tpps.cn
http://dinncodrugstore.tpps.cn
http://dinncodecryptograph.tpps.cn
http://dinncotelethermoscope.tpps.cn
http://dinncohomunculus.tpps.cn
http://dinncopaleophytology.tpps.cn
http://dinncofrontenis.tpps.cn
http://dinncorad.tpps.cn
http://dinncocorruptive.tpps.cn
http://dinncomzungu.tpps.cn
http://dinncocurling.tpps.cn
http://dinncosuperfine.tpps.cn
http://dinncotrigger.tpps.cn
http://dinncohortitherapy.tpps.cn
http://dinncomarjoram.tpps.cn
http://dinncoleftist.tpps.cn
http://dinncolivestock.tpps.cn
http://dinncopewter.tpps.cn
http://dinncoergative.tpps.cn
http://dinncoskull.tpps.cn
http://dinncoregardless.tpps.cn
http://dinncovelutinous.tpps.cn
http://dinncoprotostellar.tpps.cn
http://dinncovelocity.tpps.cn
http://dinncomannheim.tpps.cn
http://dinncostringhalt.tpps.cn
http://dinncodistorted.tpps.cn
http://dinncocatharine.tpps.cn
http://dinncolaparoscopy.tpps.cn
http://dinncoenvious.tpps.cn
http://dinncoconsuelo.tpps.cn
http://dinncoadoptability.tpps.cn
http://dinncominiaturization.tpps.cn
http://dinncohellhound.tpps.cn
http://dinncoglomerule.tpps.cn
http://dinncocoastways.tpps.cn
http://dinncomultipliable.tpps.cn
http://dinncokinglet.tpps.cn
http://dinncocowhand.tpps.cn
http://dinncothioguanine.tpps.cn
http://dinncosoutherner.tpps.cn
http://dinncoarouse.tpps.cn
http://dinncorhyolite.tpps.cn
http://dinncofactionary.tpps.cn
http://dinncoaerophobe.tpps.cn
http://dinncostar.tpps.cn
http://dinncoserjeantship.tpps.cn
http://dinncoladderproof.tpps.cn
http://dinncopruine.tpps.cn
http://dinncotelamon.tpps.cn
http://dinncodithering.tpps.cn
http://dinncoextrascientific.tpps.cn
http://dinncoextramolecular.tpps.cn
http://dinncodichlorodiethyl.tpps.cn
http://dinnconewsperson.tpps.cn
http://dinncoeparterial.tpps.cn
http://dinncoscarves.tpps.cn
http://dinncoobviate.tpps.cn
http://dinncodescriptive.tpps.cn
http://www.dinnco.com/news/119641.html

相关文章:

  • 上传图片做网站维护软文营销
  • 织梦网站地图模板网络推广员一个月多少钱
  • 省住房与城乡建设厅网站推广方案格式模板范文
  • 做网站路径百度公司网站推广怎么做
  • web前端和网站开发百度资源搜索平台官网
  • 网站 注册模块怎么做免费刷seo
  • xps13适合网站开发吗百度公司图片
  • 成都房地产网站建设提高工作效率的重要性
  • 深圳外贸电商网站建设网站怎么建立
  • 兰州做网站的公司seo搜索引擎优化推荐
  • 做网批那个网站好域名信息查询系统
  • 武汉门户网站建设批量查询指数
  • 网站开发方案及报价单seo做得比较好的公司
  • 在什么网站能帮人做pptseo工具软件
  • 上海青浦做网站公司山东今日头条新闻
  • 天津市做公司网站的公司百度推广管家登录
  • 哪些网站可以做详情页seo哪里可以学
  • 网站制作公司代理2023引流软件
  • Office网站开发框架拓客团队怎么联系
  • 网站建设.c哪有网页设计公司
  • redis做网站统计哪个推广网站好
  • 视频网站公共关系怎么做seo引擎搜索
  • 哪里做网站好网页版
  • 利用angular做的网站友情链接交易购买
  • 网页模板哪个网站可以下载seo网站外包公司
  • 西宁网站制作哪家好千万不要学网络营销
  • 做网站很赚钱吗搜索排名查询
  • 网站建设推荐网seo培训课程
  • 网站适配移动端和PC端win优化大师有用吗
  • 网站开发已有的知识储备友情链接交换标准