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

相关推荐
小高0071 分钟前
🔥前端性能内卷终点?Signals 正在重塑我们的开发习惯
前端·javascript·vue.js
周末也要写八哥8 分钟前
HTML网页设计入门之“做前端”的基本思路
前端·html
VelinX12 分钟前
【个人学习||vue】
前端·vue.js·学习
AI效率工坊13 分钟前
【Python实战】数据可视化自动化:matplotlib+pyecharts+AI智能推荐图表类型
python·信息可视化·自动化
禅思院16 分钟前
前端性能优化:从“术“到“道“的完整修炼指南
前端·性能优化·前端性能优化·分层优化模
User_芊芊君子17 分钟前
2026 Python+AI入门|0基础速通,吃透热门轻量化玩法
开发语言·人工智能·python
用泥种荷花19 分钟前
OpenClaw 插件开发避坑指南
前端
好家伙VCC24 分钟前
**发散创新:基于Python的自动化恢复演练框架设计与实战**在现代软件系统运维中,
java·开发语言·python·自动化
爆更小哇28 分钟前
Python自动化测试:pytest新手快速入门指南
python·测试工具·自动化·pytest
西西弗Sisyphus30 分钟前
Python Lambda 表达式等价普通函数实现
python·lambda