网友回复
1、python语音识别可以使用speech_recognition
安装pip install speech_recognition
识别代码:
# -*- coding: utf-8 -*- # /usr/bin/python import speech_recognition as sr r = sr.Recognizer() #调用识别器 test = sr.AudioFile("/data/wwwroot/default/asset/voice.flac") #导入语音文件 with test as source: audio = r.record(source) type(audio) c=r.recognize_sphinx(audio, language='zh-cn') #识别输出 print(c)注意:pocketsphinx需要安装的中文语言、声学模型
下载地址:ht...
点击查看剩余70%
还可以使用微软的文字转语音服务,支持140种语言,声音非常接近人声
import asyncio from msspeech import MSSpeech async def main(): mss = MSSpeech() print("Geting voices...") voices = await mss.get_voices_list() print("人工智能是未来") for voice in voices: if voice["Loca...
点击查看剩余70%
openai发布的agentkit与coze扣子、dify等流程搭建智能体有啥不同?
阿里云上的ecs镜像存储还要钱,如何免费下载到本地以后再创建?
如何通过调用大模型api实现输入一个商品图片生成模特展示解说的宣传短片?
qwen千问大模型api如何内置互联网搜索?
YOLO如何结合opencv实现视觉实时摔倒检测?
html中内嵌style与link引入css代码报错的处理机制不同?
coze扣子中调用seadream4多参考图修改ps图片如何返回图片尺寸设为第一个图片的尺寸?
coze扣子中如何将原图缩放到指定尺寸?
如何解决传大文件突然断网重传的问题?
CefSharp与Electron开发桌面应用哪个更好?