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

相关推荐
Lee川1 小时前
深入浅出:用 React 打造高性能懒加载无限滚动组件
前端·react.js
牛奶2 小时前
开发者的"奇技淫巧":那些让你效率翻倍的实战技巧
前端·后端·程序员
咸鱼翻身更入味2 小时前
Vue创建一个简单的Agent聊天——工具调用
前端
Timo来了2 小时前
indexDB的用法示例
前端
walking9572 小时前
重新学习前端之设计模式与架构
前端·javascript·面试
铁皮哥2 小时前
【后端/Agent 开发】给你的项目配置一套 .claude/ 工作流:别再裸用 Claude Code 了!
java·windows·python·spring·github·maven·生活
walking9572 小时前
重新学习前端之TypeScript
前端·javascript·面试
walking9572 小时前
重新学习前端之Linux
前端·vue.js·面试
walking9572 小时前
重新学习前端之CSS
前端·vue.js·面试
walking9572 小时前
重新学习前端之Git
前端·vue.js·面试