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

相关推荐
xiaoshengjinbu3 分钟前
div+css 设备看板样式
前端·css·html·css3
野老杂谈11 分钟前
【面试系列】TypeScript高频面试题及详细解答
前端·面试·typescript·编程语言
M_emory_12 分钟前
【例子】webpack 开发一个可以加载 markdown 文件的加载器 loader 案例
前端·javascript·webpack·node.js
@我们的天空14 分钟前
【深度学习】python之人工智能应用篇--跨模态生成技术
人工智能·pytorch·python·深度学习·机器学习·tensorflow·transformer
Wang's Blog27 分钟前
Webpack: 构建优化
前端·webpack·node.js
托马斯-木35 分钟前
【python学习】如何在一个python文件中调用另一个python文件的函数
开发语言·python·学习
苏十八44 分钟前
前端基础:CSS(篇一)
开发语言·前端·css·考研·面试·tensorflow·学习方法
那维莱特1 小时前
wxss和css有什么区别?
前端·css
weixin_8368695201 小时前
设置HTML元素的背景颜色
前端·html
尚雷55801 小时前
elasticsearch运维系列_用户及角色权限相关SQL及脚本整理
java·服务器·前端