whisper get_writer srt_writer 参数说明

python 复制代码
lang="en"
constVideo = VideoConst("GV9AMT")
combineMp3Path = constVideo.getCombineMp3Path(lang)
srtPath = constVideo.getOutSrtAsrFixPath(lang=lang)
result, json_object = utilTts.whisper_transcribe_en(combineMp3Path)
srt_writer = get_writer("srt", constVideo.videoDir)
srt_writer(result, srtPath)

max_line_width

the maximum number of characters in a line before breaking the line

换行前一行中的最大字符数

max_line_count

the maximum number of lines in a segment

分段中的最大行数

highlight_words

underline each word as it is spoken in srt and vtt

在srt和vtt中说出的每个单词下面加下划线

max_words_per_line

no effect with --max_line_width) the maximum number of words in a segment

--max_line_width 有值是,max_words_per_line无效。 行中的最大单词数

参考:

How to Customize Subtitles with Whisper - CodePull

https://github.com/openai/whisper

相关推荐
二十雨辰20 小时前
[python]-AI大模型
开发语言·人工智能·python
不像程序员的程序媛20 小时前
Nginx日志切分
服务器·前端·nginx
Yvonne爱编码20 小时前
JAVA数据结构 DAY6-栈和队列
java·开发语言·数据结构·python
北原_春希21 小时前
如何在Vue3项目中引入并使用Echarts图表
前端·javascript·echarts
尽意啊21 小时前
echarts树图动态添加子节点
前端·javascript·echarts
吃面必吃蒜21 小时前
echarts 极坐标柱状图 如何定义柱子颜色
前端·javascript·echarts
O_oStayPositive21 小时前
Vue3使用ECharts
前端·javascript·echarts
竹秋…21 小时前
echarts自定义tooltip中的内容
前端·javascript·echarts
宝贝露.21 小时前
Axure引入Echarts图无法正常显示问题
前端·javascript·echarts
shmily麻瓜小菜鸡21 小时前
前端文字转语音
前端