You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
from B1_Mp4ToWav import *
|
|
|
|
|
from B2_WavToText import *
|
|
|
|
|
from B3_TextSummarize import *
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
# 1、根据云校的视频课程下载视频文件
|
|
|
|
|
|
|
|
|
|
# 2、调用ffmpeg将视频文件转成wav文件
|
|
|
|
|
# convert_mp4_to_wav(r"D:\backup\七年级第三单元复习课.mp4",
|
|
|
|
|
# output_path=r"D:\backup\123.wav")
|
|
|
|
|
# 3、将转换完成的WAV上传到阿里云
|
|
|
|
|
|
|
|
|
|
# 4、调用阿里云的语音识别API,将wav文件转成文字
|
|
|
|
|
#audio_url = "https://ylt.oss-cn-hangzhou.aliyuncs.com/HuangHai/123.wav"
|
|
|
|
|
#ShiBie(audio_url, Path("识别结果.txt"))
|
|
|
|
|
# 2.5元一小时,本音频文件45分钟,约2元
|
|
|
|
|
|
|
|
|
|
# 6、生成总结
|
|
|
|
|
input_file = Path(r"D:\dsWork\QingLong\AI\音频文本.txt")
|
|
|
|
|
output_file = Path(r"D:\dsWork\QingLong\AI\分析结果.txt")
|
|
|
|
|
analyzer_action(input_file, output_file)
|