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

相关推荐
PFFstronger几秒前
从 0 到 1 搭建接口自动化测试框架:分层架构 + 数据驱动 + 接口依赖编排
python·架构·自动化
Andya_net5 分钟前
Spring Boot | 条件注解完全指南:从 @Conditional 到 @ConditionalOnExpression 的原理、实践与避坑
spring boot·后端·python
APItesterCris6 分钟前
告别人工盯品!借助 Open‑Claw 快速搭建电商商品全自动监控与数据分析系统(完整实操代码)
java·大数据·前端·数据库
weixin_4407305029 分钟前
playwright浏览器自动化实战笔记3-登陆以及退出登陆流程-多用户操作
笔记·python·自动化
卷无止境37 分钟前
测试全绿,功能能跑,代码却烂到没法上线:AI编程助手留下的十个坑
后端·python
卷无止境44 分钟前
终端里的AI战争,命令行编程代理全景扫描
python·agent
啊阿狸不会拉杆1 小时前
《计算机网络-自顶向下方法》6.7 回顾:Web页面请求的历程 读书笔记
前端·计算机网络
SamChan901 小时前
PDF多语言翻译的格式还原技术拆解:从版面分析到内容重排的工程实现
python·ai·pdf·机器翻译
云上工程笔记1 小时前
四柱记账法和复式记账法有什么区别?复式记账为什么更适合查错和对账
大数据·前端·人工智能
恋猫de小郭1 小时前
Dart Skills CLI 1.0 :AI 时代的 Dart 交付支持
android·前端·flutter