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

相关推荐
ChangYan.6 分钟前
Electron使用ffi-napi报错External buffers are not allowed解决办法
前端·javascript·electron
Sept94010 分钟前
详解实现属性的全面拦截
前端
墨渊君10 分钟前
2025 年: 一半无业游民、一半外包牛马
前端·年终总结
借个火er10 分钟前
从零搭建 Uniapp 企业级项目模板
前端
阿民_armin13 分钟前
移动端长列表「返回原位置」的完整实践
前端·javascript·vue.js
谜亚星17 分钟前
SVG学习(五)
前端·svg
WindStormrage18 分钟前
FormData 传递 JSON 数据的问题解决
前端
拖拉斯旋风19 分钟前
CSS Modules:现代前端组件化样式的安全边界
前端
张元清19 分钟前
告别 Promise.all 的依赖困境:better-all 如何优雅管理异步任务
前端·javascript·面试
数据大魔方20 分钟前
【期货量化入门】期权交易入门:从零开始学期权量化(TqSdk完整教程)
数据库·python·mysql·算法·区块链·程序员创富